Wednesday, February 8, 2012

Sleeping with Hyper-V

NO, I do not have a sick fetish (at last not one including Hyper-V). But I do alot of demoing on my laptop and love to use Hyper-V for that.

This means that I cannot use an ordinary Windows 7 client installation, we have to wait for Windows 8 for Hyper-V to be supported in the client operatin system.

I have been using Windows Server as my laptop OS for quite some time now and the only thing I missed was the possibility to use the "Sleep" feature (not that big deal when using SSD disk when starting, but the shutdown are slow because of the saving of running VM's)

So I found a solution sometime ago.

The sleep function works well on servers, but the minute you install the Hyper-V role it gets disabled.
So looking into what makes it disable, I found out that it's the service who does it. If you disable the service the server will get the sleep function back. In most usage of my laptop I don't use Hyper-V, so this sounds like a great idea. Problem is that I don't want to reboot when I need to start up Hyper-V. If you have tried this you know that this is what happens when you change the services.

So how to we get the best of both Hyper-V and Sleep?
It's easy.

Step 1. Registry change:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services \hvboot]"Start"=dword:00000003

Step 2. Reboot

Step 3. When needing Hyper-V run a command prompt as Admin and type in:
net start hvboot

Step 3 will turn of sleep function, but after a reboot you get it back. I have created a cmd files on my desktop to save me the typing :-)

Test-MigrationReadyness.ps1 Script

I have added a OneDrive/SharePoint migration related script to my GitHub This is an add-on to make my script " Test-OneDrivePath.ps1...