» WinRM Settings

Config namespace: config.winrm

The settings within config.winrm relate to configuring how Vagrantwill access your Windows guest over WinRM. As with most Vagrant settings, thedefaults are typically fine, but you can fine tune whatever you would like.

These settings are only used if you've set your communicator type to :winrm.

» Available Settings

  • config.winrm.username (string) - This sets the username that Vagrant will useto login to the WinRM web service by default. Providers are free to overridethis if they detect a more appropriate user. By default this is "vagrant,"since that is what most public boxes are made as.

  • config.winrm.password (string) - This sets a password that Vagrant will use toauthenticate the WinRM user. By default this is "vagrant," since that iswhat most public boxes are made as.

  • config.winrm.host (string) - The hostname or IP to connect to the WinRM service.By default this is empty, because the provider usually figures this out foryou.

  • config.winrm.port (integer) - The WinRM port to connect to, by default 5985.

  • config.winrm.guest_port (integer) - The port on the guest that WinRM is running on.This is used by some providers to detect forwarded ports for WinRM. Forexample, if this is set to 5985 (the default), and Vagrant detects a forwardedport to port 5985 on the guest from port 4567 on the host, Vagrant will attemptto use port 4567 to talk to the guest if there is no other option.

  • config.winrm.transport (symbol)- The transport used for WinRM communication.Valid settings include: :negotiate, :ssl, and :plaintext. The default is :negotiate.

  • config.winrm.basic_auth_only (boolean) - Whether to use Basic Authentication. Defaultsto false. If set to true you should also use the :plaintext transport setting andthe Windows machine must be configured appropriately.

Note: It is strongly recommended that you only use basic authentication fordebugging purposes. Credentials will be transferred in plain text.

  • config.winrm.ssl_peer_verification (boolean) - When set to false ssl certificatevalidation is not performed.

  • config.winrm.timeout (integer) - The maximum amount of time to wait for a responsefrom the endpoint. This defaults to 60 seconds. Note that this will not "timeout"commands that exceed this amount of time to process, it just requires the endpoint toreport the status of the command before the given amount of time passes.

  • config.winrm.retry_limit (integer) - The maximum number of times to retry openinga shell after failure. This defaults to 3.

  • config.winrm.retry_delay (integer) - The amount of time to wait between retries anddefaults to 10 seconds.

  • config.winrm.codepage (string) - The WINRS_CODEPAGE which is the client's consoleoutput code page. The default is 65001 (UTF-8).

Note: Versions of Windows older than Windows 7/Server 2008 R2 may exhibitundesirable behavior using the default UTF-8 codepage. When using these olderversions of Windows, its best to use the native code page of the server's locale.For example, en-US servers will have a codepage of 437. The Windows chcp commandcan be used to determine the value of the native codepage.