Skip to main content

Written by our engineers, TechVentiX is a blog series in which we’ll dive deeper into the technology of application distribution and management.

With the introduction of Azure Virtual Desktop (or Windows Virtual Desktop back then) Microsoft introduced a new feature as part of their tech stack; AppAttach. AppAttach can be seen as a form of “app layering”, it decouples applications from the underlying OS. It works by mounting disk volumes (containing applications) to a machine, which avoids installing them on the device and simplifies deployment and management.

When and how should you use AppAttach, and what alternatives are available?

Disk Volumes

AppAttach operates by leveraging disk volumes to decouple applications from the underlying operating system, enhancing modularity and manageability in virtual environments. Each AppAttach instance is encapsulated within a disk volume, such as VHD, VHDX, or CimFS, which is dynamically mounted to the host machine or virtual desktop. Typically, an AppAttach instance contains one application.

This mechanism allows the application to be executed in an isolated manner, independent of the OS, thereby reducing system dependencies and streamlining updates and maintenance. When a user session initiates, the corresponding AppAttach disk volume is seamlessly integrated into the system’s namespace, enabling the application to be accessed and run as if it were locally installed, yet maintaining its logical separation. This approach not only optimizes resource utilization but also enhances security by minimizing potential OS-level conflicts and vulnerabilities.

As AppAttach applications are mounted as a disk volume, they can be found in Windows Disk Management.

Shared Storage equals Latency

AppAttach disk volumes are stored on a central storage location and mounted by session hosts over the (storage) network. As a result, session hosts don’t need to allocate storage capacity for each application like they would when natively installing applications. This keeps the session hosts clean and nimble resulting in agile deployments. 

As disk volumes are mounted from a shared location – over a shared medium – sizing and scaling is key; shared storage equals shared latency. The performance of all connected session hosts can fluctuate when scaled on average performance requirements. 

How many IOPS you need depends on your application, which obviously varies depending on the character of the application. As a rule of thumb; add 1 IOP for each AppAttach disk volume when measuring the requirements of your application.

Which Disk Format To Use

One of the design decisions involved when using AppAttach is the disk format to use.   AppAttach supports three primary disk formats: VHD, VHDX, and CimFS. Each format has distinct characteristics and use cases. When using AppAttach in a modern operating system, you should really focus on VHDX versus CimFS. As CimFS has the least impact on resources, it is our preferred option. VHDX is recommended when using AppAttach on Windows 10. 

  1. VHD (Virtual Hard Disk):

The VHD (or Virtual Hard Disk) is a file format that was created by Connectix for their Virtual PC product, known as Microsoft Virtual PC since Microsoft acquired Connectix in 2003.VHD is compatible with a wide range of tools and environments, making it the most compatible option. But it should really only be used as a last resort as it requires more resources and has a size limit of 2TB (though we don’t see applications of this size that often), there are not many reasons to prefer VHD over VHDX.

Microsoft does not recommend using VHD for AppAttach.

  1. VHDX (Virtual Hard Disk Extended):

VHDX is the successor of VHD and has a capacity limit of 64 TB instead of 2TB. But more importantly, it offers better data protection against corruption, and provides performance improvements over VHD. It is suitable for modern environments with larger applications and where enhanced performance and reliability are critical.

It is the recommended format when using Windows 10.

  1. CimFS (Compact Interchangeable File System):

CimFS is a file-backed image format that was introduced with Windows 10. It is optimized for read-heavy operations, smaller disk footprint, and faster mounting times. The fileformat support de-duplication at the file level, which can reduce the filesize when the application stores the same file on different location.

CimFS is the best for scenarios where application performance and quick access times are crucial, particularly in high-density VDI environments. Mounting and unmounting CimFS images is faster than VHD and VHDX files and also consumes less CPU and memory. Microsoft recommends using CimFS for your application images if your session hosts are running Windows 11.

MSIX and AppAttach

MSIX and AppAttach are frequently used in the same context; as way to distribute an application to an AVD Session Host. While technically incorrect, it makes a lot of sense and is perfectly okay.

There is a big difference though; MSIX is a Windows application package format that provide a modern packaging experience to Windows applications. AppAttach is a delivery mechanism typically used to deploy MSIX applications. Technically they’re not mutually exclusive.

In its original form MSIX is a self-contained executable image with the file extension .msix (or .msixbundle). We’d like to refer to this as “native MSIX”. MSIX files are easy to distribute as it’s a single file; it can be stored on a fileshare, a USB thumbdrive, or even e-mailed. When the file is opened – or “installed” – the content of the package is stored in C:\WindowsApps which will then serve as the application folder. This is all handled by a builtin Windows service that’s including since Windows 10 build 1607. 

To use AppAttach, the content of an MSIX package is extracted into a disk volume (VHDX/CimFS). Microsoft freely provides the msixmgr.exe tool to convert an MSIX package into a disk image. At AppVentiX we’ve embedded this functionality into our management console.

Azure Portal

To manage AppAttach in Azure Virtual Desktop (AVD), IT administrators must use the Azure Portal.  The Azure Portal provides a centralized and comprehensive platform for deploying, configuring, and maintaining AppAttach applications within AVD environments. Through the Azure Portal, IT admins can manage the lifecycle of (MSIX) app packages, assign them to host pools, and control their settings and updates, ensuring seamless delivery of applications to end-users. This dependency on the Azure Portal necessitates that IT admins be well-versed in its functionalities and features to efficiently manage and support their virtual desktop environments. As an alternative to Azure Portal, PowerShell can also be used to mount AppAttach disk volumes to AVD session hosts. 

Through Azure Portal it is not possible to manage “native” MSIX applications; applications need to be delivered through AppAttach. At AppVentiX we have the ability to managed MSIX applications, native or delivered via AppAttach, built into our product.

Tips and troubleshooting

When deploying applications using AppAttach the design of the infrastructure is key to the success. For modern environments the CimFS disk format is recommended and for Windows 10 VHDX, both with default settings unless environment specific configuration require otherwise.

Sizing and scaling the performance requirements is tricky as typically the peak load is during the staging phase (or mounting) and starting the application, with some applications having different behavior. 

It’s recommended to measure the behavior of your application, the built-in performance counters in Windows such as Disk Reads/sec and Disk Writes/sec respectively tell the read and write IOPS.

Troubleshooting AppAttach mostly takes place in the event log. When troubleshooting AppAttach in AVD, filter events with source Microsoft.RFInfra.RDAgent.AppAttach.* and Microsoft.RDInfra.RDAgent.Service.AppAttachHealthDisk. Or use the MSIX Event Log tool to view all related log items.

Alternatives

What if AppAttach doesn’t match your requirements or fit your needs? What alternatives are available?

If you’re set on using a Microsoft standard for application delivery, MSIX is the answer. Instead of delivering the MSIX application via AppAttach, applications can also be delivered via the native deployment mechanism. MSIX is a self-contained executable application format that can be deployed using tools like Intune or AppVentiX. 

Deploying MSIX native provides some benefits, including offline support (for roaming devices such as laptops) and decentralized performance (performance is provided by the host instead of centralized resources).

Conclusion

AppAttach works by using disk volumes to separate applications from the underlying operating system, making virtual environments more modular and manageable. AppAttach is commonly seen in Azure Virtual Desktop (AVD) environments delivering MSIX applications via the Azure Portal. 

AppVentiX expands on the capabilities found in Azure Portal by adding support for native MSIX delivery, App-V, and hybrid deployments for on-premises environments.

Thank you for reading!

Check out our features page and our affordable pricing plans.