Tuesday, September 8, 2015

Enable Boot to VHD with Windows 10

Problem:


I am building out a development environment to run in the office.  I decided to update my vhd builds to windows 10 from Windows 8.1.  The last time I did this was with Imagex.  Things have moved on and now Imagex has been depreciated. The new tool is DISM and is part of the OS starting in Windows 8.

Solution:

  1. In your host OS, Create the VHD with disk management (See Technet article)
  2. Now the command to move the WIM image
    • DISM /Apply-Image /ImageFile:D:\Sources\install.wim /Index:1 /ApplyDir:V:\
      where D is the drive mounted with the windows 10 disk and V: is the vhd mount
  3. Change the boot menu to boot to vhd on your c drive.
    • bcdedit /copy {GUID} /d "New Name"
    • bcdedit /set {GUID} osdevice vhd=[C:]\folder\filename.vhd  
    • bcdedit /set {GUID} device vhd=[C:]\folder\filename.vhd
      • Note: I got tripped up on the exact syntax for bcdedit. The brackets around the drive letter are required. If you leave them off you will get a syntax error.
    • bcdedit /default {current}
    • bcdedit /set description "Windows 10 VHD"


Source:

  1. https://technet.microsoft.com/en-us/windows/dn858566.aspx
  2. http://mythoughtsonit.com/2013/02/dism-exe-replaces-imagex-exe/
  3. http://blogs.technet.com/b/jamesone/archive/2009/05/19/boot-from-vhd-the-joy-of-bcdedit-and-a-nice-hyper-v-gotcha-or-two.aspx

No comments:

Post a Comment