How To Guide to Installing and Booting Windows 8 Consumer Preview off a VHD (Virtual Hard Disk)
So Windows 8 Consumer Preview is out today. You probably read the Windows 8 Consumer Preview Announcement by Steven Sinofsky and then rushed off to Download it.
Disclaimer: Hopefully you are a technical person or you are not afraid of totally destroying your computer with new preview software. Even better, you aren't the kind of person to rage on a stranger's blog when his totally unsupported instructions on how to install the Windows 8 Consumer Preview onto a VHD delete everything you know an love. You're on your own, friend. I don't work for the Windows team and you don't know me. Remember that as you edit your boot records and destroy your PhD thesis. To the cloud!
First, what's the idea here? I'm assuming that:
- You want to try out Windows 8 on your machine
- You don't want to take any chance with dual booting or getting a slower experience inside a regular Virtual Machine.
Cool. If you have Windows 7 now then you can "boot to a virtual hard disk (VHD)" and get all the loveliness of Windows 8 running on hardware without any risk to your hard drive. Don't like it? Delete the VHD and update your boot record.
HUH? What does this mean? What this means is that ONLY the Hard Drive will be virtualized. Your Windows 8 system will run ON THE HARDWARE with your real video card, real CPU, real network card, etc. However, it will NOT run directly from your hard drive - it will run from a file on your hard drive. Windows 8 will live and run on its own personal "virtualized hard drive" which is the VHD.
Ok, now that that disclaimer and expectation setting is done. I don't work for the Windows team, and you don't know me. I am just a guy who loves Boot to VHD. I wrote the Guide to Installing and Booting Windows 8 Developer Preview off a VHD (Virtual Hard Disk) that you may have used last year to play with the build of Windows 8 that was released at the BUILD conference.
Updating from Developer Preview? Delete and start over!
If you want to now try using the Windows 8 Consumer Preview and you already have a VHD setup with the Developer Preview from last year, you can simply delete the existing VHD from your hard drive, then run "msconfig.exe" as administrator and delete the existing boot entry as seen in this screenshot.
Then just setup a new VHD all over again for this new Consumer Preview version of Windows 8. That's the magic of boot to VHD. You can just remove the VHD. You can even have multiple versions if you have the disk space. Just make sure your boot record is up to date.
Setting up Boot to VHD
The original instructions on how to boot Windows 8 from a VHD still work and are valid for the Consumer Preview. They work on my machine. I did want to slightly update the post with additional information with the help of a number of people internally with some techniques that may make things easier for you. Thanks to Iain and friends.
Why Boot to VHD?
I boot to VHD all the time. It works great, and the idea of booting to some VHD is a supported thing to be doing on Windows 7. Boot to VHD is a great actual feature of Windows 7 and Windows 8. Why do it?
I could do a few things to work with Windows 8. I could:
- Try a virtualization solution, but it might not work, I may not have the drivers I need and it won't be as shiny as running "on the metal."
- In fact, the Windows 8 team says this: "Our recommendation for the Consumer Preview is to run it natively on hardware if you intend to run Windows 8 on hardware when the product is final. Some of you will run virtualized environments for enterprise workloads or specialized purposes, but we strongly recommend that you experience Windows 8 on hardware, as it was designed to run for the majority of consumer experiences. "
- Sacrifice a machine I have lying around. I'll probably do that at some point, but I'd like to try it out on my actual hardware that I use all day long.
- Swap out my C: drive and use my main machine. I don't have a tool-less case, and I'm also very lazy, so, um, ya.
- Dual boot. Dual booting may feel ninja but it ALWAYS ends on tears. And sometimes blood.
- Boot on real hardware from a Virtual Hard Disk
It's that last option that is the best one, in my opinion. Windows 7 included the ability to boot windows from a Virtual Hard Disk File (.vhd). You can read more about the Windows 7 VHD boot capability and recommendations from the TechNet article here. The Windows 8 developer preview was downloaded millions of times and the word on the street is that there was a huge increase in installations in virtualized environments. I think booting to VHD is way better than installing in a truly Virtual Machine because it allows Windows 8 (and you) to really access the native hardware and shine.
Requirements (read these!)
Here's the requirements if you want to try this.
- You will need to be an Administrator on your Windows 7 system
- You will likely need at least 40gb free disk space on the volume that the VHD is going to be stored. As you're likely creating your own VHD and installing Windows 8 Consumer Preview on it, then you will need free space at least equal to the virtual disk size of the VHD that was created
- Boot VHDs need to be on an internal drive. USB drives won’t work.
- If your system has Bitlocker enabled, you need to suspend Bitlocker while editing boot settings
- More importantly, READ THE WINDOWS 8 CONSUMER PREVIEW FAQ!
Get Started
If you like doing things manually, you should directly the Windows 8 Consumer Preview ISO. I'd recommend burning Windows 8 Consumer Preview to a DVD or a USB Flash drive so you can easily install it on other machines easily. You can certainly do other ISO mounting tricks with other tools if you want to, but honestly it's just cleaner and easier to go download the Windows 8 Consumer Preview ISO and do it the regular way. There's less moving parts and all that.
From their site:
How to install Windows 8 Consumer Preview from an ISO image
The easiest way to convert an ISO file to a DVD in Windows 7 is to use Windows Disc Image Burner. On a PC running Windows XP or Windows Vista, a third-party program is required to convert an ISO file into installable media—and DVD burning software often includes this capability. One option is the USB/DVD download tool provided by the Microsoft Store. You can also download Windows 8 Consumer Preview Setup, which includes tools that allow you to create a DVD or USB flash drive from an ISO file (Windows Vista or Windows 7 required).
Take the Leap
Read the disclaimer at the top again. I don't know you and you're installing Beta software. .
Here's the general idea in broad strokes. The tiny details we'll be following are on my Guide to Installing and Booting Windows 8 off a VHD (Virtual Hard Disk).
-
First: Go Get the Windows 8 Consumer Preview Download
-
Remember: Have a lot of disk space (40gigs or more)
-
Either burn your downloaded ISO to a DVD or make bootable USB Key manually.
-
I detail making a USB key from an ISO in Step 1 on at my post, the Guide to Installing and Booting Windows 8 Developer Preview off a VHD (Virtual Hard Disk).
-
-
Create a VHD that you will attach and install Windows 8 into
-
Boot your system of your newly created Windows 8 Consumer Preview DVD or USB Key
-
Attach your VHD during the setup process
-
Select your VHD as the hard drive to install to (make very sure you know where you're installing to)
-
Reboot and pick your operating system with the new lovely Windows 8 boot manager.
Alright. Sound good? You have some bootable media (DVD/USB) all setup with Windows 8 Consumer Preview? Now head over to my original post and start at Step 2. Fun!
Covering your Tush
If you want to be super careful you can backup your Boot Manager Database to a safe place by doing this from an Administrator Command Prompt:
BCDEDIT /export c:\bcdbackup.bak
and if you totally mess things up and you want to put things back the way they were, you can
BCDEDIT /import c:\bcdbackup.bak
Then delete the VHD and and reboot your system. If any of this is scary or you don't know what you're doing, then just stop and go here now.
FAQ
But I use the LILO (LInux LOader) or GRUB (Grand Unified Bootloader).Boot loader
By running the BCDBOOT command, you’ll set the Windows Boot Manager writes the entry to the Master Boot Record (MBR) of system as the default. A system can only have one Boot manager at a time.
If you want to revert to your previous boot loader, just follow that software’s normal installation instructions.
I've heard some reports of GRUB supporting .VHD boot, but we have not tested it. You're on your own.
Can I do this on a Mac?
No. Apple MacOS uses Unified Extensible Firmware Interface (UEFI) which locks the Guid Partition Table (GPT). The GPT holds a similar position in the UEFI systems as MBR for the BIOS systems.
Why does the VHD need so much space?
VHDs are created as dynamically expanding by default, up to 40gb which get expanded to their full size when used as a boot disk. Some people like them to be even bigger.
Note: The reason why the boot VHD gets expanded to its maximum size run running is to avoid the case where the hosting volume runs out of space when it is being actively being used as a system disk. If the hosting volume does run out a space, it would result in an unexpected system reboot. The user would need to boot into an alternate OS or recovery partition to free up space on the hosting volume before he can boot into the VHD again.
Can I use some other tools to do this?
There are a number of tools that do things like bcdedit in a graphical environment. I like Bellavista which I have used on Windows 7. However, do note that I did not test or run the steps above using anything but the tools in Windows.
--
Hope this helps you have fun testing Windows 8 Consumer Preview in a safe way.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
It is actually a lot easier to setup a VHD with Powershell http://www.howtogeek.com/75286/how-to-dual-boot-windows-7-and-8-without-re-partitioning-using-vhd/
Nice guide!
Instead of creating a new VHD, I just attached my existing developer preview VHD and then reformatted it during the install process.
Also, I had the problem where the drive letter for my partition was incorrect, so it took some finagling to find the correct drive letter. On my system, its designated as the W: drive, but during the install, I had to point to F: drive. I simply ran the "select vdisk file=W:\VMs\Win8.vhd" command for each drive letter until I found the correct one.
I am actually running my main PC off a VHD because my older OS drive was having issues and I wanted an easy way to upgrade to an SSD later.
Mark - yes, I thought about that but decided (on my own) to not recommend it. When doing Beta work it's almost always just better to start from scratch.
Martin - Good point. You can also (and probably should) use [Locate]\mywin.vhd and let windows find the drive letter.
How about an article on Visual Studio 11 Beta's new UI? I really didn't like it when I first saw it but after using it I must say it has grown on me in some ways. I still don't like the CAPS LOCK WINDOW NAMES and :::::::: in the titles though. We can read lowercase much easier and faster because of the shape of the word. I think a little colour could benefit the important toolbar icons too.
The VHD option didn't work for me. Win8 just says
"We couldn't create a new partition or locate an existing one. For more information, see the setup log files"
But then it also said the exact same thing for Drive 0, Partition 2. (That's Drive D)
Does any one have an idea what's wrong?
ps: Core i7, Gigabyte UD7 motherboard, trying to boot off a USB flash drive.
I have 2 HDDs, 1 Flash drive (for ReadyBoost). So I changed the sequence of these drives in the BIOS and the installer works now.
Too bad I realized this *after* formatting one of the partitions on my main drive. No data loss though. This partition just holds game installations.
Also, why is it that when you select Windows 7 on the boot screen the computer resets and boots into Win7?
Anyway, thanks for the help Scott.
Anyway at the first reboot after install, I went right back into Win7.
When I added a new boot entry using BCDEDIT (to vhd=[F:]\... , because vhd=[H:]\... gave an error), booting to that gives "boot selection failed because a required device is inaccessible".
Ended up using the Install via powershell method and adding the boot record via bcdboot. It starts up and goes thru setting up devices etc.. but then pops up saying to reinstall windows. May not like something on my hardware but not sure. Running a ASUS P8Z68 MB
I didn't start with the ISO, I started with the download installer. If you run that straight from Windows 7 it'll do a report on things that won't work, but then when you start install, and say you want to do a custom install (not in place) it will actually create a bootable USB drive for you if that is the option you choose, right from the installer.
After that, your instructions worked fine, and I installed successfully on two machines. Very nice.
that was a great tip, thanks!
I moved the VHD to c: and it works now. No BSOD for me. The previously used disk is on a dynamic volume (mirror managed by Windows) and that might have been the problem. Anything special about your c: or your BIOS?
I actually navigated off :P
I'm having the same issue as Thomas and Kaiz. If I put the vhd on any drive other than C, at the end of the install it says "could not configure the computer's boot configuration" and install fails. I then proceeded to mount a 60 empty partition into a folder in C:. I created the vhd in that folder. I installed to that vhd and install succeeded. However, at boot, Win 8 just BSOD saying something like "loader.exe could not be found". I don't have the option of simply putting the vhd on the C: partition as it doesn't have enough free space. [I could install into the empty physical partition I have, but I intend to install it to a vhd.]
Any pointers? Also, you mention locate - where would this be used and how?
Can I do this on a Mac?
No. Apple MacOS uses Unified Extensible Firmware Interface (UEFI) which locks the Guid Partition Table (GPT). The GPT holds a similar position in the UEFI systems as MBR for the BIOS systems.
Why do you think so? Mac has BootCamp and Mac UEFI can chain the Windows bootloader.
The only hard part would be updating the bootloader from Windows 7 to Windows 8 without actually installing Windows 8. Any ideas here? Then I'd just create Windows 8 VHD on my PC, copy it to Mac and "attach" to the BCD.
Someone please talk me out of this.
I just finished a blog post on installing Windows 8 on an existing VHD, I hope it's helpful!
Aside from a problem with bootcamp setup not wanting to start everything went fine.
Running bcdboot.exe W:\Windows under Windows 7 32bit somehow successfully managed to update the main bootloader from the VHD Windows 8 64bit install. Cool. I thought it would only add 8 to the 7's OS list.
Where can you set boot options to always appear on boot up? Mine always goes straight to default (Win7)
Just learned now (by reading the comments) that you can do this [Locate]\win8.vhd Anyway, I found the correct partition through the LIST command inside diskpart. This is fun!
6 - To try it as a main OS on a clean HDD
so what is your opinion on this? Is Win8 NTFS/filesystem layer somewhat dangerous to rely on (to repartition/format drives) to be used as a main machine OS with projects on? (I'm planning to transfer 750GB of data to a HDD where my win8 will be as the only OS)
I just need to run VS2010 for work (together with say 10-20 other smaller tools and one big framework) - so I'm not building entertaining-home-centre-machine with not-compatibile stuff appz - just MS tools on great Intel rig.
I'm betting I'm safe to use it as main OS - but I'm welcoming your take on this and would try VHD _only_ if it would bring me:
- only the system is on VHD (max 40GB), but I can access all my other partitions (I have 1GB in notebook) with projects/resources formatted by robust Win7SP1 without any danger, reading and even writing on them.
Then it would make sense for me to do a VHD option, as just the 40GB file on one of my partition would be dedicated, all the rest of the HDD would be 'untouched'.
Re-partitioned/formatted by Win7 OS which I used safely for 2 years, with ability to recover/chkdsk them from win7 if win8 would screw something up.
thank you for your answer, just don't tell me to do backup please:)
Otherwise I can't consider VHD as an main OS option.
Would the RTM version support installing to a partition on a dynamic disk? While I'm happy to use the consumer preview as my main machine, I can think of many scenarios where I would want to install to a separate partition or vhd.
When trying to 'select vdisk' my drive letters were also renumbered so I got "the system cannot find the path specified", but I just exited DISKPART, and went through each drive letter running 'DIR' until I found the right one. I didn't know about [locate] but will keep that in mind for the future.
Thanks Scott!
1. Whats the easiest/best way to remove Windows 8 after I'm finished playing with it? If I delete the VHD, will this screw up my boot menu?
2. Has anyone used this method to install Win8 on a Mac? I am trying to triple boot but I am unable to since the MBR is limited to 4 primary partitions. My partitions are 1)EFI 2) Lion 3) Lion Recovery 4) Win7. When I try to install Win8 to my 5th partition, Windows install says I cannot install that that partition due the the MBR limit. Will using a VHD get around this and solve my issue?
3. What kind of performance difference can I expect from using a VHD versus a "real" partition or HD?
Thank in advance!
http://jeffgraves.me/2012/03/09/running-windows-8-server-from-a-usb-flash-drive-with-phison-controller/
I got the dreaded VHD_BOOT_INITIALIZATION_FAILED BSOD after the install. Seeing a couple of comments suggesting this might be a problem, I moved the VHD to a basic volume, edited the boot settings (BCDEDIT /set device and osdevice to the new location) and rebooted. Magic, the install completed.
@Zubair Ahmed - I've been digging PowerShell recently and the link you provided really helped me out. I've had the hardest time getting my EVGA motherboard to boot from USB, but using PowerShell to install Windows 8 to the VHD was awesome.
-Chad
Sorry for opening an old thread.
Craig
I was honestly looking forward to this possibility, but it didn't work. :(
I could not boot to Windows 8, and it messed to boot records, so I had to repair it to be able to boot back to Windows 7.
The following is a little detailed, but as you're 'the man' at MSFT who loves VHD boot I thought I'd flick the issue your way...
I love VHD boot and have used it many, many times without issue and would consider myself well beyond novice level (I do it with my eyes closed).
However, I seem to be having an issue with the Release Preview of Window 8.
I have gotten as far as attaching my VHD, (on certain attempts I also use DISKPART to create and format the volume and assign a drive letter), selecting the attached drive to install Windows into, and starting the install.
Every attempt ends with the same result. The 'Copying Windows files' step executes in roughly 5 seconds, but the 2nd step (I believe it's "Installing files") gets to 3% before the install crashes, saying that not all of the needed files are available on the installation media and that I should check the install media and try again.
So here are the weird things to note:
1. I installed both the Developer Preview and Consumer Preview to VHD using the same process and had no issues.
2. When using the same install media on the same box I have no issues installing direct to the hard-drive, i.e. not a VHD.
3. I set my VHD to type=expandable and maximum=92160 (expanding VHD to 90GB for those not used to DISKPART). I notice however that after the Windows 8 install crashes, my VHD has been expanded to something like 230ish GB, which is around 99% of my SSD in my machine (modded ASUS EP121 tablet PC). I then have to delete the VHD to reclaim my disk space. This happens even if I make sure the disk is already fully expanded before selecting it as the disk to install to, and it only happens after the installation starts writing files.
Has anyone else had a problem like this? Have you tried to install the Release Preview to a VHD? And why on earth would my VHD be expanded to well beyond the maximum size specified when it was created?
For now I have installed direct to disk, and will attempt to migrate the disk to a VHD, but any info or advise you could furnish would be well received.
Thanks,
Paul.
Is there any way to install Visual Studio 11 Web Express on Windows 8 Consumer Preview?
I searched a lot and apparently I have to install Windows 8 Release preview instead of Consumer preview, I don't understand what's difference?
I'm getting this error when I try to install VS11 Web Express:
The .Net Framework installed on this machine does not meet the minimum required version: 4.5.50709.
and When I check this registry key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full]
Version Value is:
"Version"="4.5.50501"
In one of your blog entries from a while back, you "pulled a number out of your butt" of 3-5% of a performance hit when booting off a VHD for the fact that the hard drive was virtualized but all of the other hardware was not (i.e., non-virtualized). I'm just curious if you think this estimate is still accurate...
I just installed Windows 8 Pro (first 32-bit as an upgrade from XP, then 64-bit in VirtualBox, then 64-bit as a VHD, then finally 64-bit "bare metal" upgrade from Win7). When I booted off the VHD and ran VS2012 + the Windows Phone 8 emulator, the emulator startup time was in the range of minutes (versus seconds running bare metal). After startup, however, the emulator performed pretty well.
After moving away from VHD to bare metal, VS2012 and especially the WP8 emulator are much faster (much more than 3-5%...) Is the WP8 emulator just incredibly HD I/O intensive, or is it possible the performance hit from booting/running from a VHD is actually far greater than you'd originally estimated.
Just curious!
--jp/cwe
Already have Windows 8 running on vhd drive. Now that Windows 8.1 has been (preview) released, I wish to upgrade BUT the setup will not allow. Do you know if I can upgrade the vhd by booting from the .iso and pointing the installation to the existing vhd drive?
Thanks in advance
David Gauthier
Comments are closed.
I want to help myself and others, fyi I installed windows 8 dev preview as full installation on Host machine and NOT as VM which I reverted later :P
Now I want to understand, when you say "Boot from VHD" do you say that my HOST computer will be booting? Or its a virtual machine which will boot this vhd just like any typical VM works?
Thanks