Virtual Server Shutdown Stalemate
Here’s how to allow VM save state operations time to complete when a Virtual Server host is shut down.
I think I found a bug in Microsoft Virtual Server. I'm running Microsoft Virtual Server 2005 R2. For each VM on the server (I have eight), I have the "Action When Server Stops" property set to Save State. For some reason, this doesn't always seem to work when I shut the server down. Now I'm finding myself manually doing this from the Master Status page before shutting down the server. Shouldn't the automatic Save State feature prevent me from having to do this?
Tech Help—Just An
Got a Windows, Exchange or virtualization question
or need troubleshooting help? Or maybe you want a better
explanation than provided in the manuals? Describe
your dilemma in an e-mail to the MCPmag.com editors
the best questions get answered in this column and garner
the questioner with a nifty MCPmag.com baseball-style
When you send your questions, please include your
full first and last name, location, certifications (if
any) with your message. (If you prefer to remain anonymous,
specify this in your message, but submit the requested
information for verification purposes.)
Good question, Khalid. In theory the Save State operation works just fine. Virtual Server does try to save the running state of each active virtual machine when a system shutdown event begins. The real problem here is not Virtual Server but, instead, an impatient operating system.
While Virtual Server is trying to shut down, Windows is saying "Come on! Hurry up! I don't have all day!" Then the OS starts its countdown. If the service has not stopped by the time the OS decides to wait, the service is forcefully terminated.
The termination timeout is configured using the following registry string value:
The number assigned to the value represents the amount of milliseconds that the OS will wait for a service to gracefully shutdown. The default value is 20,000 milliseconds, or 20 seconds. If the time is exceeded, the service is terminated so that the OS can continue the shutdown process. In your case, I recommend that you increase the value to a significantly higher number, such as 300,000. This would allow for a five-minute wait (300,000 milliseconds is equal to 300 seconds). If this is not ample enough time, then you could raise the value to 10 minutes -- 600,000.
For quicker VM shutdowns, also consider changing the "Action when Virtual Server stops" for each VM from "Save State" to "Shut Down Guest OS." However, this requires that the VM additions be installed in each guest OS. For Linux guest VMs, you need to download the Virtual Machine Additions for Linux, which is currently in beta.
I hope this helps.