Wednesday, November 17, 2021

Empowering AVD Image deployments with Azure Pipelines, Bicep and Liquit!

In any Cloud implementation, automation is key in becoming successful. Azure Virtual Desktop (AVD) is no different. AVD is a service in Azure and for a big part its managed by Microsoft for you. But it doesn’t stop there. Microsoft manages the control plane components and you as the partner or customer organization need to deal with the components that you are responsible for. Basically, anything that shows up in your or your customers Azure Subscription as well as the various AVD clients you use.

This means you as the partner or customer organization can focus on what’s really important, the perceived end user experience and optimizing that experience for your specific use case or scenario. This involves things like auto-scaling, profile management, image optimization and yes, also maintaining applications and putting in place proper application life cycle management.

Its probably no surprise that by far the number one application published and used in AVD is Microsoft 365 apps for enterprise. Microsoft already does a good job at providing that in various marketplace images for AVD including the FSLogix agent that improves the user experience. Most AVD environments however also include 3rd party applications specific to the customers organization.

When dealing with AVD Personal scenarios it makes sense to treat your AVD personal hosts as you would treat your physical devices. Since there is a 1-to-1 relationship between the user and the VM, you can have the same application distribution and update approach for both physical and virtual environments. When dealing with AVD Pooled Scenarios, many organizations prefer a ‘traditional’ approach based on a golden image strategy. This ensures that the user experience is same the regardless of the session host their session lands on. It also allows testing applications and OS updates in a separate staging environment prior to production. Furthermore, it allows reverting back to a previous image version in case issues arise. And, based on Infrastructure as Code, you can deploy and expand your host pool in a fully automated way.

In an ideal world, both user profiles and all applications are fully separated from the Session Host OS. For the first piece is the puzzle, FSLogix Profile Containers already makes sure a user’s profile is fully separated and stored centrally on Azure Files or Azure NetApp files. For the second piece of the puzzle, MSIX app attach is a great solution. It allows you to place an extracted MSIX application inside a VHDX container and attach it to the Session Host. This is fully transparent to the OS as well as to the user. Basically, the OS is tricked into thinking an MSIX application was installed and you can register the application to a set of users. As ideal as this sounds, it does mean that the application needs to be in the MSIX format. Hopefully application vendors will start to embrace MSIX and delivers their applications natively as MSIX too. Until that time however, applications need to be transformed from MSI or Exe towards MSIX. Although there are both free and paid tools out there that help you in this process, most organizations will not achieve 100% success rate in the transformation process.

There are many ways to deal with installing applications as part of your AVD Image Deployment. In this blog post, I focus on using a fully automated approach using Liquit as the application source and an Azure DevOps Pipeline leveraging Bicep and Az Cli for the automation part.

The goals is to create a new image from scratch based on an Azure Market place image, have Liquit install all applications, capture the image towards an Image Gallery and deploy new Session Host servers towards an AVD Host pool.

  • It all starts with a Deployment in Liquit containing the applications we want to install as part of this AVD Image. In this case its a combination of applications coming from the huge Liquit Setup Store as well as custom added and modified applications.
  • As part of an Azure DevOps pipeline, Bicep is used to deploy a new Template VM in Azure based on the OS version and SKU provided as the parameter.
  • Next, the Liquit Agent is installed and a pre-configured agent.xml is downloaded from a secure Azure Files location to configure the Liquit Agent.
  • The Liquit Agent now installs all the applications as configured in the Deployment
  • Next, the Template VM is sysprepped, stopped and deallocated
  • The pipeline continues by capturing the template VM and placing as a new Image Version inside an Azure Compute Gallery (previously Shared Image Gallery) and the sysprepped Template VM is removed from Azure.
  • Next, the pipeline generates a new host pool registration token to prepare for the Session Host servers to be added.
  • And finally, the pipeline deploys x number of Session Host Servers, joins them to the domain, installs the AVD Agent and adds them to the configured Host pool.

The entire process only took 26 minutes to complete! In case of an application update or new application, it can simply be added to the Liquit Deployment and within 26 minutes it is available in the AVD Host pool. Introducing an approval step between a deployment towards a test environment and a production environment can of course easily be added.

Interested in the details and code behind this deployment? Join me on a webinar together with the Liquit team on December 7th 3PM CET, for demo-heavy session that walks through this scenario!

https://register.gotowebinar.com/register/3599764104761845515

#AVD #Liquit #AzureVirtualDesktop

Monday, August 23, 2021

Multimedia redirection for Azure Virtual Desktop preview

Last week the public preview of Multimedia redirection (MMR) for Azure Virtual Desktop was announced! MMR provides the user with a very smooth video playback experience while watching videos in a browser running on Azure Virtual Desktop.

Essentially what happens is that the video from the browser to offloaded to the local machine for faster processing and rendering. As a result of that, the user is presented with a smooth video experience, even when playing a full screen 4k video. Not only that, since the playback is offloaded to the local a significant drop in resources on the AVD host will also occur which leads to a higher user density. Typically you’ll see less CPU used on the AVD host and the local GPU being leveraged.

To get this to work you need a couple of requirements (some of those are related to preview version of MMR). Also note that both Edge and Chrome are supported.

After installing the the multimedia redirection extension on your AVD hosts, it can be enabled inside the browse as shown below.

Once enabled you will see the AVD icon in the upper right corner of your browser indicating the extension is enabled. For this current preview, only YouTube is supported but you can already test other webservices by selecting “Enable for all sites” which, as it states is currently in an experimental face.

To take MMR to the test I did a comparison of running a 4K YouTube video in full screen in an AVD Session with and without MMR enabled on a session host without GPU.

Azure Virtual Desktop Multimedia Redirection (preview) — YouTube

The video playback in the remote session was very smooth with MMR enabled and there was a significant drop in CPU usage noticeable. Also, the local GPU was clearly being leveraged for the rendering of the offloaded YouTube video.

Although still in public preview with some current limitations to be aware of and this being a very early test, the results were already amazing. I’m looking forward to seeing how this continues to evolve.

Tuesday, July 13, 2021

New book: 'Getting started with Bicep' now available!

Happy to announce my new book: Getting started with Bicep : Infrastructure as code is now available on Amazon both in kindle and paper back!

I’m extremely honored and thankful that both Mark Russinovich and Alex Frankel wrote on introduction to this book! Thank you so much for taking the time! A huge thank you to Kristin Griffin, Esther Barthel and Marcel Eeken who reviewed the book and provided great feedback! I could not have done this without you! And finally, a big thanks to Stefan Ivemo who authored a great guest chapter covering his community project, a PowerShell module for Bicep! 

Click here to order!

Description:

Infrastructure as Code is crucial to becoming successful in the Azure Cloud. Azure Resource Manager allows you to create resources in Azure in a declarative way. For many years we have been using ARM Templates to declare resources in a JSON format. Although ARM Templates are very powerful, the implementation of the JSON language is hard to read, maintain and debug. Bicep, a Domain Specific Language, overcomes these issues by providing a transparent abstraction layer on top of ARM and ARM Templates. This significantly improves the authoring experience. Bicep is easy to understand at a glance and straightforward to learn regardless of your experience with other programming languages. The book starts with some history and background in Infrastructure as Code and ARM Templates. It continues by explaining Bicep and providing guidance on how to get started. After the introduction, you will start your journey by understanding the syntax of Bicep. You will start by learning the basics first and you will gradually dive deeper in the more advanced scenarios. The book also contains a dedicated chapter on a big real-world example which provides you with great insights on how to leverage Bicep for production usage. Part of this book is also the Bicep playground, visualizer and a PowerShell module for Bicep provided by the community. Sample code used in this book is available on a dedicated GitHub repository.

What you will learn:

  • How to get started with the Bicep CLI and VSCode Extension
  • Deploying Bicep files to Azure, including template specs
  • Understanding the Bicep file structure
  • How to use the basic concepts of variables, parameters, tags, decorators, expressions, and symbolic names
  • Getting familiar with more advanced topics like dependencies, loops, conditions, target scopes, modules, and nesting
  • Leveraging features like snippets, scaffolding, and linter that support you while authoring Bicep templates.

Dedicated GitHub repository:

Part of this book is a dedicated GitHub repository containing the sample code that is used throughout the book.


Friday, April 16, 2021

Bicep code snippets for WVD!

Yesterday, a couple of code snippets I contributed to Bicep 💪, were merged in the latest Bicep CLI version 0.3.310! Super cool to see this in action myself for the first time.

What does it allow you to do? Bicep is the DSL which allows you to create Azure Resources in a declarative way. The Bicep VSCode extension already does a great job of providing Intellisense, code completion and much more! Recently, the concept of Code Snippets was also introduced in Bicep. This allows you to declare resources in a super fast way.

The Code Snippets I contributed allow you to declare WVD resources in a matter of seconds. It’s hard to capture this in a couple of screenshots, so I created a quick video to show this in action!

Bicep code snippets for WVD in action! — YouTube

Subscribe to my You Tube channel to get updates on new videos!


Thursday, April 8, 2021

Slide decks of my speaking engagements

I decided it was about time to publish the decks of my speaking engagements into a central repo. Github ⭐ seemed like the perfect place, so here it is. It contains a first subset of my sessions over the past years from in-person events around the world 🌎(pre-Covid), various community conferences, meetups & webinars 🎥! https://github.com/fberson/Slidedecks. Most session discuss topics around Windows Virtual Desktop, Remote Desktop Services, ARM Templates and Bicep!



#WVD #Bicep #Community