In this Blog I want to show you how to install Windows in a bootable VHD. In my example I will use Windows 7.
1. Boot from Windows DVD until you see this Screen
First boot screen where you can select Language, Keyboard and so on.
2. On the next Screen press Shift+ F10 or Repair options to Open a Console
3. On the console type diskpart – now you changed to the application diskpart
4. At first run the command listdisk to see the avail disks
5. If no Disk is listed you need to run the next few task otherwise you can go on with Task 9.
6. Write command select disk 0 to attaché first HD
7. Now type clean to wipe and prepare the drive
8. The last step is to format and attaché the drive. So run following commands:
a. Create part primary
b. Format fs=ntfs label=”Harddrive 0” quick
d. Assign letter=c
9. Now you can create the VHD
10. To create the bare VHD type following command: create vdisk file=c:\win7.vhd maximum=50000 type=expandable
You can also use type=fix to allocate the complete space in the HD but this is not needed when you have new faster systems. The OS will not notice when the VHD file expands and you have no performance problems.
11. To prepare the VHD for installation use following commands:
a. select vdisk file=c:\win.vhd
b. attach vdisk
c. create part primary
d. format fs=ntfs label=“Win” quick
12. now type Exit to leave Diskpart
13. Don’t reboot your System!!!
14. Back at x:sources
15. Type the command setup.exe and the windows installation will start
16. Click the User definite installation
17. Select the drive you created
18. And start the installation
19. Finished after the installation and reboot you use the VHD file.