Merge pull request #4651 from mitchellh/improved-windows-guest-documentation
website/docs: Improved windows guest documentation
This commit is contained in:
commit
63fbbaeb94
|
@ -150,6 +150,7 @@
|
|||
<li<%= sidebar_current("vagrantfile-tips") %>><a href="/v2/vagrantfile/tips.html">Tips & Tricks</a></li>
|
||||
<li<%= sidebar_current("vagrantfile-machine") %>><a href="/v2/vagrantfile/machine_settings.html" class="nocap">config.vm</a></li>
|
||||
<li<%= sidebar_current("vagrantfile-ssh") %>><a href="/v2/vagrantfile/ssh_settings.html" class="nocap">config.ssh</a></li>
|
||||
<li<%= sidebar_current("vagrantfile-winrm") %>><a href="/v2/vagrantfile/winrm_settings.html" class="nocap">config.winrm</a></li>
|
||||
<li<%= sidebar_current("vagrantfile-vagrant") %>><a href="/v2/vagrantfile/vagrant_settings.html" class="nocap">config.vagrant</a></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -157,6 +157,56 @@ in the SSH server configuration.
|
|||
This avoids a reverse DNS lookup on the connecting SSH client which
|
||||
can take many seconds.
|
||||
|
||||
## Windows Boxes
|
||||
|
||||
Supported Windows guest operating systems:
|
||||
- Windows 7
|
||||
- Windows 8
|
||||
- Windows Server 2008
|
||||
- Windows Server 2008 R2
|
||||
- Windows Server 2012
|
||||
- Windows Server 2012 R2
|
||||
|
||||
Windows Server 2003 and Windows XP are _not_ supported, but if you're a die
|
||||
hard XP fan [this](http://stackoverflow.com/a/18593425/18475) may help you.
|
||||
|
||||
### Base Windows Configuration
|
||||
|
||||
- Turn off UAC
|
||||
- Disable complex passwords
|
||||
- Disable "Shutdown Tracker"
|
||||
- Disable "Server Manager" starting at login (for non-Core)
|
||||
|
||||
### Base WinRM Configuration
|
||||
|
||||
To enable and configure WinRM you'll need to set the WinRM service to
|
||||
auto-start and allow unencrypted basic auth (obviously this is not secure).
|
||||
Run the following commands from a regular Windows command prompt:
|
||||
```
|
||||
winrm quickconfig -q
|
||||
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="512"}
|
||||
winrm set winrm/config @{MaxTimeoutms="1800000"}
|
||||
winrm set winrm/config/service @{AllowUnencrypted="true"}
|
||||
winrm set winrm/config/service/auth @{Basic="true"}
|
||||
sc config WinRM start= auto
|
||||
```
|
||||
|
||||
### Additional WinRM 1.1 Configuration
|
||||
|
||||
These additional configuration steps are specific to Windows Server 2008
|
||||
(WinRM 1.1). For Windows Server 2008 R2, Windows 7 and later versions of
|
||||
Windows you can ignore this section.
|
||||
|
||||
1. Ensure the Windows PowerShell feature is installed
|
||||
2. Change the WinRM port to 5985 or upgrade to WinRM 2.0
|
||||
|
||||
The following commands will change the WinRM 1.1 port to what's expected by
|
||||
Vagrant:
|
||||
```
|
||||
netsh firewall add portopening TCP 5985 "Port 5985"
|
||||
winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
|
||||
```
|
||||
|
||||
## Other Software
|
||||
|
||||
At this point, you have all the common software you absolutely _need_ for
|
||||
|
|
|
@ -96,6 +96,12 @@ constraints.
|
|||
|
||||
<hr>
|
||||
|
||||
`config.vm.communicator` - The communicator type to use to connect to the
|
||||
guest box. By default this is `:ssh`, but should be changed to `:winrm` for
|
||||
Windows guests.
|
||||
|
||||
<hr>
|
||||
|
||||
`config.vm.graceful_halt_timeout` - The time in seconds that Vagrant will
|
||||
wait for the machine to gracefully halt when `vagrant halt` is called.
|
||||
Defaults to 60 seconds.
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
page_title: "config.winrm - Vagrantfile"
|
||||
sidebar_current: "vagrantfile-winrm"
|
||||
---
|
||||
|
||||
# WinRM Settings
|
||||
|
||||
**Config namespace: `config.winrm`**
|
||||
|
||||
The settings within `config.winrm` relate to configuring how Vagrant
|
||||
will access your Windows guest over WinRM. As with most Vagrant settings, the
|
||||
defaults are typically fine, but you can fine tune whatever you'd like.
|
||||
|
||||
These settings are only used if you've set your communicator type to `:winrm`.
|
||||
|
||||
## Available Settings
|
||||
|
||||
`config.winrm.username` - This sets the username that Vagrant will use
|
||||
to login to the WinRM web service by default. Providers are free to override
|
||||
this if they detect a more appropriate user. By default this is "vagrant,"
|
||||
since that is what most public boxes are made as.
|
||||
|
||||
<hr>
|
||||
|
||||
`config.winrm.password` - This sets a password that Vagrant will use to
|
||||
authenticate the WinRM user. By default this is "vagrant," since that is
|
||||
what most public boxes are made as.
|
||||
|
||||
<hr>
|
||||
|
||||
`config.winrm.host` - The hostname or IP to connect to the WinRM service.
|
||||
By default this is empty, because the provider usually figures this out for
|
||||
you.
|
||||
|
||||
<hr>
|
||||
|
||||
`config.winrm.port` - The WinRM port to connect to, by default 5985.
|
||||
|
||||
<hr>
|
||||
|
||||
`config.winrm.guest_port` - The port on the guest that WinRM is running on.
|
||||
This is used by some providers to detect forwarded ports for WinRM. For
|
||||
example, if this is set to 5985 (the default), and Vagrant detects a forwarded
|
||||
port to port 5985 on the guest from port 4567 on the host, Vagrant will attempt
|
||||
to use port 4567 to talk to the guest if there is no other option.
|
||||
|
Loading…
Reference in New Issue