VMware Cloud Community
DaveDingle75
Contributor
Contributor

VMware Tools install failure

Hey all,

Firstly, thanks in advance for any help and if I have posted this query in the wrong place, please do let me know.

I am building a couple of VM images using Packer (by HashiCorp) which calls an unattended file for the Windows Server (2012 R2 and 2016) configuration.  That all works fine.  Once the VM has been built the final call is made (by Packer) to a bat file which gets the VMware tools ISO and executes the setup64.exe with the silent switches.  However, that install fails.  The problem seems to be with installing the visual C++ runtime libraries.  I get the standard 'Setup cannot continue.  The Microsoft Runtime DLL insaller failed to complete installation' message in the installer log preceded by:

Found "C:\VMwareTemp\{GUID}~Setup\vcredist_x86.exe"

Cannot get short temp path for VC redist installer

The server auto logs on as local admin and UAC has also been disabled as part of the unattended script (for the purposes of troubleshooting).  I have tried to manually install both the 32-bit and 64-bit 2008 SP1 C++ runtime installers as part of the unattended file (which install OK) before the script to install the tools is called but to no avail.

Interestingly, if I can the same setup64.exe command after the VM has shutdown and been sysprepped, the command runs in OK and the tools get installed.  So, is the error above in relation to permissions, possibly?  I would be interested to hear anyone's thought, epsecially if you have come across the issue before!

I will post in the MS forums too as this may be nothing to do with VMware at all.

Cheers all,

Dave.

Tags (1)
0 Kudos
2 Replies
pwilk
Hot Shot
Hot Shot

I'd recommend reading through this doc first VMware Knowledge Base

Is it possible for you to edit the bat file supplied by Packer? Can you post the content of this file here? I might be able to investigate further if you provide it here.

Cheers, Paul Wilk
0 Kudos
DaveDingle75
Contributor
Contributor

Hi pwilk,

Sorry for the late reply.  Yep, I did see that article and did check for the error codes in the application event log but there weren't any - probably because of the way Packer builds the Windows Image I would guess.

I got around the issue in the end by extracting the MSI from the setup64.exe and running that.  I simply pre-installed the 2008 C++ run-time (also from the extracted exe) and then ran the MSI with correct switches.  The tools installed fine after that.  Still not sure why the exe generated the error in my first post but the workaround is fine for building an image.

Thanks for taking the time to reply anyway.  it is appreciated.

Cheers,


Dave.

0 Kudos