What to do with a machine that doesn't support Hyper-V...
In my little corner of the world, during the last year (give or take) Hyper-V went from something that a few people were playing with to something that every single person couldn't live without. The huge benefit to us is the 'snapshot' feature, which allows us to instantaneously get a test machine back to clean state.
This left me with one problem - what to do with my old test machine which was too old to support Hyper-V, but too new to just throw away. Fortunately, Win7 came to my rescue by adding support for booting off a VHD (virtual hard disk). Now I can use differencing virtual hard disks, as a poor-man's Hyper-V and still get some millage out of my old test boxes.
Basic reimaging procedure:
- Boot to my physical hard drive
- Delete the current differencing disk
- Create a new differencing disk
- Boot back to my differencing disk
- Rejoin the domain and install my test software (Visual Studio in my case)
Here is how I set this up:
- Installed Win7 to my physical hard drive
- After that install completed, I created a new Virtual Hard disk from the Disk Management MMC tool (Computer Management->Storage->Disk Management). I created a fixed Virtual Hard drive but I actually think that I dynamic disk would have been better since most of the parent virtual hard disk will remain empty. I named this file c:\windows7.vhd.
- Boot to the Win7 installer again to install a second partition of Win7 on the VHD
- After the installer finishes initializing, go to the repair tools and open a command prompt
- Run 'diskpart'
- select vdisk file=c:\windows7.vhd.
- attach vdisk
- exit
- Now continue the Win7 installer, select the virtual disk as the partition to install to. Note that in RC builds, Win7 will warn you that Windows cannot install to this partition, but this warning appears to be ignorable.
- After the install completes, install anything else to that parent partition that you need (ex: development tools, baseline libraries, etc).
- Boot back to the physical hard drive.
- Create a new differing vhd using the 'diskpart' tool (create vdisk file=c:\windows7.diff.vhd parent=c:\windows7.vhd)
- Add a new boot menu entry for the differencing vhd, and set it as the default:
- bcdedit /copy {guid_of_vdisk} /d "Win7 (Diff VHD)" this will create a new boot entry and assign a Guid to it
- bcdedit /set {guid_of_copy} device vhd=[C:]\windows7.diff.vhd
- bcdedit /set {guid_of_copy} osdevice vhd=[C:]\windows7.diff.vhd
- bcdedit /default {guid_of_copy}
- Boot to your new diff vhd and test away
Comments
- Anonymous
May 12, 2009
PingBack from http://asp-net-hosting.simplynetdev.com/what-to-do-with-a-machine-that-doesnt-support-hyper-v/