Hello,
In my current project, I was having a Hyper-V R2 server box to play with and test various options and code with virtual machines. I recently learned the office I work in will be reassigned to someone else. That means loosing the Hyper-V box in a near future.
So, in addition to one of the project question (automate boot from VHD for SQL servers machines), I decided to give it a look and attention.
That’s pretty cool, once it works, but it’s less simple than it looks to set it up: the Windows 7 boot system is much more complicated and sensitive than the legacy one (Windows XP and previous). On the other hand, it is what enables the boot from VHD.
So here are my few learning:
Now that the references are set, my real life problem, and how I solved it:
How I had it to work?
Simple, when you know the right sequence and why …. which needed few hours of work by the way.
You now need to boot on this VHD and add an entry in your BCD store:
at the first OS reboot, you’ll must likely end with your previous OS started….. normal the setup don’t really get what you try to do here.
To solve this, logon to the “previous” OS. Don’t panic, everything is here. You just need to explain to Windows boot how to handle this.
Once logged in, launch a command prompt with administrator privilege
type: “bcdedit /copy {default} /d "Whatever new name you want for this new boot entry" “. The system will answer back with a {GUID}.
copy this GUID and type:
bcdedit /set {GUID} device vhd=[C:]\2008R2-HVC.vhd
bcdedit /set {GUID} osdevice vhd=[C:]\2008R2-HVC.vhd
NOTE: Here, the drive letter used MUST BE the one seen by the “previous OS”: in my case C:
Reboot, select the new entry and finish your new OS booted from a VHD setup!
That sounds simple, but there are 2/3 tricks to have in mind to make it a full success.
Last 2 notes, then I 'am done with this topic:
Enjoy
< Emmanuel />