Enable Windows Power Saving features while running HyperV on Windows 2008 R2

Running  HyperV on my laptop as my preferred hypervisor is enabled by using Server 2008 R2 as my laptops primary operating system, however, the caveat is that all power management features are automatically disabled.

Hyper-V management services have a base dependency on a driver service known as HVBOOT. HVBOOT is a driver and as such cannot be stopped like normal services once it’s running, however we CAN prevent it from starting!

When this driver is running Windows automatically disables all power saving features. As I mentioned in the start of the post, I’m running Windows 2008 R2 on My HP mobile workstation. Not being able to sleep or hibernate or restore from a low power state wastes a lot of time.

The first thing we need to do it stop HVBOOT from starting automatically at boot time, which returns power management to the OS.

We’ll begin by editing the start parameter for HVBOOT in the registry and setting the value to manual and rebooting.

The registry path is :[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hvboot]

Change the start value to manual, i.e. 3 as follows:

"Start"=dword:00000003

After a reboot we can see the service is stopped by default.

image

 

And VOILA!, power saving features are enabled again. You still won’t find them in the Shut down menu, however, sleep and hibernate actions  are now available under the power management options:

image

Moving on. What about re-enabling Hyper-V. This is where we depart from the other published material. Other blogs specify changing the Start value back to Auto, i.e. 0, however since this IS a service, and we can “see” it in PowerShell, w can start the service, and the other HyperV services as follows:

Start-service hvboot
Get-Service|? {$_.DisplayName -like "Hyper-V *"}|
Start-Service

And HyperV is back in it’s former glory.

The first line starts the missing driver. The second line looks for all HyperV services and starts them if they are stopped.

The only caveat is that once HVBOOT is running there’s no elegant way of stopping it without rebooting, meaning that you need to reboot at least once to have power saving features back.

I agree its a bit of a hack, but at least you’ll have power management back at the price of a reboot and two lines of PowerShell.

Happy Hibernating.

Nic