Waclaw Chrabaszcz
... there is no spoon ...

SCCM, MDT and SCVMM – How to convert VHD into WIM

Monday, September 1, 2014 1:23 PM

It is not possible. Due to obvious reasons, VHD is it a dynamic structure like a SQL database, whereas WIM is closer to ZIP file – very static and designed for conserving the storage space by compression and links to duplicated files.

What we can do else? We can capture VHD state to WIM. I'm going to perform this operation on Windows 7 machine, so unfortunately this time no PoSH commandlets like Mount-VHD. We will need imageX command, maybe you will need to download and install Windows AIK

http://www.microsoft.com/en-us/download/details.aspx?id=5753

Since we need to execute multiple DiskPart commands, we will have to rely on answer files:

 

diskpart /s attach.txt
imagex /compress maximum /check /scroll /boot /capture F: C:\TEMP\Win7.wim "Win7syspreped"
diskpart /s detach.txt

attach.txt

select vdisk file="C:\TEMP\Win7.vhd"
attach vdisk

detach.txt

select vdisk file="C:\TEMP\Win7.vhd"
detach vdisk

Now you can compare file sizes J




Feedback

No comments posted yet.


Post a comment