guests/windows: nicer error if winrm not in use to configure networks [GH-3651]
This commit is contained in:
parent
326e8012f7
commit
8bb9d18260
|
@ -11,6 +11,7 @@ BUG FIXES:
|
|||
- commands/package: `--base` works without crashing for VirtualBox.
|
||||
- commands/reload: If `--provision` is specified, force provisioning. [GH-3657]
|
||||
- guests/redhat: Fix networking issues with CentOS. [GH-3649]
|
||||
- guests/windows: Human error if WinRM not in use to configure networks. [GH-3651]
|
||||
- providers/docker: Show proper error message when on Linux. [GH-3654]
|
||||
- synced\_folders/rsync: Create the directory before syncing.
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@ module VagrantPlugins
|
|||
@@logger = Log4r::Logger.new("vagrant::guest::windows::configure_networks")
|
||||
|
||||
def self.configure_networks(machine, networks)
|
||||
if machine.config.vm.communicator != :winrm
|
||||
raise Errors::NetworkWinRMRequired
|
||||
end
|
||||
|
||||
@@logger.debug("Networks: #{networks.inspect}")
|
||||
|
||||
guest_network = GuestNetwork.new(machine.communicate)
|
||||
|
|
|
@ -9,6 +9,10 @@ module VagrantPlugins
|
|||
class CantReadMACAddresses < WindowsError
|
||||
error_key(:cant_read_mac_addresses)
|
||||
end
|
||||
|
||||
class NetworkWinRMRequired < WindowsError
|
||||
error_key(:network_winrm_required)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,3 +9,12 @@ en:
|
|||
|
||||
Until then, you must remove any networking configurations other
|
||||
than forwarded ports from your Vagrantfile for Vagrant to continue.
|
||||
network_winrm_required: |-
|
||||
Configuring networks on Windows requires the communicator to be
|
||||
set to WinRM. To do this, add the following to your Vagrantfile:
|
||||
|
||||
config.vm.communicator = "winrm"
|
||||
|
||||
Note that the Windows guest must be configured to accept insecure
|
||||
WinRM connections, and the WinRM port must be forwarded properly from
|
||||
the guest machine. This is not always done by default.
|
||||
|
|
Loading…
Reference in New Issue