Creating a bootable VHD the easy way…continued
You might have read and tried the scripts from my first blog about creating a bootable vhd here, and in this blog post I’ll continue where I left with some information about my usage of difference discs and bootable vhd’s.
First of all I started by creating a bootable vhd with my script with the following options:
| Name | Type | Size |
| Base2k8r2.vhd | Expandable | 80 000 Mb (Remember that you need this much free space on your disc even if the vhd doesn’t have the size from start) |
This left me with a vhd-file that took about 7Gb on my internal disc. I restarted my machine to make sure that my bootable vhd was working correctly.
After the health-check and some customizations like folder options in explorer I opened up a command prompt and entered shutdown /r /f, this way I don’t have to enter a reason to restart my Windows Server 2008 R2 OS ![]()
Back in Windows 7 I took these steps to create a difference disc to keep my base disc clean:
- Start a command prompt as Administrator
- Write BCDEDIT /v and hit enter
- You will see the boot entries and their GUIDs
- Write BCDEDIT /delete {guid to the entry with a the path to your bootable vhd}
WARNING this will delete a boot entry, make sure you enter the GUID to the entry where the device/osdevice points the path of your bootable vhd. Entering the wrong guid could make your computer UNBOOTABLE. - Write DiskPart and hit enter
- Enter CREATE VDISK FILE="<Path to difference vhd>" PARENT="<Path to parent vhd>"
You must specify a valid folder name or you’ll get an error. - Write SELECT VDISK FILE=”<Path to difference vhd>” and hit enter
- Write ATTACH VDISK and hit enter
- Write Exit and hit enter
- Write BCDBOOT <your assigned drive letter>:\Windows and hit enter
- If you write BCDEDIT /v and hit enter you should see a new boot entry that points to your new difference disc.
- Restart your machine and make sure that your bootable difference disc starts correctly.
When I get some time I’ll try to automate these steps into a handy batch-file or application. I hope you found this post interesting.
Cheers!
Hugo





Tweets that mention Hugo Häggmark » Creating a bootable VHD the easy way…continued -- Topsy.com
Nov 15, 2010 @ 22:23:50
[...] This post was mentioned on Twitter by Marcus Hammarberg, Hugo Häggmark. Hugo Häggmark said: Bootable vhd and difference discs a new blogpost: http://t.co/A4NoA0B [...]
←
Nov 16, 2010 @ 14:08:37
Did you activate the windows server core before doing the diff disk? Does the diff then “remember” its activation from the parent. I had some issues with that when playing with hyper-v doing the same stuff.
←
Nov 16, 2010 @ 14:46:35
No, I haven’t activated my machine yet. I’m not sure that would pose a problem as long as the diff disc has the same name and SID as the parent, but I could very well be mistaken here as I’m into real deep waters even attempting to answer this without trying it out myself…
←
Hugo Häggmark » Logon failure: the user has not been granted the requested logon type at this computer
Nov 20, 2010 @ 11:50:21
[...] « Creating a bootable VHD the easy way…continued [...]
←
Dec 08, 2010 @ 09:49:57
I activated windows server before doing multiple diffs and so far it worked just fine.
←
My 15 favorite blog posts of 2010 - Mikael Håkansson
Dec 25, 2010 @ 18:10:43
[...] http://www.hugohaggmark.com/2010/09/23/creating-a-bootable-vhd-the-easy-way/ http://www.hugohaggmark.com/2010/11/15/creating-a-bootable-vhd-the-easy-waycontinued/ [...]
←
Hugo Häggmark » The easiest way to Install and Boot Windows 8 Developer Preview off a VHD (Virtual Hard Disk)
Sep 18, 2011 @ 16:49:13
[...] Preview booting off a VHD. If you’re interested in more details read my previous posts here, here and [...]
←