Open clong opened 2 years ago
I did some quick testing. The reboot was occurring due to changing the hostname in the vm.hostname var
If you remove this, it will halt the reboot and allow the vmware tools to execute and move onto the provisioning scripts
Is your feature request related to a problem? Please describe. After a Windows VM has booted after being sysprepped, some additional configuration starts occurring when vagrant logs in to configure the hostname. For example, the VMware Tools installer will run to re-configure itself:
However, if the machine reboots before the installation completes, it will fail to install successfully. This leads to a race condition where the installer is trying to finish completing before the reboot occurs.
Describe the solution you'd like It would be great to allow a custom
/t
flag inshutdown_script
defined in https://github.com/hashicorp/vagrant/blob/2eb4406e2ea0bfb562fd9d608c075d74e175c647/plugins/guests/windows/cap/reboot.rb#L12This flag would be exposed as a
config.vm
variable.Describe alternatives you've considered If VMware tools fail to install, shared folders will fail to enable and
vagrant up
will fail. I've tried disabling folder syncing, forcing a vmware tools install, then enabling folder syncing but that doesn't appear to be a viable path.Additional context Source of issue discovery: https://github.com/clong/DetectionLab/issues/720