Hyper-V shutdown/start up host causing issues in VMs

hyper-v

I have a single physical host, running 2008 R2 with Hyper-V, all fully updated. On that host I am running 3 clients, a DC, a web server and a SQL Server 2008 R2 SP1. All are running on Windows Server 2008 R2, again all fully patched.

Generally all is fine, but sometimes and not repeatably, when I shutdown the host properly, which suspends the Clients, when it all comes up again, SQL Server is no longer running and the IIS App Pool I am running the website in needs to be told which account to run in again!

Any ideas!?

Best Answer

Colin,

This is most certainly a permissions issue. Even though the machines are saved they cannot contact the DC when they come back online. As a rule of thumb you can virtualize DCs but you should really follow MSFT's best practices as it is advisable to run a separate physical DC for failover reasons. For instance, using clustering and other services on the host machine that rely on a DC will all fail because the guest DC vm has not started.

Unfortunately if you are trying to handle recoveries from a failure there is no way to ensure proper automatic startup, where the machines boot in a specific order. I found a couple of solutions:

  1. Hyper-V Startup Delay to the rescue: http://mctexpert.blogspot.com/2011/02/how-to-configure-start-up-delays-for.html
  2. Boot them up manually. You can change the start-up type from auto or last state to off and then boot them once your host is up.
  3. You can also change the mode from saved to shutdown and then add a boot wait timer by configuring a startup boot option select/delay to delay your IIS and SQL boxes from booting by like 2-5 minutes to give the DC a head start.
  4. If you do ever get into clustering you can configure the HA settings to better control which machines boot when.