Windows Server build fails
Building the Windows Server fails on Ubuntu 18.04. Error message bellow:
PLAY RECAP ********************************************************************* attack-range-windows-domain-controller : ok=52 changed=45 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
==> attack-range-windows-server: Importing base box 'd1vious/windows2016'...
==> attack-range-windows-server: Matching MAC address for NAT networking...
==> attack-range-windows-server: Checking if box 'd1vious/windows2016' is up to date...
==> attack-range-windows-server: Setting the name of the VM: attack-range-windows-server
==> attack-range-windows-server: Fixed port collision for 3389 => 3389. Now on port 2201.
==> attack-range-windows-server: Fixed port collision for 22 => 2200. Now on port 2202.
==> attack-range-windows-server: Fixed port collision for 5985 => 55985. Now on port 2203.
==> attack-range-windows-server: Fixed port collision for 5986 => 55986. Now on port 2204.
==> attack-range-windows-server: Clearing any previously set network interfaces...
==> attack-range-windows-server: Preparing network interfaces based on configuration...
attack-range-windows-server: Adapter 1: nat
attack-range-windows-server: Adapter 2: hostonly
==> attack-range-windows-server: Forwarding ports...
attack-range-windows-server: 3389 (guest) => 2201 (host) (adapter 1)
attack-range-windows-server: 22 (guest) => 2202 (host) (adapter 1)
attack-range-windows-server: 5985 (guest) => 6001 (host) (adapter 1)
attack-range-windows-server: 5985 (guest) => 2203 (host) (adapter 1)
attack-range-windows-server: 5986 (guest) => 2204 (host) (adapter 1)
==> attack-range-windows-server: Running 'pre-boot' VM customizations...
==> attack-range-windows-server: Booting VM...
==> attack-range-windows-server: Waiting for machine to boot. This may take a few minutes...
attack-range-windows-server: WinRM address: 127.0.0.1:6001
attack-range-windows-server: WinRM username: vagrant
attack-range-windows-server: WinRM execution_time_limit: PT2H
attack-range-windows-server: WinRM transport: plaintext
#<Thread:0x000055a1d44c6758@/var/lib/gems/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:471 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
21: from /var/lib/gems/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context'
20: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in block in call'
19: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:31:in wait_for_ready'
18: from /usr/lib/ruby/2.5.0/timeout.rb:108:in timeout'
17: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
16: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
15: from /usr/lib/ruby/2.5.0/timeout.rb:33:in block in catch'
14: from /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout'
13: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:57:in block in wait_for_ready'
12: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:106:in ready?'
11: from /usr/lib/ruby/2.5.0/timeout.rb:108:in timeout'
10: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
9: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
8: from /usr/lib/ruby/2.5.0/timeout.rb:33:in block in catch'
7: from /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout'
6: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:107:in block in ready?'
5: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:66:in cmd'
4: from /var/lib/gems/2.5.0/gems/winrm-2.3.5/lib/winrm/connection.rb:42:in shell'
3: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:67:in block in cmd'
2: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:111:in execute_with_rescue'
1: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:114:in rescue in execute_with_rescue'
/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:172:in raise_winrm_exception': An error occurred executing a remote WinRM command. (VagrantPlugins::CommunicatorWinRM::Errors::ExecutionError)
Shell: Cmd
Command: hostname
Message: [WSMAN ERROR CODE: 2147942421]: <f:WSManFault Code='2147942421' Machine='127.0.0.1' xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault'><f:Message><f:ProviderFault path='%systemroot%\system32\winrscmd.dll' provider='Shell cmd plugin'>The device is not ready. </f:ProviderFault></f:Message></f:WSManFault>
#<Thread:0x000055a1d463abc0@/var/lib/gems/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:471 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
21: from /var/lib/gems/2.5.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context'
20: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in block in call'
19: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:31:in wait_for_ready'
18: from /usr/lib/ruby/2.5.0/timeout.rb:108:in timeout'
17: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
16: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
15: from /usr/lib/ruby/2.5.0/timeout.rb:33:in block in catch'
14: from /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout'
13: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:57:in block in wait_for_ready'
12: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:106:in ready?'
11: from /usr/lib/ruby/2.5.0/timeout.rb:108:in timeout'
10: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
9: from /usr/lib/ruby/2.5.0/timeout.rb:33:in catch'
8: from /usr/lib/ruby/2.5.0/timeout.rb:33:in block in catch'
7: from /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout'
6: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/communicator.rb:107:in block in ready?'
5: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:66:in cmd'
4: from /var/lib/gems/2.5.0/gems/winrm-2.3.5/lib/winrm/connection.rb:42:in shell'
3: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:67:in block in cmd'
2: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:111:in execute_with_rescue'
1: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:114:in rescue in execute_with_rescue'
/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/plugins/communicators/winrm/shell.rb:172:in raise_winrm_exception': An error occurred executing a remote WinRM command. (VagrantPlugins::CommunicatorWinRM::Errors::ExecutionError)
Shell: Cmd Command: hostname Message: [WSMAN ERROR CODE: 2147942421]: <f:WSManFault Code='2147942421' Machine='127.0.0.1' xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault'><f:Message><f:ProviderFault path='%systemroot%\system32\winrscmd.dll' provider='Shell cmd plugin'>The device is not ready. </f:ProviderFault></f:Message></f:WSManFault> An error occurred executing a remote WinRM command.
Shell: Cmd Command: hostname Message: [WSMAN ERROR CODE: 2147942421]: <f:WSManFault Code='2147942421' Machine='127.0.0.1' xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault'><f:Message><f:ProviderFault path='%systemroot%\system32\winrscmd.dll' provider='Shell cmd plugin'>The device is not ready. </f:ProviderFault></f:Message></f:WSManFault> 2020-12-04 14:35:51,135 - ERROR - attack_range - vagrant failed to build
I was not able to reproduce this issue
Think this can be closed. Not able to reproduce. Only happens when I have already downloaded the vagrant images and rebuild the machines. But even then not every time, have to delete the images and rebuild. May be related to the environment I am using. Windows 10 -> VMWare Workstation -> Ubuntu