The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Using WIM2VHD to create Reference Images for Hyper-V

Posted by Mikael Nystrom on August 25, 2010

Sometimes you need a fast way to create a reference image. You know, suddenly you need to have a VHD file of Windows Server 2008 R2 and a Windows 7 machine, like NOW. It always seem to be NOW or yesterday that things need to be done, wonder why…

Anyway, you need the following:

  • WAIK (Well, you only need Imagex, but if you have WAIK installed you have that)
  • WIM2VHD, and that’s just a small download
  • The OS (You only need the Install.wim, but I’ll guess you already have the DVD somewhere anyway)

WIM2VHD

This tools i really nice actually, but it only supports Windows 7 and Windows Server 2008 R2. The command line to create a VHD file is quite simple:

cscript WIM2VHD.wsf /wim:g:\sources\install.wim /sku:1

That will create a 40gb dynamic VHD file in less than 3 minutes (Yes, I do have a SSD disk), but it also have a bunch of other commands that could be used to make it more fun :-)

Required parameters:

  /wim: Path to the .wim file
  /sku: Sku number or sku name

Some Optional parameters:

  /vhd: Name and path to the VHD file you would like to have
  /size: Size (default is 40960 mb)
  /disktype: Dynamic, Fixed or FastFixed (FastFixed requires VHDTOOL)
  /unattend: Path and name of an unattended XML file
  /qfe: A comma-seperated list of .MSU files that you would like to have in the image
  /mergefolder: Names of folders that you would like to have in the image

I use it from time to time when a need a fast solution and i don’t have time to do it the “real” way and in this case the real way is using MDT of course.

Mikael Nystrom
MVP Windows Server – Setup/Deployment

One Response to “Using WIM2VHD to create Reference Images for Hyper-V”

  1. […] Use WIM2VHD to create a Ref Image […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: