Create a VHD from the Windows 7 Image disk

Topic(s)
Audience

Everyone

This being my first week at SSW, and still waiting for my nice shiny new laptop to arrive, I am sitting here at my Wife’s laptop (which is PINK, a requirement to keep the WAF high), until it arrives.

 image 
Figure: Current workspace…one wall short of working in a cupboard, but it beats trying to work with the kids underfoot.

image
Figure: I know its nearly Christmas, but that’s a long time between order and delivery!

SSW have sent me a .wim (Windows Image) file in the post and I really want to get a look at it before my new computer arrives.

In order to be able to create a clean install very quickly we need to convert this to a Windows 7 VHD. This way when the new computer arrives we can just move it over 🙂 I also want to be able to reinstall my computer quickly. And what is quicker then mounting a new VHD and rebooting.

In order to achieve this there are a number of things that need done:

  1. Copy all of the .rar files from the DVD’s coffee-cup
    image
    Figure: First disk nearly finished

    image
    Figure: Third disk is taking a while

  2. Use WinRar to fit the 3 packages back together
    image
    Figure: Joining the wim file together is going to take a while as well. I don’t want to have to do this more than once!
  3. Create a new VHD
    image
    Figure: Showing the physical and Virtual disks on my wife’s pink laptop.
  4. coffee-cupDeploy Image to new VDH
    In order to do this you will need imageX from the Windows 7 Automated Installation Kit. Check http://blogs.technet.com/aviraj/archive/2009/01/18/windows-7-boot-from-vhd-first-impression-part-2.aspx for more details and scenarios that will suit you.
    note: You may look at the Windows(R) Image to Virtual Hard Disk (WIM2VHD) Converter as another solution, but it requires that the Windows 7 Automated Installation Kit be installed locally, where I just downloaded imageX separately and bypassed the 1gb download.
    image
    Figure: As usual, this is showing the remaining in “Microsoft Minutes”

    image
    Figure: So 10% took just over a Minute? What is the rest of the hour for?

    image
    Figure: All done, I don’t know how long it took because I got on with some other things, but it was a while!

  5. Detach the VHD
     image
    Figure: Detaching the VHD will allow us to copy it.
  6. coffee-cupCopy the new VHD
    image
    Figure: This will allow me to save ssw.vhd for a rainy day, and use the copy as a working install.
  7. Rename the copy to “SSW_001.vhd”
  8. Attach SSW_001.vhd
    image
    Figure: Attaching a VHD is very easy

    image
    Figure:

  9. Add  the new SSW_001.vhd to the boot list using the folowing commands:
    C:>bcdedit /copy {current} /d “SSW_001”
    C:>bcdedit /set <guid> device vhd=[driveletter:]<directory><vhd filename>
    C:>bcdedit /set <guid> osdevice vhd=[driverletter:]<directory><vhd filename>
    C:>bcdedit /set <guid> detecthal on
    Note:  detecthal is used to force windows to auto detect the Hardware Abstraction Layer.
    image
    Figure: Added and configured the new Image…lets try it out…

Although this took a long time with 3 long running processes, it will be a lot faster next time as I can start from step #9…

Technorati Tags:   

Create a conversation around this article

Share on Facebook
Share on Twitter
Share on Linkdin

Read more

Martin Hinshelwood
In organizational development and team dynamics, Agile (as the Agile Manifesto delineates) and Scrum (as the Scrum Guide outlines) guide teams not by solving their problems but by illuminating the issues that demand attention. These frameworks aim to identify and spotlight the challenges within a team or organization’s processes, effectively …
Martin Hinshelwood
This week, I participated in a Scrum.org Webinar hosted by Sabrina Love (Scrum.org Product Owner) as well as my colleagues, Joanna Płaskonka, Ph.D. and Alex Ballarin to discuss the state of learning and how immersive learning is the future of training. You can watch the video below to hear what …
Martin Hinshelwood
For a long time now I have been searching for that perfect domain that epitomised the vision, the why, of what I am trying to achieve with my customers and the industry at large. Now I have found it in http://nkdagility.com
Martin Hinshelwood
At the MVP Summit I was appalled by the number of people who asked questions about new features for supporting hierarchical tasks! I shared a disgusted look with Peter Provost and we had a quick (and I mean really quick) conversation that resulted in this post. it really comes down …