Skip to main content

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 :-)

Popular posts from this blog

Changing Windows product key (license) for a MDT OS deployment task

Creating a new OS deployment task in MDT you will be asked to specify product key

That’s easy enough, but what if you type in the wrong key or just want to change it (add it) later? You might even have gotten a new MAK.

That is not as easy, you cannot do it from the graphical interface, you have to do it from one of the configuration files. Well you might to it from graphical interface by typing it in every time deploying a computer gets deployed but that is not a great solution.

MDT - The task sequence has been suspended. LiteTouch is trying to install applications

Every now and then I get this error message when fuelling a computer with MDT:
"The task sequence has been suspended. LiteTouch is trying to install applications. This cannot be performed in Windows PE."

How to get and use the Windows key from UEFI/BIOS

I found myself in the situation that I needed to get the Windows key out from the ACPI in the UEFI bios and preferable get to use it in a task sequence in MDT.

There are different ways of doing this, but I wanted to do this with little code and easy to understand.
There is a nice tool created to get the key on github, created by Christian Korneck, called get_win81key. This tool gives you the key in plane text. You can get it

If I were supposed to do this manually, I now would just take that key and type it in with slmgr command or in the GUI. But I want to do this within a task in MDT.
Testing a couple of solutions without using the get_win8key with my great scripting guru colleague HÃ¥vard ( and figuring out that it cannot be done with default powershell stuff, it needs more code. Therefore, we quickly figured out that some use of the “get_win8key” files is the easiest way, but we need a way of setting the output fro…