VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Discussions related to using VirtualBox on Windows hosts.
Post Reply
soredake
Posts: 3
Joined: 12. Jan 2024, 18:38

VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by soredake »

More info here: https://www.virtualbox.org/ticket/21951

If you try to update VirtualBox while any virtual machine is running, you'll receive broken VirtualBox installation in the result.

To reproduce this in updated clean Windows 10/11 do this:

1) Do `winget install -h --id=Oracle.VirtualBox -v "7.0.10" -e`

2) Launch VirtualBox.

3) Create virtual machine with any iso (I used this iso MicroXP-0.82 can be found on archive org site)

4) Launch this virtual machine.

5) Do `winget upgrade -h Oracle.VirtualBox`

6) Close running virtual machine.

7) Launch it again, you will receive error about kernel driver.

Now, after upgrading, you have mismatched exe/dll and drivers because VirtualBox doesn't close running virtual machines/gui.

Chocolatey (package manager) package have script to close running virtual machines before running upgrade.
Qbittorrent have similar mismatched version problem.
Attachments
vbox_before_upgrade_apps.png
vbox_before_upgrade_apps.png (8.15 KiB) Viewed 1650 times
vbox_after_upgrade_apps.png
vbox_after_upgrade_apps.png (14.95 KiB) Viewed 1650 times
kernel driver error.png
kernel driver error.png (18.52 KiB) Viewed 1650 times
Last edited by scottgus1 on 13. Jan 2024, 15:05, edited 1 time in total.
Reason: added link
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by scottgus1 »

Right, this is expected. I would think any program wouldn't work well if it was running while one tried to update it.

Shutting down all VMs is a prerequisite of updating Virtualbox.
soredake
Posts: 3
Joined: 12. Jan 2024, 18:38

Re: VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by soredake »

> Shutting down all VMs is a prerequisite of updating Virtualbox.

It should be done by installer (I've seen enough installers that do this), there should be no need for user to do this, especially when software are updated by script like WAU, or, at least, VirtualBox should abort installation if virtual machine is running so your installation will not be broken.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by scottgus1 »

That sounds reasonable. You can post a ticket on the Bugtracker, to let the devs know.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by fth0 »

The VirtualBox installer cannot replace the VirtualBox kernel drivers when they're currently being used, so my expectation would be that those files get replaced at the next reboot of the host OS. Some other software installers simply request the user to reboot the host in this case.

Does the VirtualBox installation work after the next host reboot?
soredake
Posts: 3
Joined: 12. Jan 2024, 18:38

Re: VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by soredake »

>That sounds reasonable. You can post a ticket on the Bugtracker, to let the devs know.

I've mentioned ticket in the first post.

> Does the VirtualBox installation work after the next host reboot?

Unfortunately, no.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox installer doesn't close running virtual machines / GUI resulting in broken installation after upgrading

Post by scottgus1 »

Thanks, I added the ticket link to your post.
Post Reply