Save VM State during Windows Update restarts

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
Pedritux
Posts: 1
Joined: 21. Dec 2018, 11:10

Save VM State during Windows Update restarts

Post by Pedritux »

It has happened several times, and again tonight (Virtualbox 5.2.22) , so I'd thought I'd post it, as I did not see it referenced here or in the changelog for 6.0.0

Summary: When an Windows Update installation occurs, it triggers an automatic restart, the host is usually unattended (overnight), VirtualBox is closed and it does not save its running VM states, when it has VMs running. Suggestion: Implement the feature "Save VM state in case of host restart" in the GUI.

I understand that the Host OS might not wait for the VM Save to finish, and that would create a big problem.

Found more people talking about the same problem, and some implementing workarounds for this with scripts.
Example on superuser: virtualbox-windows-graceful-shutdown-of-guests-on-host-shutdown

Merry Xmas!
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Save VM State during Windows Update restarts

Post by Martin »

Unfortunately there is technically no way to implement this reliably because saving all running VMs could take longer than Windows allows a process to stall the shutdown process.
If a process doesn't close after a fixed time it just gets killed by Windows shutdown.
fervor
Posts: 4
Joined: 4. Sep 2012, 19:07

Re: Save VM State during Windows Update restarts

Post by fervor »

This just happened to me again tonight. Windows Update smokes my running VMs about once every 3 months when I don't catch the process in time. I've been looking for a way to automatically save the VM state before a Windows update for a long time. I've had no luck finding a good magic trick that can:
A) Catch the update process in the act.
B) Delay the update restart long enough to finish the save.
:/
I will keep looking.
.
AndyCot
Posts: 296
Joined: 29. Feb 2020, 03:04

Re: Save VM State during Windows Update restarts

Post by AndyCot »

You are better to disable automatic Windows updates and run the check manually once a week after you shutdown the VM's.

If you leave Windows automatic updates on you will continue to have problems as MS think they own the computer. It's gotten allot better over the years and reboots happen allot less than in Win3.1
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Save VM State during Windows Update restarts

Post by mpack »

AndyCot wrote:It's gotten allot better over the years and reboots happen allot less than in Win3.1
Due to Windows Update? I think not. The Internet barely even existed in the Win3 era, people typically had 14.4K dialup modems (if they were lucky) to call up FIDOnet boards.

IIRC, automatic Windows Updates were introduced in WinME, then retrofitted to Win9x. Never existed in Windows 3.1, which was long dead by then (completely replaced by Win95).
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Save VM State during Windows Update restarts

Post by scottgus1 »

AndyCot wrote:You are better to disable automatic Windows updates and run the check manually once a week after you shutdown the VM's.
Amen to that! Preach it, brother! :D

@fervor, If you value your VMs, or even want to backup the host beforehand, disable automatic reboot for Windows Updates, or even automatic install. If you're running Pro, the Group Policy Editor can do this easily:

Run... > gpedit.msc > Local Computer Policy > Administrative Templates > Windows Components > Windows Update > Configure Automatic Updates > set "Configure automatic updating" dropdown to 2 (Notify for download and auto install) or possibly 3 (Auto download and notify for install).

I have my 10 Pro workstation set to #2. I get notifications for updates, but they don't install until I click the button. This gives me time to see if Update Tuesday's releases blow up the internet with one of MS's somewhat rare but infamous bunged updates, and to make host backups, verify the RAID mirror, and shut down important programs first.

It may be possible to apply the registry changes et al to a non-GPE-enabled 10 Home etc PC, some web-searching could find out how to do it.
Post Reply