Repository: clong/DetectionLab

Issue #720: Bug: Win10 provisioning hangs on shared  folders - VMWare Tools not installed
Created: 2021-10-12T22:06:50Z
Operating System Version: MacOS Big Sur 11.6
Deploying via (VirtualBox/VMWare/AWS/Azure/ESXi): VMWare
Vagrant Version (if applicable): 2.2.18

Please verify that you are building from an updated Master branch before filing an issue. √
Description of the issue:
While provisioning Win10, it always gets stuck on this stage:
==> win10: Fixed port collision for 5985 => 55985. Now on port 2200.
==> win10: Fixed port collision for 5986 => 55986. Now on port 2201.
==> win10: Fixed port collision for 22 => 2222. Now on port 2202.
==> win10: Starting the VMware VM...
==> win10: Waiting for the VM to receive an address...
==> win10: Forwarding ports...
    win10: -- 5985 => 2200
    win10: -- 5986 => 2201
    win10: -- 22 => 2202
==> win10: Waiting for machine to boot. This may take a few minutes...
    win10: WinRM address: 127.0.0.1:2200
    win10: WinRM username: vagrant
    win10: WinRM execution_time_limit: PT2H
    win10: WinRM transport: negotiate
==> win10: Machine booted and ready!
==> win10: Setting hostname...
==> win10: Configuring network adapters within the VM...
==> win10: Configuring secondary network adapters through VMware
==> win10: on Windows is not yet supported. You will need to manually
==> win10: configure the network adapter.
==> win10: Enabling and configuring shared folders...

Upon investigation, it seems the issue is VMWare Tools not being installed. I can log in as vagrant, load the tools installer iso, and start the installation as an administrator and it seems to work fine from there on out.
The DC does not seem to have this issue. Let me know if there's any more information I can provide.
Box versions:
vagrant box update
==> logger: Box 'bento/ubuntu-18.04' not installed, can't check for updates.
==> wef: Checking for updates to 'detectionlab/win2016'
    wef: Latest installed version: 1.8
    wef: Version constraints:
    wef: Provider: vmware_desktop
==> wef: Updating 'detectionlab/win2016' with provider 'vmware_desktop' from version
==> wef: '1.8' to '1.9'...
==> wef: Loading metadata for box 'https://vagrantcloud.com/detectionlab/win2016'
==> wef: Adding box 'detectionlab/win2016' (v1.9) for provider: vmware_desktop
    wef: Downloading: https://vagrantcloud.com/detectionlab/boxes/win2016/versions/1.9/providers/vmware_desktop.box
    wef: Calculating and comparing box checksum...
==> wef: Successfully added box 'detectionlab/win2016' (v1.9) for 'vmware_desktop'!
==> win10: Checking for updates to 'detectionlab/win10'
    win10: Latest installed version: 1.8
    win10: Version constraints:
    win10: Provider: vmware_desktop
==> win10: Box 'detectionlab/win10' (v1.8) is running the latest version.

Duplicate issue #853: dc - stdout: Error: The VMware Tools are not running in the virtual machine
Created: 2022-09-21T15:28:38Z
Operating System Version:
Deploying via VmWare
Vagrant Version (if applicable):

Building from master branch
Description of the issue:
While building the domain controller (dc), I'm running into the following error message that causes the build to stop:
I am using this command to build the domain controller.
vagrant up dc --provider vmware_desktop --provision

Note this issue also occurs when doing the sequential vagrant up
dc: Enabling and configuring shared folders...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["enableSharedFolders", "D:\\Detection Lab\\Vagrant\\.vagrant\\machines\\dc\\vmware_desktop\\2866e893-a83e-4d26-870c-658b65fa2bf9\\WindowsServer2016.vmx", {:notify=>[:stdout, :stderr]}]

Stdout: Error: The VMware Tools are not running in the virtual machine: D:\Detection Lab\Vagrant\.vagrant\machines\dc\vmware_desktop\2866e893-a83e-4d26-870c-658b65fa2bf9\WindowsServer2016.vmx

Stderr:


Powershell log
PS D:\Detection Lab\Vagrant> vagrant up dc --provider vmware_desktop --provision
Bringing machine 'dc' up with 'vmware_desktop' provider...
==> dc: Checking if box 'detectionlab/win2016' version '1.9' is up to date...
==> dc: Verifying vmnet devices are healthy...
==> dc: Preparing network adapters...
WARNING: The VMX file for this box contains a setting that is automatically overwritten by Vagrant
WARNING: when started. Vagrant will stop overwriting this setting in an upcoming release which may
WARNING: prevent proper networking setup. Below is the detected VMX setting:
WARNING:
WARNING:   ethernet1.pcislotnumber = "33"
WARNING:
WARNING: If networking fails to properly configure, it may require this VMX setting. It can be manually
WARNING: applied via the Vagrantfile:
WARNING:
WARNING:   Vagrant.configure(2) do |config|
WARNING:     config.vm.provider :vmware_desktop do |vmware|
WARNING:       vmware.vmx["ethernet1.pcislotnumber"] = "33"
WARNING:     end
WARNING:   end
WARNING:
WARNING: For more information: https://www.vagrantup.com/docs/vmware/boxes.html#vmx-allowlisting
==> dc: Fixed port collision for 22 => 2222. Now on port 2200.
==> dc: Starting the VMware VM...
==> dc: Waiting for the VM to receive an address...
==> dc: Forwarding ports...
    dc: -- 5985 => 55985
    dc: -- 5986 => 55986
    dc: -- 22 => 2200
==> dc: Waiting for machine to boot. This may take a few minutes...
    dc: WinRM address: 127.0.0.1:55985
    dc: WinRM username: vagrant
    dc: WinRM execution_time_limit: PT2H
    dc: WinRM transport: plaintext
==> dc: Machine booted and ready!
==> dc: Setting hostname...
==> dc: Configuring network adapters within the VM...
==> dc: Configuring secondary network adapters through VMware
==> dc: on Windows is not yet supported. You will need to manually
==> dc: configure the network adapter.
==> dc: Enabling and configuring shared folders...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["enableSharedFolders", "D:\\Detection Lab\\Vagrant\\.vagrant\\machines\\dc\\vmware_desktop\\2866e893-a83e-4d26-870c-658b65fa2bf9\\WindowsServer2016.vmx", {:notify=>[:stdout, :stderr]}]

Stdout: Error: The VMware Tools are not running in the virtual machine: D:\Detection Lab\Vagrant\.vagrant\machines\dc\vmware_desktop\2866e893-a83e-4d26-870c-658b65fa2bf9\WindowsServer2016.vmx

Stderr:
PS D:\Detection Lab\Vagrant>

Do I have to manually install VMWare Tools? Should vagrant not do this?

Closing comment (2022-09-22T05:06:16Z): Closing as this is tracked in #720