Booting Windows 7 from Virtual Disk It’s been a busy week for the Microsoft servers. Everyone wanted to download Windows 7 beta and see for them selve what this Vista successor is going to look like. Well, almost everyone because Tom was in Egypt for a well deserved vacation without internet :-)
Ofcourse I wanted to try Windows 7 but didn’t want to wreck my laptop if I wasn’t sure all devices would be supported. So upgrading Vista or deleting Vista was a bit too early. Then I got a hint on twitter from @GeertBaeke about running Windows 7 from a virtual disk. He pointed me to this article: Boot from VHD by Tom Klaver. It is a dutch article which explains Mark Russinovisch’s methode to install and run Windows 7 from a virtual disk that you just put in a sub-directory of your Vista install. In this way you don’t mess up your Vista install and you still run on bare metal (except for the disk then).
On the internet you’ll find a number of people explaining on how to do this, but none have explained it in so much detail as Tom Klaver did. I have tried it myself and it worked without any problems. There was just one minor glitch about a changed command. In step 9 the “surface vdisk” command is mentioned, but this is now replaced by “attach vdisk”. Apart from that, it worked out great.
Because I think this is a great PDF and should also be in english, I took the liberty of translating it. Use his PDF at “Boot from VHD” and my translation to get your Win7 booted from virtual disk.
Warning: You are going to edit the Windows Vista bootmanager. If things go wrong you can be in deep trouble, but don’t we just all love the risk?
Requirements: Windows Vista installed and Windows 7 beta bootable DVD
Chapter 2 (page 4): Edit the boot manager in Vista
1. Open a command prompt with administrative rights (Run as administrator)
2. Run the following command: bcdedit /v
This is the current configuration of the bootmanager. The ID is important info.
3. Run the following command: bcdedit /copy {current} /d “Name”
In which “Name” is the entry you want to show in your bootmenu to start Windows 7.
4. Again run bcdedit /v to verify if there is a new entry in your bootmanager. We will be needing the ID later on, noticed that device and osdevice still point to partition=C:
Chapter 3: Boot WinPE from Windows 7 DVD
1. Boot your machine from the Windows 7 DVD
2. Click Next
3. Select the option: “Repair your computer”
4. Windows installations are being searched for
5. Select the Windows install you just created in chapter 2 and click Next.
6. Select the option “Command Prompt”
7. From the command prompt switch to drive-c and run the following command:
attrib c:\bootmgr -a -s -h -r
8. Now copy the bootmgr from the dvd to the C-drive and create a directory called VHD:
copy d:\bootmgr c:
mkdir c:\vhd
9. Now we’ll start “diskpart” and create and mount a 15Gb virtual disk:
diskpart
create vdisk file=c:\vhd\Windows7.vhd maximum=15000
select vdisk file=c:\vhd\Windows7.vhd
surface vdisk
Should surface vdisk not work, try “attach vdisk“. Now use “list disk” to verify if the virtual disk has been mounted. Next you can exit diskpart by typing “exit“.
10. Run the command: bcdedit /v copy the ID to your clipboard.
11. Run the following commands:
bcdedit /set <ID from clipboard> device vhd=[c:]\vhd\Windows7.vhd
bcdedit /set <ID from clipboard> osdevice vhd=[c:]\vhd\Windows7.vhd
12. To check if the Windows bootloader has been adjusted correctly run:
bcdedit /v
Now start the windows 7 setup by running the command: setup
13. Click Next
14. Accept the agreement and click next
15. Select “Custom (advanced)” setup
16. Select the correct disk (disk 1) and click next. The warning you’ll see in the bottom of the screen can be ignored.
17. Windows 7 install has been started and is running.
18. First boot
19. Choose the third option from the bootmenu. Eventualy one of the boot options will disapear.
20. Congratulations, you just installed Windows 7 on a virtual harddisk.
If this download work.. Just say tnx!!