New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make guest tools last so pre-reqs are in place #358
Conversation
This still didn't work for me. I didn't even see the Vmware tools folder in C:\windows\temp folder either. I will keep looking into this and try to report back some more useful information |
So I moved up the vm tools to the top of the section where you had it. It is not sensing that it was a Vmware install and doesn't go to the command to install. Bellow is the output for the vm tools bat. ==> vmware-iso: Provisioning with shell script: /Users/nicholaskasprinski/Documents/metasploitable3-vmt/metasploitable3/packer/templates/../../scripts/installs/vm-guest-tools.bat |
ok so I find that the bat file loses all formatting and in such doesn't execute properly. |
@usmcfiredog thanks for the recheck, looks like there may be a bug in packer as the ENV is not getting set as defined. Looking closer. |
@jmartin-r7 The other thing I did notice is that when I removed all of the conditionals and just had it for VMware the install seemed to just hang. When checking task manager it shows the setup running but not cpu usage or anything |
Looks like the env vars are not set by packer for |
still "freezing" up on the install of the vm tools. The vm is still functioning just the setup process isn't using any cpu or anything. |
I think it might be failing to install a runtime dll. When I ran the setup from the command line manually it states that the Microsoft Runtime DLL installer failed to complete installation. |
Now branch should address the hang during install, this was due to fusion supplying 10.3.x versions of vmware tools which required vcredist2017 and depends on a KB that is intentionally not applied to metasploitable3. See https://kb.vmware.com/s/article/55798 |
Works good |
* make guest tools last so pre-reqs are in place Packer 1.3.x and possibly more does not inject enviornment variables as expected into `windows-shell` provisioners, moving script that requires these into a `shell` provisioner. * do not trust default uploaded windows.iso Packer in some cases will upload windows.iso from the host building the VM, since server 2008 needs a specific older version of tools this can cause problems. Example issue: VMware Fusion 11 on macOS Mojave will supply 10.3.x in windows.iso and will hit https://kb.vmware.com/s/article/55798 due the patch level expectaions that are intentionally not met for Windows 2008r2.
dcc2783
to
a4ecd26
Compare
fixes #216
VMware tools requires the vcredist2008 installed and a reboot occur before installation on windows 2008r2. This moves guest tools to install last just before cleanup.
Thanks to @jschulist for the report and @usmcfiredog for the additional validation that this issue persists.