Running Windows Embedded Standard on Hyper-V
So here is something interesting I have been doing and that I wanted to share.
I am working on some labs and I needed to have a Windows Embedded Standard image running in a Virtual machine on top of Hyper-V. I felt like I would have a hard time doing this but at the end of the day it was really easy!
So here are the 3 special steps (sure those who have kids watching Special Agent OSO know what I am talking about with the 3 special steps :-))
Step 1: Create a VHD
First of all I created a new VHD and for this I used this amazing feature of Windows 7 (I am running the Release Candidate on which, by the way, all the Windows Embedded tools, both for CE and WES, are running perfectly well) that enables you to create, mount and boot from VHD files. So it was as easy as opening the Disk Management tool of Windows 7, going to menu Action|Create VHD.
Next step consisted in initializing the disk (right click on the Disk name in the disk manager):
Once the disk was initialized I could create a new Simple Volume (right click on the disk in disk manager) and format it as I would have done for any other usual hard disk partition. As I wanted to boot an OS from it, I activated the volume.
At this point I had a new volume on my Windows 7 machine ready to host the Windows Embedded Standard OS.
Step 2: Prepare a WES 2009 image.
So 2 options here when you want to build a WES 2009 image for a specific target. First one is to directly go into Target Designer and Component Designer and grab the right components (you can leverage test & dev macro components), and second option is to analyze the target running the target analyzer tool that is provided within Windows Embedded Studio and that runs on Windows, DOS, WinPE. Target Analyzer creates an xml file that lists all the hardware detected on the target which can then be imported into Target Designer in order to select the exact set of drivers required for the target. In my case I went for the first solution and put some components in my OS configuration along with the Virtual PC 2007 Helper macro (this one is usually used to prepare a WES image for Virtual PC 2007 but it works fine for Hyper-V too ;-)).
I checked the dependencies, corrected the few errors, and built the image.
Step 3: deploy the image to Hyper-V.
At this point I had a vhd mounted in my Windows 7 file system (Step 1) and a WES 2009 image in my C:\Windows Embedded Images folder (step 2) . I copied the image files into the VHD that is seen as a volume in the file system. Then I detached the VHD in the disk manager of Windows 7:
I then copied the .VHD file to my Hyper-V server, created a new VM, pointed to the new .VHD file and started the virtual machine: after fba, I got my image up and running on Hyper-V
I am sure I will get a digi medal for this one!
Thanks for your help special agent Oso!