Boot to VHD – dual booting Windows 7 and Windows 8 became easy

When Windows 8 arrived, quite a few people decided that they would still dual boot their machines, and instead of mucking about with resizing disk partitions to free up space for Windows 8 they decided to use the boot from VHD feature to create a huge hard disc image into which Windows 8 could be installed. Scott Hanselman wrote this installation guide, while I myself used the installation guide from Ed Bott of ZD net fame.

Boot to VHD is a great solution, it achieves a dual boot, can be backed up easily and had virtually no effect on the original Windows 7 partition. As a developer who has dual booted Windows operating systems for years, hacking boot.ini files, the boot to VHD was a much easier solution.

Upgrade to Windows 8.1 – ah, you can’t do that on a virtual disk installation (boot to VHD)

Last week the final version of Windows 8.1 arrived, and I went into the Windows Store to upgrade. Luckily I’m on a fast download service, and use an SSD, because once the upgrade was downloaded and prepared Windows informed that This PC can’t run Windows 8.1, and provided the reason, You can’t install Windows on a virtual drive. You can see an image of the message and discussion that sparked my search for a solution in this Microsoft Technet forum post.

I was determined not to have to resize partitions yet again and fiddle with VHD to disk utilities and back again, and in the end I did succeed in upgrading to a Windows 8.1 boot to VHD partition. It takes quite a bit of effort though …

tldr; Simple steps of how you upgrade

Boot into Windows 7 – make a copy of your Windows 8 VHD, to become Windows 8.1

Enable Hyper-V in your Windows 8 (the original boot to VHD partition)

Create a new virtual machine, attaching the copy of your Windows 8 VHD

Start the virtual machine, upgrade it via the Windows Store to Windows 8.1

Shutdown the virtual machine

Boot into Windows 7 – use the bcedit tool to create a new Windows 8.1 boot to VHD option (pointing at the copy)

Boot into the new Windows 8.1 option

Reactivate Windows 8.1 (it will have become deactivated by running under Hyper-V)

Remove the original Windows 8 VHD, and in Windows 7 use bcedit to remove it from the boot menu

Things you’ll need

A system that can run Hyper-V under Windows 8 (Intel i5, i7 class CPU)

Enough space to have your original Windows 8 boot to VHD and a copy at the same time

An ISO or DVD for Windows 8 to create a bootable Windows 8 partition

Step by step guide

Boot to your base o/s, the real one, Windows 7.

Make a copy of the Windows 8 VHD file that you use to boot Windows 8 (via boot from VHD) – I copied it from a folder on C: called VHD-Win8 to VHD-Win8.1 on my N: drive.

Reboot your system into Windows 8, and enable Hyper-V if not already present (this may require reboot)

Use the Hyper-V manager , create a new Hyper-V machine, using half your system memory, and use the option to attach an existing VHD on the main IDE controller – this will be the new copy you made in Step 2.

Start the virtual machine, use Connect to view it, and you’ll probably discover it cannot boot as there is no boot record

If this is the case, go to Hyper-V manager, edit the Settings for the virtual machine to attach an ISO of a Windows 8 DVD to the second IDE controller.

Start the virtual machine, use Connect to view it, and it should now attempt a fresh installation of Windows 8. You should select Advanced Options and choose Repair - this will make VHD bootable

When the setup reboots your virtual machine, turn off the virtual machine, and remove the ISO of the Windows 8 DVD from the virtual machine settings.

Start virtual machine, use Connect to view it. You will see the devices to be re-discovered (including your quad CPU becoming single CPU). Eventually you should see the Windows Login screen.

You may notice that your desktop background (Win+D) will have turned black as your Windows installation has become deactivate due to the hardware changes between your real PC and Hyper-V.

Fortunately becoming deactivated, does not stop you using the Windows Store, where you can select the update to Windows 8.1.

You can now watch the progress joy of the Windows 8 update;

downloading,

preparing to update,

checking compatibility,

gathering info,

preparing to restart, and finally,

confirm restart - remember that you are restarting your virtual machine sitting on the copy of the VHD, not the Windows 8 boot to VHD you are currently using to run Hyper-V (confused yet?)

After the reboot you get the real upgrade messages;

setting up x%, xx%, (quite slow)

After a while, Getting ready

Applying PC Settings x%, xx% (really slow)

Updating your system (fast)

Setting up a few more things x%, (quite slow)

Getting ready, again

Accept license terms

Express settings

Confirmed previous password

Next, I had to set up a Microsoft account – which is possibly now required, and not optional

Blank screen, HI .. We're setting up things for you (similar to original Windows 8 install)

'You can get new apps from the Store', below which is ’Installing your apps’ - I had Windows Media Center which is counts as an app from the Store

‘Taking care of a few things’, below which is ‘Installing your apps’

‘Taking care of a few things’, below ‘Don't turn off your PC’

‘Getting your apps ready’, below ‘Don't turn off your PC’

‘Almost ready’, below ‘Don't turn off your PC’

… finally, we get the Windows 8.1 start menu, and a quick Win+D to check the desktop confirmed all the application icons I expected, pinned items on the taskbar, and one app moaning about a missing drive

At this point the upgrade is complete – you can shutdown the virtual machine

Reboot from the original Windows 8 and return to Windows 7 to configure booting to the Windows 8.1 copy of the VHD

You will have to suffer one final reboots, choose 'Windows 8.1' and you can now login to a lovely Windows 8.1 start screen running on non virtualized hardware via boot to VHD

After checking everything is running fine, you can now choose to Activate Windows, which for me was a toll free phone call to the automated system where you type in lots of numbers to be given a whole bunch of new activation codes.

Once you’re happy with your new Windows 8.1 boot to VHD, and no longer need the Windows 8 boot to VHD, feel free to delete the old one. I do believe once you upgrade, you are no longer licensed to use it anyway.

There, that was simple wasn’t it?

Looking at the huge list of steps it took to perform this upgrade, you may wonder whether I think this is worth it. Well, I think it is worth booting to VHD. It makes backups a snap (go to Windows 7, copy the VHD, you backed up the o/s) and helps with disk management – want to move the o/s, you can move the VHD and repoint the boot menu to the new location.

The downside is that Microsoft has complete neglected to support boot to VHD as an upgradable option. Quite a poor decision in my opinion, and if you read twitter and the forums quite a few people agree with that view. It’s a shame this got missed in the work on creating the upgrade packages for Windows 8.1.

In your method, it is a problem: HYPER-V don't run on windows standard ( NO Pro) .

But the problem is : how to avoid that win 8 start on the virtual box.

What dou you think about this sulution :

"I have a duel boot Windows 7 and Windows 8 PC so to get around this issue I did the following.

Booted into Windows 7 and mounted the VHD containing my Windows 8 OS then created a 50GB partition on one of my drives.

I then used Norton Ghost to do a disk image of the mounted VHD to the new partition, rebooted and used NeoSmart Easy BCD to detect the Windows 8 install on the new partition and create a boot entry.

Rebooted and selected the Windows 8 OS on the new partition, ran the update from the store, booted back into Windows 7 mounted the VHD containing the Windows 8 OS (I could have created a new VHD) and then used Norton Ghost to image the 50GB partition containing the updated Windows 8.1 to the mounted VHD.

Rebooted and selected the original boot entry for Windows 8 and the VHD now containing Windows 8.1 booted fine.

Deleted the 50GB partition, and removed the boot entry pointing to the partition.

This whole process took less than an hour and the OS did not need reactivating as it all took place on the same hardware."

@Pierre - sounds like a fine solution that avoids the reactivation - I just didn't have Norton Ghost, but did have Windows 8 Professional (it was from a Microsoft Partner Action Pack). I like the fact that there was no reactivating, that is very boring.

@diceccac That's really bizarre, that the type of license has when the Windows 8 VHD was mounted inside of Hyper-V. I can't see why Hyper-V would make any difference.

Are you sure that if you run 'slmgr.vbs /dli' in the Windows 8 boot from VHD partition, the license is different from that same command run under Hyper-V?

You can enter a new product key - that probably activates immediately. In the system properties page (Win key + Pause/Break, or Control Panel->System and Security->System) there is a link called 'Change Product Key' which allows you to switch a license.

I was very happy seeing that updating on a VHD is possible. But, helas, at point 10 you lost me, because scanning for new hardware he didnot find a NIC. So point 11 was not possible. Beeing not to familiar with VM's I had some trouble finding how to add new hardware(the NIC) and a virtuale networkswitch, but I managed. But now I having a 169 network adress, and even forcing it to my normal 192.168. range does not help to make the connection to my network. do you have a suggestion. I am now stuck in the middle of nowhere.Thanxs for given it some attention.

Is it necessary to copy the VDH to other drive than c:\?my original vdh is stored in c:\. when i have to make a copy, can i move it Documents and rename it to win8.1.vdh and then proceed with your steps from step#3?

This is a great write-up. One thing to know; for those using Server 2012 and want or need to upgrade to 2012 R2, then the Recovery option is a bit different. When you boot off of your Server 2012 ISO and go into Recovery, and select Advanced Options, you the option to Recover PC is not available. Instead, click on the Command Prompt button. You will then be taken to a command prompt, and should be X:\Sources. CD into Recovery and execute StartRec.exe. Once it finishes, remove the ISO and reboot the VM. The VHD should then be bootable for you.

Works. I upgraded to 8.1 but now hibernate will not work. It is worth upwards of 100 steps if that is what it takes -- any help? I realize hibernate isn't supposed to be available on VHD, but I had it on 8.0 that was upgraded.