Convert Vhd To Wim

 admin  
  1. Convert Vhd To Wim

How to Convert a WIM to a VHD and make it bootable. Side Note: This guide makes certain assumptions including knowledge of creating a VHD. Create a new VHD in Hyper-V manager (Must be added to windows under features section of add/remove programs.

Servicing an offline image, mounting an image, committing changes, it all sounds a bit complicated to an average Windows user. However, it's just geek speak meaning modifying default Windows install image, the install.wim file. It is a straight forward procedure. When changes have been committed (written, saved) to image, the modified install.wim can be used to deploy Windows or to replace original install.wim on existing install media.
Servicing an offline image is done with DISM (Deployment Image Servicing and Management), a native Windows tool. DISM command options allow all kind of changes, changing the way Windows will be installed. Drivers can be added or removed, language packs applied to create a multilingual Windows install media, Windows Updates applied to get a new Windows installation to be up to date straight after installation, and so on.
A default Windows install media created with Windows Media Creation Tool (from here on MCT) contains an encrypted and compressed install.esd file instead of install.wim file. An MCT ISO is fully functional, the official way chosen by Microsoft to deliver Windows 10 install media. Windows has no issues in installing from an ESD file, but to service it offline the ESD file needs to be decrypted and converted to WIM format. If you try to mount an ESD file as offline image, you will get an error:
This tutorial will show how to use DISM to convert an ESD based MCT install media to WIM format. The same method can of course be used to convert any other ESD file to WIM, too

Use links below to go to any step, back button of your browser to return to this list.

Step One:Preparations
Step Two:Convert ESD to WIM
Step Three:Create updated ISO


1.1) Create a folder on hard disk, name it as you wish. In this example I use folder D:ISO_Files. From here on D:ISO_Files folder refers to whatever folder you set up for this
1.2) If you have MCT install media already on USB flash drive, copy Sourcesinstall.esd to D:ISO_Files folder.
1.3) If you have a dual architecture USB install media, copy the install.esd file for correct bitversion to D:ISO_Files. It is located in x86Sources folder for 32 bit Windows, and in x64Sources folder for 64 bit Windows
1.4) If you have MCT install media as an ISO image, mount the ISO as virtual DVD (right click ISO > select Mount) and copy its content (all files and folders from ISO) to D:ISO_Files folder


2.1) Open an elevated PowerShell (tutorial)
2.2) Check which Windows editions the install.esd image contains with one of the following commands:
- If you copied an ESD file from USB to D:ISO_Files as told in steps 1.2 or 1.3:
dism /Get-WimInfo /WimFile:D:ISO_Filesinstall.esd
- If you copied ISO contents to D:ISO_Files as told in step 1.4:
dism /Get-WimInfo /WimFile:D:ISO_FilesSourcesinstall.esd
In case that your MCT ISO is dual architecture, the ISO contents you copied to D:ISO_Files contains both 32 bit and 64 bit Windows images. In that case you need to change the above command accordingly:
To check editions in 32 bit install.esd:
dism /Get-WimInfo /WimFile:D:ISO_Filesx86Sourcesinstall.esd
To check editions in 64 bit install.esd:
dism /Get-WimInfo /WimFile:D:ISO_Filesx64Sourcesinstall.esd

2.3) Note the index number for your preferred edition. In this example I want to use PRO edition, noting its index number 1:
2.3) Enter following command to convert ESD to WIM:

2.4)Be sure to use correct SourceIndex number (green highlight in sample command in step 2.3 above)
2.5) Command sample in step 2.3 is valid only if you copied ISO contents from a single architecture (32 or 64 bit) MCT ISO image to D:ISO_Files folder as told in step 1.4.
If you instead copied an ESD file alone from USB as told in steps 1.2 and 1.3, or if you copied contents of dual architecture ISO image in step 1.4, change SourceImageFile and DestinationImageFile paths (red highlight in sample command in step 2.3 above) accordingly:
  • If you copied an ESD file from USB to D:ISO_Files as told in steps 1.2 or 1.3, both paths should be D:ISO_Filesinstall.esd
  • If you copied dual architecture ISO contents to D:ISO_Files as told in step 1.4, both paths should be
    D:ISO_Filesx86Sourcesinstall.esd to convert 32 bit install.esd, or D:ISO_Filesx64Sourcesinstall.esd to convert 64 bit install.esd.

Convert Vhd To Wim


2.6) Convertion will take a few minutes. When done, you'll find both original install.esd and new install.wim file in D:ISO_FilesSources folder:
2.7) If you were working with MCT single bit architecture ISO content copied to D:ISO_Files, continue from step 3.1
2.8) If you were working with MCT dual bit architecture ISO content copied to D:ISO_Files, you should now repeat the process for the other not yet converted bit version. For instance if you have now converted the 64 bit install.esd, do the same for 32 bit version
2.9) If you were working with install.esd file copied from USB to D:ISO_Files, delete the ESD file on USB Sources folder and replace it with new install.wim file
2.10) Before creating new ISO from ISO_Files folder, delete the install.esd file in Sources folder (or x86Sources / x64Sources)

3.1) The D:ISO_Files folder on HDD now contains all files needed to create an updated ISO image. See Part Five in following tutorial for instructions in creating the ISO: Create Windows 10 ISO image from Existing Installation Installation Upgrade Tutorials

That's it! If you have any issues with this, do not hesitate to post in this thread.
Kari


I just setup and sysprepped a nice new VM, now I need to convert it to a wim real quick, to upload to my sccm server. For some reason, I can't change the VM properties to boot from a legacy nic for pxe, which is how I usually capture my images using sccm. VMM just changes the settings right back, even though it says successful.

Anyway, the first page of google was terrible for this, w/ the exception of a 3rd party .ps1 script on MS's website, but I'm using 2012r2, I should be able to do this natively, right?

MDMoore313MDMoore313
4,6915 gold badges28 silver badges70 bronze badges

2 Answers

Absolutely, let's post a prim and proper answer for Google. This is a simple 2 command Powershell execution, using the dism module. The dism can be copied to earlier versions of Windows, provided you have the appropriate version of the windows management framework.

Convert

First, mount the vhd using

Then, capture it into a wim with

And let it do it's thing. When you are done you can unmount the vhd and discard any changes using:

Greg Bray
4,6125 gold badges26 silver badges47 bronze badges
MDMoore313MDMoore313
4,6915 gold badges28 silver badges70 bronze badges

If, for some reason, Powershell is not an option - do not despair!

In Windows 7 or later, you can mount the .vhd via disk management (link)

Sniper, sharpshooter, marksman, or shooter, was a term to describe individuals who shot—or specialized to shoot—a target from a long range. Often concealing themselves in a hidden location, snipers required patience and a steady, precise aim. Sources sniper droid in the Encyclopedia (link now. Star wars saga edition sniper build. Jan 01, 2010  While that goal can be difficult with some of the more powerful foes in Star Wars Saga Edition, with the proper build it can be possible to take an opponent the entire way down the condition track in one round. So, without further ado: The Sniper.

Once it is mounted, you can use imagex.exe to capture the .wim (technet link)

Vlad274Vlad274

Not the answer you're looking for? Browse other questions tagged powershellhyper-vwindows-server-2012-r2dism or ask your own question.

   Coments are closed