diff --git a/plugins/communicators/winrm/config.rb b/plugins/communicators/winrm/config.rb index ea381ae0e..6e4a44338 100644 --- a/plugins/communicators/winrm/config.rb +++ b/plugins/communicators/winrm/config.rb @@ -9,6 +9,7 @@ module VagrantPlugins attr_accessor :max_tries attr_accessor :timeout attr_accessor :transport + attr_accessor :ssl_peer_verification def initialize @username = UNSET_VALUE @@ -31,7 +32,7 @@ module VagrantPlugins @port = (is_ssl ? 5986 : 5985) if @port == UNSET_VALUE @guest_port = (is_ssl ? 5986 : 5985) if @guest_port == UNSET_VALUE @max_tries = 20 if @max_tries == UNSET_VALUE - @timeout = 60 if @timeout == UNSET_VALUE + @timeout = 1800 if @timeout == UNSET_VALUE @ssl_peer_verification = true if @ssl_peer_verification == UNSET_VALUE end diff --git a/plugins/communicators/winrm/shell.rb b/plugins/communicators/winrm/shell.rb index 6c55ff45f..2114e944e 100644 --- a/plugins/communicators/winrm/shell.rb +++ b/plugins/communicators/winrm/shell.rb @@ -34,6 +34,8 @@ module VagrantPlugins attr_reader :logger attr_reader :host attr_reader :port + attr_reader :username + attr_reader :password attr_reader :config def initialize(host, port, config) @@ -42,6 +44,8 @@ module VagrantPlugins @host = host @port = port + @username = config.username + @password = config.password @config = config end @@ -137,8 +141,8 @@ module VagrantPlugins end def endpoint_options - { user: @config.username, - pass: @config.password, + { user: @username, + pass: @password, host: @host, port: @port, basic_auth_only: true,