Virtual Box Installation on Windows Server 2012

Hello Everyone,

I want to install virtual box on window server 2012, I wrote one playbook here below for reference,

Hmm, I think installing Virtualbox might be a bit tricky as, if I recall, it installs it's own network drivers and has to restart networking during the installation. Restarting networking is pretty much guaranteed to stop winrm I think.

That said you are getting an error rather than a communication failure so perhaps something else is wrong. Most likely thing is that the installer is expecting some kind of input from the user.

I am not exactly sure what is going on but there
are a few things that you can try.

You could try using win_chocolatey to install virtualbox. It is also worth trying using become: runas and having the installation run as the local Administrator user.

I suspect you may still hit the problem with the networking restart. You might be able to get round that by either telling the installer not to restart networking during the installation, or if that isn't possible, by setting up a scheduled task to do the installation.

Hope this helps and you are able to install.

Jon

One other thing to look at is the silent arguments required to install the application. Most of the time if you open an executable directly without any arguments it opens up the GUI and in this case there is no GUI so it fails.

VirtualBox has a whole guide on how to do this https://www.virtualbox.org/manual/ch02.html#installation_windows, it seems like you need to extract the MSI installer from the exe and then install that but look at the guide for more details.

As jhawkesworth is saying, chocolatey is definitely an easier way to do this as someone else would have done the hard work to figure how to install it silently https://chocolatey.org/packages/virtualbox.

Thanks

Jordan