Tuesday, September 23, 2008

Enable Sleep / Hibernate with Hyper-V


From Virtual PC ...
When you enable the Hyper-V role on Windows Server 2008 support for sleep /
hibernate will be disabled.

Q. Is there some way that I can "hack" the system to re-enable sleep /
hibernate with Hyper-V? A. No.



I am now using Windows Server 2008 as my primary laptop with Hyper-V (Link ) ... I now have a partial solution to this problem.

You can have Hyper-V installed but not started by the following registry setting:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hvboot]"Start"=dword:00000003


Now, when I start my laptop i have full access to the power management fucntionality.

If I need to demo a VM, I can start Hyper-V with the command

net start hvboot

Power management is then disabled again until the next reboot.



Sleep command line tool: sleep by Greg Wittmeyer

6 Comments:

  • Anonymous Owen Allen said…

      This is great news! Thanks!   

  • Anonymous Anonymous said…

      didn't work for me on a laptop with Hyper-V working the last month. When enabled and rebooted, i had power savings options working (although the kb function key shortcuts wouldn't work like in vista).

    but after starting the hvboot, I could still not start virtual machines. i had to reset the reg back to 1 and reboot. still, a good option if you're willing to reboot to enable/disable it.   

  • Anonymous Anonymous said…

      this is useful if you use Win2008 as your primary laptop OS and only need Hyper-V periodically for demos/debugging... otherwise, you have to reboot all the time   

  • Anonymous Anonymous said…

      Definitely worked except that my system is unstable after waking up from hibernate. The first time, it came up, I logged on but when I clicked to open an application, blue screen. The second time, it came up, said it was restoring from hibernation but then rebooted without a logon prompt appearing.

    Anyone else seeing this?   

  • Blogger Charly said…

      Hey, great improvement!

    Tough didn't work too well. Hibernate/sleep was working just fine, but no matter that I executed "net start hvboot", VMs would not start. Had to rollback.

    Will try to make it work. Do you know if there is any way to force to STOP it? (so I don't have to restart Windows to stop the service)

    Cheers.   

  • Anonymous Bink said…

      Mark,

    Thanks for the tip! The Root/console Partition/session of Hyper-V is kind of slow for daily use anyway—and/so disabling Hyper-V restores full performance! No issues with sleep/hibernate for me now!   

Post a comment