Click here to Skip to main content
15,893,588 members
Articles / Operating Systems / Win8

Install and boot Windows 8 from vhd

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
8 Jun 2012CPOL2 min read 18K   9   1
In a previous blog post I explained to you how to install Windows 8 in a virtual machine in VirtualBox. In VirtualBox I used 1 gig of memory and 2 of my cores and it performed quite good. However in the metro interface I had some issues with my mouse (scrolling, delays etc.) So yesterday [...]

In a previous blog post I explained to you how to install Windows 8 in a virtual machine in VirtualBox. In VirtualBox I used 1 gig of memory and 2 of my cores and it performed quite good. However in the metro interface I had some issues with my mouse (scrolling, delays etc.) So yesterday I decided to install Windows 8 on a vhd and boot directly from it. To do so I followed Scott Hanselman’s blog post.

Below I placed a shorter summary for you guys:

Step 0

Make sure you have at least 40 gig of free disk space for your vhd. Make sure you’re running Windows 7.

Step 1

Download the Windows 8 developer preview.

Download the Windows 7 USB/DVD tool to make yourself a bootable usb stick.

Use the tool to install the iso to your usb. In Scott’s post you can find some screenshots if you really need them.

Step 2

Now you’re ready to reboot. Make sure the usb you created in previous step sticks in your computer and boot from the usb! In the setup click install and proceed to the step you have to choose a hard drive and immediately stop now and read following very carefull.

First of all we need to create a vhd. So we hit shift+F10 to open the command prompt.

In the command prompt key in the following commands. Feel free to choose another file location, but make sure there is enough space on your harddrive.

X:\Sources> diskpart
DISKPART> create vdisk file="c:\VHD\Win8.vhd" type=expandable maximum=40000
DISKPART> select vdisk file="c:\VHD\Win8.vhd"
DISKPART> attach vdisk
DISKPART> create partition primary

TIP:

If you’re not sure which drive letter you need, just type in ‘dir’ to figure out which drive you have to choose for your vhd if you have multiple. This will enlist you all files and folders on this drive letter. If you are already in DISKPART, just type in ‘exit’. When you figured out the location for your vhd just type diskpart again and start over.

X:\Sources> dir c:

Now you’re ready to proceed the installation. So hit alt+tab and click refresh. Now your vhd should appear in the dialog. Select the vhd and just proceed the installation. Possibly you get a warning when selecting the vhd, saying your system possibly doesn’t support it… Just ignore this and click next and just finish the installation.

When your system reboots you will see a great graphical boot loader screen. You should have two options ‘Windows developer preview’ and your ‘Windows 7′. Now you’re ready to go. Enjoy and share this manual if you think it’s useful.

This article was originally posted at http://marcofranssen.nl?p=84

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Atos
Netherlands Netherlands
I am a .NET Software Developer at Atos International. Architecture, CQRS, DDD, C#, ASP.NET, MVC3, HTML5, Jquery, WP7, WPF, ncqrs, Node.js

Comments and Discussions

 
QuestionNice article Pin
The_Mega_ZZTer8-Jun-12 10:21
The_Mega_ZZTer8-Jun-12 10:21 
Short and to the point, here are some things I've noticed myself FYI:

1. For commercial versions of Wondows (ie not Betas) you typically need the Ultimate edition to boot from VHD like this. It's worth keeping this in mind.
2. 40000 is a bit low, especially if you intend to install programs on the same drive. Even if not (I don't) some MS products like Visual Studio like to dump a ton of stuff on C no matter where you install it. In addition if you make it expandable the actual disk space used on the host drive will be minimized, so you should give a generous upper bound.
3. I managed to make my VHD fixed somehow, not sure how since I thought I specified expanded... check your commands for typos!
4. The Windows Performance Index does not function when you've booted off of a VHD.
5. In earlier betas of Windows 8 you could not change the drive letter of the drive the VHD was on without booting. This is no longer the case with the Release Preview (you still have to disable the page file and reboot to change the drive letter of page file drives though).
6. You can use the mklink tool to create NTFS junctions that link to folders on your normal boot drive. You can do stuff like link %LOCALAPPDATA%\Google to your old profile's, so you can share application settings between the two OSs easily. Careful as there are edge cases (ex Google Chrome saved password storage cannot decrypt itself on the new OS if you do this).
7. Though it's been improved in the Release Preview, Windows 8 will always boot up before presenting you with the boot menu. So this can be annoying if you want to boot into your old OS and miss the old boot menu that shows up faster. The menu is still there, it is being suppressed. Windows 8 will reenable it if you go into system settings and set the default OS to your other OS.

modified 8-Jun-12 16:33pm.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.