Create an Operating System VHD from DVD
As a follow up to the previous post, this method was blogged well before Microsoft released WIM2VHD and I still use this method to create Windows Server 2008 R2 VHD using either ISO mounted or the actual media.
To be honest, a vhd is being created right now using this method as I blog this!
Building a SharePoint farm in Hyper-V.. so you may want to follow the series…
So how do you create an operating system vhd from a media? I will copy the content from Ravikanth’s blog post as is – as I mentioned above about this method having been blogged way before we saw WIM2VHD
- Insert Windows Server 2008 R2 OS media in the drive
- Open Command-prompt and change to %programfiles%\Windows AIK\Tools\amd64 folder
- Run “imagex /info <CDdrive Letter>:\Sources\Install.WIM. Install.WIM contains more than one OS edition and this command displays a list of all available images within install.wim. Note down the image index number for the image you want to capture as a VHD
- Run “Diskpart.exe” and continue with the following commands
- Create vdisk file=c:\<VHDFILENAME>.VHD maximum=<SIZE in MB> Type=<TYPE of VHD; Fixed or Dynamic>
- select vdisk file = C:\<VHDFILENAME>.VHD
- Attach vdisk
- create partition primary
- format quick fs=ntfs
- assign letter=S
- exit
- Now, we need to capture the image we selected in step 3 in to the new VHD we just created
- Run “Imagex /apply <CDDRIVE>:\Sources\Install.wim <IMAGE INDEX from Step 3> S:\
- Open Diskpart again
- Select vdisk file=C:\<VHDFILENAME>.VHD
- Detach vdisk
That’s it!
To note: If you are not comfortable using command prompt, then you can create vhd using the disk management mmc [gui based] upto step 11 and then jump into the command prompt and run steps 12-13 and then go back to disk management mmc and detach the disk [don’t delete!]
Using this method is much quicker to get an OS image applied to vhd then the previous method I had blogged. I will label this method 2 as reference to future posts that I am going to write in reference to how I used Ravi’s method to attach this to Hyper-V ![]()
[...] get started, create a vhd that you can boot into using this [...]