We provide solutions customized to the needs of your industry. Whatever your industry or product, we can provide project, service, process, and content management solutions—to increase productivity and IT value.

As an IT systems integrator, our expertise is putting all the pieces together to get the job done, so we never have to take “no” for an answer. We help organizations improve business productivity in any department.

We are experts on the entire Microsoft enterprise product stack. These are Microsoft technologies we regularly deploy. We provide real business value through strategic guidance, technical expertise, and knowledge transfer.

+1 (866) 930-8356
Concurreny
Real Microsoft expertise. Real business value.

Dual Boot Windows 8 from VHD using Windows Setup

UPDATE: I’ve added information about the new Consumer Preview build as well as how to Remove the Dual-Boot option when you’re done testing it.  This process does work with the Final / RTM of Windows 8 as well.

Are you running Windows 7 and have things just the wayyou like them, but you’re really curious to see how Windows 8 looks and feels? Using this method, you can boot your computer between your existing Windows 7 installation or Windows 8 without needing to sacrifice disk space! Using a Dynamic Virtual Hard Disk (VHD), you can install Windows 8 to a single file that is stored on your Windows 7 file system, and then boot directly from that Virtual Hard Disk.  This lets you choose to load either your existing OS or the new Windows 8 at boot time. You are not doing an in-place upgrade and you are not doing a rebuild. It’s just a new install of Windows 8 and you don’t have to trash your existing setup to do it.

A couple notes before getting started…

  • If you are using BitLocker on your windows 7 Computer, do not create the Windows 8 VHD on your BitLocker encrypted volume.  If all of your drives are encrypted, then you won’t be able to use Boot from VHD.  Pausing BitLocker Encryption is not a workaround.
  • If you are using Windows XP as your current operating system, you cannot Boot from VHD, so this method of Dual-Booting is not available to you.  You can only (officially) use this on an existing Windows 7 or Windows 2008 R2 computer.
  • When making the VHD, make sure the “maximum size” that you specify is less than the actual size of your disk.  For example, if you have a 60GB SSD drive, make sure the VHD Max size is less than 60GB and not the 100GB I use in the example below.

Let’s get started!  If you haven’t already, download Windows 8 here and browse the BuildWindows.com web site.

On the computer which already has Windows 7 installed, boot from the Windows 8 media and you’ll launch the installer. Before clicking “Install Now”, hit Shift+F10 and the WinPE command prompt will appear.

Note: If you want to boot from USB instead of burning a DVD, you can use the very handy WUDT tool from CodePlex which will make a bootable USB stick from the ISO for you.

It’s time to create the VHD that will be your Windows 8 drive. Run “diskpart” from the CMD window, then issue the following commands to diskpart:

  1. list disk … This shows your currently attached hard disks. In this example I only have one, Disk 0.
  2. select disk 0 … You want to select the disk where you’re current operating system (Windows 7) is installed, so if you have multiple disks available, you might use a different number.
  3. list vol … Show all the volumes that exist on that disk. Existing installations of Windows 7 will usually have a 100MB volume that is the “System Reserved” partition (used as the boot loader and leveraged by BitLocker) and then the actual OS volume is much larger. In example you can see my Windows 7 volume is actually assigned to letter D (although when booting normally it would be my C: drive).
  4. create vdisk file=d:Windows8.vhd maximum=100000 type=expandable … This creates a Dynamic VHD that can grow to ~100GB in the root of my Windows 7 partition.  If your hard drive is smaller than 100GB then be sure to use a smaller value for maximum that is less than your actual disk size.
  5. select vdisk file=d:Windows8.vhd … after selecting this vdisk, the following commands will apply to it
  6. attach vdisk … The VHD will be mounted and the disk will be available to the windows installer
  7. exit … we’re done with diskpart

All those commands will look like this:

Now you can close the Command Prompt and return to the Install Windows wizard and click Install Now. When asked where you want to install Windows, you should see a new Disk 1 listed with Unallocated Space. You’ll notice that when you select this disk the installer will tell you that “Windows cannot be installed to this disk” but the Next button is enabled. If you click Next, it will in fact install Windows there just fine.

Once the installation is complete and your computer reboots, you will see a new boot loader that asks you to “Choose an operating system” and you can select either the new install of Windows 8 or your previously existing OS. The first time this appears you get about 3 seconds and it auto loads Windows 8 to finish the setup. On subsequent reboots it’ll give you 30 seconds before auto selecting it.

Now you can browse around Windows 8 on your Native hardware! You can also still access files on your Windows 7 disk. Open Explorer and you’ll see it appear as a different drive letter (D: in this case) and you can browse around and copy/modify files as you wish.

Notice that the D: looks full? This is because the VHD you created for Windows 8 is reporting its maximum size instead of its actual size. When you boot into Windows 7 you’ll see the VHD is actually only about 8GB.

Are you all done with Windows 8 and can’t figure out how to shut down? Take your mouse and hover over the start button, or touch your mouse cursor to the bottom left corner of the screen and a small start menu will appear. Click on Settings, then Power and choose Shutdown.

Now you can enjoy the best of both worlds…N’joy!

UPDATE: Windows 8 Beta

Microsoft released the Consumer Preview build of Windows 8 and I am happy to tell you that the instructions above work exactly the same.  I expect it will continue to work with all future builds of Windows 8 as well.

The boot screen is a little different now in display but it otherwise works like the Developer Preview.

One other note, the option to Shutdown in beta is no longer on a Windows button on the left.  Instead bump the bottom right corner of the screen and you’ll see a new Settings side bar where Power -> Shutdown can be found.

UPDATE: How do you remove the Dual Boot option when you’re done with it?

Removing the Windows 8 Dual-Boot option is pretty straight forward.  Just boot into your Windows 7 OS and start MSConfig.exe.  From there, select the instance of Windows 8 and click Delete.  Make sure you do this from the OS that is installed on the disk and not the VHD!

After you delete it and reboot, you can delete the Windows8.vhd file.

 
 

Infrastructure Architect and Server Team Lead at Concurrency. Shannon is an MVP in Forefront and Enterprise Security, MCSE in Private Cloud and MCSA Windows Server 2012. He's also a self-professed media junkie. Just ask him about MediaCenter!

Find Shannon on: Linkedin

 
  • Dan

    I suspect Windows 7 is not needed. As your screenshots show, all the VHD stuff is done inside the Windows 8 installer, and the Windows 8 bootloader appears to handle the boot process.

  • http://www.linkedin.com/in/nathanlasnoski Nathan Lasnoski

    Awesome post Shannon!

  • http://YourWebsite Robin

    Will this work on a Windows XP machine as well?

  • http://ximplosionx.com Patrick Godwin

    My understanding is that Boot to VHD does not work on systems earlier than Windows 7. At least, that’s what I remember Scott Hanselman saying. The host OS has to be Windows 7. Am I correct?

  • http://YourWebsite Ryan

    been putting off installing windows 8 for fears of messing up my 7 install but this seems a lot safer! I presume if I ever wanna get rid of the dev preview I can just use windows 7 recovery to fix the startup and delete the vhd?

  • Jose

    Nice post! There is a way to back to my original Win 7 boot (without OS propmt)?

    Thanks

  • http://YourWebsite Ryan

    @Jose Boot up your windows 7 installation disk and when the option appears click recovery or similar and select ‘startup repair’ and follow the directions :)

  • http://YourWebsite Jesse

    The Experience index rating will not work on a VHD

  • http://blogs.msdn.com/briankel Brian Keller

    @Patrik, @Robin, it doesn’t matter what O/S you have installed currently. And there’s no such thing as a “host O/S” in this scenario. A lot of people confuse boot-to-VHD with virtual machines. Boot-to-VHD is simply a replacement for the traditional partition-based disk layout system.

    But it is accurate to say that boot-to-VHD is only enabled on Windows Server 2008 R2, Windows 7, and (now) Windows 8. This is because of the boot logic for these O/S’s and (oversimplifying here a bit) the fact that they know how to look for VHD files to boot into.

  • http://YourWebsite Serge Meeuwsen

    A word of caution is you have a bitlocker protected drive…
    I thought that suspension of bitlocker (which keeps encryption but makes your drive accessible by using plain text keys) would be sufficient. However, it turns out it is not and I screwed up the boot loader process. When I booted, I got a Windows Recovery screen asking me to repair my installation because it couldn’t find winload.exe(not 100% sure of the name as I didn’t write it down). Choosing the ‘boot other OS’ option also didn’t work as it needed me to log in with an account for which it only gave me 2 options (the _vmwareuser_ account and the updatususer account) neither of which I ever use (or knew existed in the case of updatususer), let alone know the password for.
    I was able to salvage the situation by booting from the WDP CD again and attach the vdisk (in diskpart) and then choosing repair (at the bottom) instead of Install. I then came into the WDP environment and was able to change the default OS from WDP back to Windows 7. After that Windows 7 was back in business.

    I’m now decrypting my HD. And will then try again.

    I hope this can save someone else some heartache.
    Cheers

    • http://www.linkedin.com/in/shannonfritz Shannon Fritz

      That’s a good point, thanks Serge. I’ve updated the guide to include this tip.

  • http://YourWebsite Mute Man

    Worked brilliantly for me on my New Ep121 SLATE, SIMPLY IDENTIFY WHAT DISK DRIVE AND VOLUME and choose that as your vhd option on your existing Os directory.
    Anyway thanks a nice step by step guilds.

  • http://YourWebsite Jose

    @Ryan Thanks!

  • http://samgentile.com/web/ Sam Gentile

    I tried all weekend to install Win8 but couldn’t untill I came upon your excellent tutorial. I got it installed but on the reboot I get VHD_BOOT_INITIALIZATION FAILED

  • Random11

    Whole it be possible to do this and boot into windows 7 and create a virtual machine with the VHS that is created in the install process. So that you can run windows 8 natively when you want AND virtually when you want

    • http://www.linkedin.com/in/shannonfritz Shannon Fritz

      I suppose that could be possible, but it would be like taking a hard drive out of your physical computer and attaching it to a different computer with new hardware. The OS would need to detect the new hardware and then install the drivers.

  • Pingback: Installing Windows 8 on VMWare Workstation 8.0 | Adam Roderick blog

  • http://YourWebsite Juraj

    oh shi- … i’ve formatted wrong disk. all my data is gone :/

    next time i’ve to look first

  • http://itcookbook.net Bryan

    I’ve learned two things about the process – and I’m not done with it yet:

    1) The 64bit Win8 Developer Preview with dev tools has an install.wim file which is 4.2GB in size. Normal fat32 volumes can’t write a file that big. So I needed to be sure to format my USB stick as NTFS.

    2) You cannot create .vhd volumes on an NTFS disk that has the ‘Compress this drive to save disk space’ option checked. (I am hoping to put my vhd on my D: drive, which is spinning disk – my C: drive is SSD and does not have room for this thing).

    I will tag up with any other lessons I learn.

  • http://YourWebsite Jeegnesh Kothari

    I have some doubt about the line “On the computer which already has Windows 7 installed, boot from the Windows 8 media and you’ll launch the installer.” I am not sure how can I boot from Windows 8 media. I have downloaded the .iso file for Windows 8 Developer Preview and it is lying on C:drive. After downloading do I need to do anything with the .iso file. If someone can explain this in detail, I would highly appreciate. Thanks in advance.

  • Pingback: Windows 7 e Windows 8 in dual boot « SQLServerITA

  • http://YourWebsite Mena

    would this work on a dynamik harddisk ? i tried but got VHD_Boot_initializing_Failure

  • http://YourWebsite FretzCapo

    Excellent guide! I created the USB boot disk and installed on my HP EliteBook 2740p step by step without a problem. Thanks very much and great job!!

  • http://YourWebsite wrayc

    From my experience:

    Installed the vhd windows 8 to laptop dual booting win 7 ultimate and Bodhi linux.

    I knew already of the win 8 conflicts with Linux and expected it. So this was more of an experiment.

    I simply wanted to see how “reversible” it was … thus far … no joy.

    Yes win 8 boots runs fine with win 7 etc. … we already knew this.

    First: I attempted to simply repair win 7 startup with the win 7 install disk before deleting the vdisk file but simply got response of no problems found and rebooted back into win 7/8 dual boot.

    Second: rather than delete the vdisk file I simply renamed it … just in case then shut down and attempt reboot… with expected errors. Attempted again repair of win7 bootloader with same result: “no problems found” and reboots to error screen.

    Third: booted into Linux with live cd and renamed the Vdisk file back to original and rebooted successfully to win7/8 dual boot.

    Obviously still locked out of Bodhi linux… but just heads up. This is NOT reversed by simply deleting/renaming vdisk file and attempting to restore the bootloader using win 7 install disk.

    Also, I attempted to detach the vdisk under win 7 disk management , but it wasn’t visible.

  • Pingback: Frage: Windows 8 in eine VHD installieren? - Windows 8 allgemein

  • Pingback: vhd_boot_initialization_failed

  • http://YourWebsite Daniel

    Thank you for this guide.
    I followed it to a T but when I restart I don’t get the new CHOOSE OPERATING screen like you have above! *sad face*

    I’ve tried this many times and have been frustrated that it’s not working for me!

    For me to be able to get back into Windows 8 I have to put the cd in and it boots from that!!!!!

    Running Windows 7 Ultimate x64

    Thanks for your help.

    God Bless

  • racerxtc

    How does one go about uninstalling the OS when finished with it?

  • http://YourWebsite wrayc

    I can now triple boot between windows 7 & 8 as well as linux

    after changing default boot to windows 7

    I had previously added linux to the win 7 bootloader with easy bcd

  • Cleiton

    If lately, I try to de-attach the VHD where is the W8DP, this will crash the boot? Or the 7 boot will return as before the W8DP VHD installation?

    Thanks friend, sorry the typos ;-)

  • http://YourWebsite Mohammad

    I have a problem — I did everything you did and I am able to access windows 8 and seven but only if I boot windows 8 from the installation disk were it says … – chose another operating system – windows developer preview -and then it boots and gives me windows 8 but when I don’t ask for the DVD to boot windows 8 for me it fails and gives me the error; 0xc000000e

    PS: my VHD is on an external drive that works fine when using it. (even when using an operating system on it )

    Conclusion is that I have to go through using my cd to use windows 8 and I don’t want to do that every time I want to run windows 8 please help.

  • Mohammad

    And just to explain it easier… I can’t load windows developer preview like I can access windows 7

  • http://YourWebsite Mohammad

    @racerxtc

    Just go onto a separate os and format your vhd

  • http://YourWebsite Mohammad

    Never mind it takes a few days for it to go normal it’s all okay

  • Pingback: Best OS for gaming dual booting on an iMac?

  • http://YourWebsite mario

    Hei, great text!

    Is it possible to add Linux machines this way as well?
    I would like to test CentOS 6 and the linux mint …

    Mario

  • Pingback: Your Questions About Xbox 360 4gb With Kinect | XBOX 360 & Stuff

  • Pingback: Windows 7, Windows 8, and Linux » robgillen.blog()

  • Pingback: Hello from 8 - Page 2

  • http://www.ferienhaus29.de ferienhaus bretagne

    awesome method, good to know how to dual boot that way, thanks a lot

    regards from the brittany

  • Anno Domini

    Make sure you specify not to put more than the amount of FREE SPACE on your harddrive, not total. I tried putting 100GB while I have a 350GB HDD with 56GB free, and it gave me an error upon restarting claiming that my volume was too large.

    Otherwise great tutorial!

  • Pingback: Hate to say it but Windows 7 sucks in my experience - Page 39

  • Pingback: Fix Windows Vista’s bootloader Dual Boot with Mac OS X Leopa | My PC World

  • http://YourWebsite Adeel

    Problem!!
    I installed W8 on my laptop using same procedure and it’s running perfectly both windows 7 and 8, after a few days my W7 is creating problem and it isn’t startup same time W8 is also disabled in boot option
    Ex: Select which windows
    1- W7
    2- W8
    these option isn’t display in boot time for solving this issue I reinstalled my W7 and now my W8.vhd file is present in another partition and it’s also shows allocated space 10.5GB. Please tell me a solution how to restore my w8.vhd file and my laptop shows two option at boot time.

    Thanks

  • http://YourWebsite parry rana

    what if after dual booting window 7 with window 8 i just format the window 7 system partition …..will then window 8 will work stand alone

  • http://YourWebsite Ramon

    Hi!

    It worked really great. Except, is there a way to put the vhd file on my C drive instead?

    Plus, how do I “uninstall” or undo all this stuff if I wanted to. I don’t just delete the vhd file do I?

    Thanks for the tutorials!

  • Mike

    I followed these steps exactly but could not get it to work so I have given up. My problem now is now every time I restart my computer it tells me in a blue Windows 8 type screen that windows needs to be repaired and to hit F8 or F9 to boot from another OS which then lets me boot into Windows 7. How do I get rid of this screen so I can go back to how my computer booted before?

  • Wainer

    Hi Shannon, first I would like to thank you about this great tip! I used sucessfully in my Windows 7 notebook.
    You would explain to me how can I update the VHD to Windows 8 Consumer Preview? I tried…

    Regards,

    Wainer

  • http://YourWebsite Wally Morris

    OK. I’ve tried Windows 8 and now want to get rid of it on my computer. How do I do that?

  • http://YourWebsite sudhanshu

    hi shannon !
    Nice guide, at least the only guide that made me at least install W8 preview but alas it ended un in error just before finish.
    and said “setup got an error” and all the changes made will be deleted!

    Help ?
    thanks genius!

  • http://YourWebsite arnold

    It works perfect for me
    alternatively you can try this video

    http://technet.microsoft.com/en-us/windows/dd758779

    use sourcesinstall.wim file from windows 8 consumer preview iso file
    it works perfect for me.

  • Pingback: Dual Boot Win 8 from VHD

  • Pingback: Windows 8 Dev Camps in a City Near You « The Good, the Bad and the Mobile

  • http://YourWebsite Oskar

    Will it work if I create VHD from W7 Diskmanagment and then boot through Windows 8 DVD?

  • Dave

    Step 4 in setting up the VHD is missing the in the “file=d:Windows8.vhd”
    The pathname for a virtual disk must be fully qualified.

    • http://www.linkedin.com/in/shannonfritz Shannon Fritz

      Thanks Dave, I am not sure how those slashes went missing but you are right and I’ve corrected it. Step 5 as also missing a slash…

  • http://www.nikoo28.blogspot.com nikoo28

    Using this method of installing windows 8, will it result in a slower performance of the system since I am using a VHD..?? Please enlighten me…

  • Nikola

    I did everything about making VHD file. But when selecting vhd drive (Disk 1 Unallocated Space) i get message that can not be installed because: “Windows can not be installed to this disk. this computer’s hardware may not support booting to this disk. ensure that the disk’s controller is enabled in the computer’s BIOS many”. I have Win7 at the present

  • Azzu

    hi…. i followed every step specified by u. every thing went fine. but at the final step of installation i m getting a error ‘windows could not update the computers boot configuration installation cannot proceed’ pls guide me

  • azzu

    hi….. i did every thing u specified…. every thing went fine but during the final stage of installation i m getting an error ‘windows could not update the computers boot configuration installation cannot proceed’ pls guide me

Categories