A few notes about my system setup before proceeding. My hard disk was split into two primary partitions using XP's disk management console (executed from a Windows XP based PE). The first partition (referred to as (hd0,0) throughout this post) was set as ACTIVE. The second partition (referred to as (hd0,1)) was used for the vhd files. I decided to create (hd0,0) as a 10GB partition as this would also contain Windows 7 setup/install files and OS image backups.
Installing to a .vhd
1] Created a bootable Windows PE disc – this must be built using the Windows 7 beta version of the Windows Automated Installation Kit (download here).
2] Copied Windows 7 files from DVD source to "(hd0,0)\Win7" directory (beta build 7000 used)
3] Booted into WinPE and identified (hd0,0) as c: drive and (hd0,1) as d: drive
4] Started diskpart and entered the following commands to create a 10GB .vhd file -Windows Boot Manager--------------------identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}device partition=C:description Windows Boot Managerlocale en-USinherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}default {f4b899d5-0f9a-11de-bffa-bb5aec14052c}resumeobject {f4b899d4-0f9a-11de-bffa-bb5aec14052c}displayorder {f4b899d5-0f9a-11de-bffa-bb5aec14052c}toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}timeout 30Windows Boot Loader-------------------identifier {f4b899d5-0f9a-11de-bffa-bb5aec14052c}device file=[D:]\win7.vhdpath \Windows\system32\winload.exedescription Windows 7locale en-USinherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}recoverysequence {f4b899d6-0f9a-11de-bffa-bb5aec14052c}recoveryenabled Yesosdevice file=[D:]\win7.vhdsystemroot \Windowsresumeobject {f4b899d4-0f9a-11de-bffa-bb5aec14052c}nx OptIn