How to enable the sleep feature on Server 2008 with Hyper-V

The sleep and hibernate features are disabled when Hyper-V is installed on a Server 2008 (R2). This is by design.

Lets start a long journey to find a workaround ..

powercfg?

powercfg.exe /hibernate on

image

–> Fail.

 

Sleep?

http://gammadyne.com/cmdline.htm#sleep

Tocheck?

 

Disable Hyper-V Service?

I stumbled upon this blog post: http://old.markharrison.co.uk/blog/2008/09/sleep-hibernate-with-hyper-v.htm

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

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\hvboot]
"Start"=dword:00000003

image

When the computer starts, all power management features are available.

If you need a VM (for a demo for example), Hyper-V can be started with the following command:

net start hvboot

Power management will be disabled again, until the next reboot.

As I don’t need Hyper-V most of the time this is the workaround for now! The journey wasn’t that long after all!

All credits to: http://old.markharrison.co.uk/blog/2008/09/sleep-hibernate-with-hyper-v.htm