Windows Server 2008 Hyper-V issue when deployed using Sysprep Image

What a day!!!

I was preparing for a training on Windows 7 which is to be started tomorrow and was setting up the lab’s along with the virtual images. I had to set up around 10 PC’s so i thought of creating a Windows Server 2008 Image using Sysprep.exe and ImageX.exe since the virtual machines are configured to run on hyper-v.

I started off with my reference computer, by installing Windows Server 2008, Microsoft Office, etc along with the Hyper-V role installed. I made sure that the ImageX.exe is saved in a place where it can be accessed easily (D:). As soon as I installed the reference computer I opened up RUN and typed sysprep and executed the system preparation tool on which I selected the generalize option along with shutdown under the Shutdown Options.

The System Preperation Tool started its job and it completed by shutting down my reference computer which i restarted using a Windows OEM Pre Installation CD. The computer booted with the Pre installation kit, through which i navigated to my D: where i already copied my ImageX utility and executed the following command to capture the image

imagex /capture c: d:\Win2k8.wim “Win2K8”

It started to capture and save the Win2K8 image on my D drive.

Now that my reference computers image is captured, i started to apply the images on other computers by booting them up using the Windows Pre Installation CD and executing the following command

Imagex.exe /apply D:\win2k8sp2.wim 1 C:\

The image applied successfully and Windows Server 2008 was installed on all the computers. I copied the virtual images to all the computers and started one of the images, BOOOOOM!!!! It gave me an error and wouldn’t start 😦

“The virtual machine could not be started because the Hypervisor is not running” 

To see the issue is because because there is no Sysprep provider for Hyper-V. Therefore, the HypervisorLaunchType BCD entry is removed from the Boot Configuration Data (BCD) file when you run Sysprep.

And to resolve it, you will have to open CMD with elevated privilege and navigate to

C:\Windows\System32

and type the following Bcdedit /set {current} hypervisorlaunchtype auto

then restart the computer and that will fix the issue with Hyper-V not starting or loading the VM’s.  

For more information related to this error, please visit

Microsoft KB 954356

Advertisements

2 thoughts on “Windows Server 2008 Hyper-V issue when deployed using Sysprep Image

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s