Support Tip: Windows XP Compatibility 2 Setup Wizard ends prematurely when installing a MED-V Workspace


When deploying a MED-V 2.0 workspace, an error message may be generated during the VHD copy routine of the setup. The Workspace Setup then roles back and presents the following message:

Windows XP Compatibility 2 Setup Wizard ended prematurely

Windows XP Compatibility 2 setup wizard ended prematurely because of an error. Your system has not been changed. To install this program at a later time, run the setup wizard again. Click the Finish button to exit the setup wizard.

When executing the Workspace setup from an elevated command prompt using the following verbose logging switches, an IO error is present in the log indicating VHD file corruption:

setup.exe /l*vx! C:\temp\log.txt # NOTE: KB 2545723 provides an alternate way to create a verbose setup log see more Information Section

The verbose setup log indicates a problem with the VHD embedded in the file with the .medv extension:

A generic exception occurred while unpacking VHD
System.IO.IOException: I/O error encountered in attempting to open file ---> Xceed.Compression.CompressionException:
Expected end of stream not found
at Xceed.Compression.ManagedDeflateDecompressor.Decompress(Byte buffer, Int32 offset, Int32 count, Boolean& endOfData, Byte& decompressed, Int32& remaining)
at Xceed.Compression.CompressedStream.Read(Byte buffer, Int32 offset, Int32 count)
at Xceed.Utils.Streams.ChecksumStream.Read(Byte buffer, Int32 offset, Int32 count)
at Xceed.Zip.ReaderWriter.ZipReader.ReadItemData(Byte buffer, Int32 offset, Int32 count)
at Microsoft.Medv.WorkspaceCustomActions.VhdUtil.Decompress(Session session, String compressedVhdPath, String vhdInstallationFilePath, Boolean overwriteExistingVhd)
--- End of inner exception stack trace ---
at Microsoft.Medv.WorkspaceCustomActions.VhdUtil.Decompress(Session session, String compressedVhdPath, String vhdInstallationFilePath, Boolean overwriteExistingVhd)
at Microsoft.Medv.WorkspaceCustomActions.CustomActions.InstallVhd(Session session)
CustomAction InstallVhdFile returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

Normally you could rename the *.medv file to a .zip extension and then open the compressed folder and access the embedded VHD file. In this scenario, the following message may be generated:

Windows cannot open the folder
The Compressed (zipped) Folder 'C:\temp\Windows XP x86 SP3 Hard is invalid.

This can occur if there is corruption of either the *.medv file or the embedded *.vhd file contained within the *.medv file.

To resolve this issue, restore the Med-V Workspace package from backup or create a new package using the MED-V Workspace Packager. Make sure that any antivirus or malware scanners are disabled during the packaging process. If you must run your malware scanner due to corporate policy please reference KB article 2504827 to put in place the proper exclusions. These exclusions should be applied to both the Workspace packager and the Med-V Host.

KB2504827 - MED-V 2.0 workspace setup fails with a fatal error :

For more information see the following:

KB2545723 - How to Enable Microsoft Installer logging and Verbose logging to gather additional troubleshooting Information :

John Behneman | System Center Support Engineer

Get the latest System Center news on Facebook and Twitter:

clip_image001 clip_image002

App-V Team blog:
ConfigMgr Support Team blog:
DPM Team blog:
MED-V Team blog:
Orchestrator Support Team blog:
Operations Manager Team blog:
SCVMM Team blog:
Server App-V Team blog:
Service Manager Team blog:
System Center Essentials Team blog:
WSUS Support Team blog:

The Forefront Server Protection blog:
The Forefront Endpoint Security blog :
The Forefront Identity Manager blog :
The Forefront TMG blog:
The Forefront UAG blog:

Comments (2)

  1. How large is the VHD? Was it created in Virtual PC?

  2. Iain McCain says:

    I'm still receiving the above errors on a vanilla Windows7 Image.

    Windows Defender Service is disabled and no additional AV Products running?

Skip to main content