Page 1 of 1
Automatic PC reboot after VirtualBox installation
Posted: 10. Apr 2014, 19:01
by Amaranth
I have a batch file installing VirtualBox in silent mode, using the --silent parameter, installing the extension pack and then doing other stuff.
The issue is that something, not everytime, the VirtualBox installation forces a computer reboot before my script finishes executing. I tried with VirtualBox 4.3.8 and 4.3.10, but they have the same behavior.
Why does the VirtualBox forces a computer reboot for a silent installation? If there a way to prevent that?
Re: Automatic PC reboot after VirtualBox installation
Posted: 10. Apr 2014, 19:09
by Perryg
How do you know it is VirtualBox rebooting the guest? Speculation without diagnostics to back it up is not very useful.
Re: Automatic PC reboot after VirtualBox installation
Posted: 10. Apr 2014, 19:20
by Amaranth
My script logs each step in a text file. Here is what it logs when it reboot:
************************************************************
"Visual Studio 2010 Redistributable SP1 installation"
"CALL C:\Users\admin\AppData\Local\Temp\is-PVNII.tmp\vcredist_x86.exe /q /norestart"
************************************************************
"Oracle VM VirtualBox installation"
"CALL C:\Users\admin\AppData\Local\Temp\is-PVNII.tmp\VirtualBox-4.3.10-93012-Win.exe --silent"
Normally, right after the VirtualBox Installation, I have an echo saying that the extension pack installation will begin. So I speculate that it's VirtualBox doing it since the step right after is not executed.
Re: Automatic PC reboot after VirtualBox installation
Posted: 10. Apr 2014, 19:32
by Perryg
OK so where in this text file does it say VirtualBox is the one that is requesting the reboot?
You see VirtualBox doesn't really have the means to do so on it's own and unless you can point me to a command that VirtualBox has issued I can't believe that it is VirtualBox that is doing so.
Re: Automatic PC reboot after VirtualBox installation
Posted: 17. Jun 2015, 21:27
by dragon788
Perryg, the default behavior of Virtualbox is to prompt the user to reboot once it is installed. Internally Vbox uses the msiexec Windows installer functionality, which DOES have the power to restart, and the default embedded into the silent installer is likely to force a reboot.
If using the EXE installer you can pass --silent and then -msiparams /norestart to request the the MSI doesn't force a reboot, but using the EXE in my case it didn't force a reboot when I just used --silent and -msiparams ADDLOCAL=VBoxApplication,VBoxNetworkFlt,VBoxPython,VBoxNetworkAdp,VBoxNetwork (we don't want the USB in our case).
Re: Automatic PC reboot after VirtualBox installation
Posted: 17. Jun 2015, 22:08
by Perryg
Dragon788,
Thanks for your explanation and this is all true but that has nothing to do with VirtualBox in that sense. This is a Microsoft installer and the use thereof would be dependant to Microsoft. So the random sometimes it works and sometimes it does not would still be an MSI issue. But I think I have hashed this enough and will move on to other issues.
Re: Automatic PC reboot after VirtualBox installation
Posted: 18. Jun 2015, 15:11
by scottgus1
Dragon, I think I get why you feel it's Virtualbox:
Normally, right after the VirtualBox Installation, I have an echo saying that the extension pack installation will begin. So I speculate that it's VirtualBox doing it since the step right after is not executed
You don't get the "installing Extension Pack" message when you get a reboot request? If so that would sure seem to lay the "blame" for the reboot request at the feet of the Virtualbox installer.
Perry is correct that the issue is with the
MSI installer which Virtualbox distributes Microsoft MSI system that runs Virtualbox's installer. But it is easy to see why Virtualbox could be blamed. You're running "VirtualBox-4.3.10-93012-Win.exe" not "MSI.exe" or whatever it's called, right?
But "Virtualbox-4.3.10-93012-Win.exe" actually unpacks an MSI installation package out of itself, then asks the MSI system to install that package. The Virtualbox exe doesn't ask for the reboot, the MSI exe does. There is where you should look for why it is not respecting the no-reboot switch.
Re: Automatic PC reboot after VirtualBox installation
Posted: 18. Jun 2015, 15:14
by scottgus1
Alternatively, you could issue the commands in your script to manually unpack the MSI out of the Virtualbox exe and issue the no-reboot switch yourself in the next command to install the unpacked MSI.
Re: Automatic PC reboot after VirtualBox installation
Posted: 18. Jun 2015, 15:26
by Perryg
MSI installer which Virtualbox distributes
Thanks scott, but to clarify this AFAIK VirtualBox does not ship the MSI installer, it is already installed by Microsoft. It provides a script that the MSI installer uses.
Re: Automatic PC reboot after VirtualBox installation
Posted: 18. Jun 2015, 15:53
by scottgus1
Woops, should have been "MSI package", I reckon. But even then the issue probably isn't even with the package, but somehow with Microsoft's MSI system. Badly worded sentence...
Re: Automatic PC reboot after VirtualBox installation
Posted: 18. Jun 2015, 16:05
by Perryg
Not faulting you scott. Just pointing it out since others would see the thread and think that VBox ships the installer.
Re: Automatic PC reboot after VirtualBox installation
Posted: 18. Jun 2015, 16:18
by scottgus1
Totally understand, Perry, not feeling faulted at all
