joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

vm-guest-tools.bat - Server 2016 issue #260

Closed DaveDingle75 closed 6 years ago

DaveDingle75 commented 6 years ago

Hi, Firstly, thanks for your scripts, they have been really useful!

The only slight issue I am having is with Windows 2016 and when i try to run the MISEXEC command to install 7-zip. It runs fine manually but when the script is invoked and it gets to the MSIEXEC command, I get this (after it has successfully downloaded 7-Zip):

This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.

A general(ish) error I know but all works well on 2012 and 2012 R2. Just wondering if anyone else has posted this issue to you?

Am creating a Windows 2016 Standard VM on Virtual Box 5.2.8 via Packer 1.2.1.

Packer output is: Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 83.

Many thanks,

Dave.

DaveDingle75 commented 6 years ago

Hi,

Just a quick update....

It looks like the 7Zip MSI installer file is not being created in C:\Windows\Temp. Might be permissions issue so will take a look at that.

Cheers,

Dave.

DaveDingle75 commented 6 years ago

Hey,

This was a permissions issue it seems. Anyway, all fixed now. If anyone is interested in the fix or comes across the issue, let me know and i will post.

Cheers,

Dave.

sh4jonny commented 6 years ago

hi! how you fix it ?

DaveDingle75 commented 6 years ago

Hey. Basically, for me, I had to extract the MSI package from the VMware Tools install EXE (you can run a command to extract the MIS files - just do a quick Google search. I can't remember the command offhand). I couldn't get the installer EXE to work at all. So, in my Windows answer file, I copy across the VMwareTools64.msi to C:\Windows\Temp and then call the MSI package from the bat file:

cmd /c msiexec /I C:\Windows\Temp\VMwareTools64.msi /qn ADDLOCAL=ALL REBOOT=R

Hope that makes sense!