Converting an MSIX package to a VHDx (Virtual Hard Disk) or CIM (Container Image Format) disk image is essential for scenarios like Azure Virtual Desktop and MSIX app attach.

Let’s dive into the steps:

  1. The prerequisites:
    • Download the MSIXMGR tool: First, download the MSIXMGR tool and extract it to a folder.
    • Administrative permissions: Ensure you have administrative permissions on a Windows 10 or Windows 11 device to create the MSIX image.
    • MSIX-packaged application: You’ll need an MSIX package (a .msix file) that you want to use with Azure Virtual Desktop. If you don’t have one, consider creating an MSIX package from a desktop installer (MSI, EXE, ClickOnce, or App-V) or download e.g. Teams MSIX.
  2. How to create an App Attach Disk Image:
    • Choose the format:
      • CIM: CIM is recommended for the best performance, especially with Windows 11. CIM consumes less CPU and memory, with improved mounting and unmounting times.
      • VHDX: If you prefer VHDX, use it instead of VHD.
    • Example Commands (CIM):
      • Open a command prompt as an administrator and navigate to the directory where you extracted the MSIXMGR tool.
      • Create a new folder for the destination (since a CIM disk image consists of multiple files).
      • Run the following command to create the CIM disk image:
        msixmgr.exe -Unpack -packagePath "C:\msix\myapp.msix" -destination "C:\msix\myapp\myapp.cim" -applyACLs -create -fileType cim -rootDirectory apps

         

      • The output should indicate that the CIM file was successfully created.
    • Example Commands (VHDX):
      • Open a command prompt as an administrator and navigate to the directory where you extracted the MSIXMGR tool.
      • Create a new folder for the destination file
      • Run the following command to create the VHDX disk image:
        msixmgr.exe -Unpack -packagePath "C:\msix\myapp.msix" -destination "C:\msix\myapp.vhdx" -applyACLs -create -fileType vhdx -rootDirectory apps

         

      • The output should indicate that the VHDX file was successfully created.
  3. Compatibility Note:
    • To ensure compatibility, generate CIM or VHDX files on a version of Windows that is lower than or equal to the version where you plan to run the MSIX packages. For example, CIM files generated on Windows 11 may not work on Windows 10.

Remember, this process allows you to transform an MSIX package into a format suitable for app attach scenarios. Now you’re ready to seamlessly use your MSIX applications in Azure Virtual Desktop.

For more detailed information, you can refer to the official Microsoft documentation on creating an MSIX image for app attach.

Paul Cobben