Custom images for Windows 365 Cloud PC

In this blog I want to share my experience building and assigning a custom image for Windows 365 Cloud PC. I already wrote a blog about the Azure Image Builder process. The steps in my previous blog are sufficient if you want to use custom images with Azure Virtual Desktop, but additional steps are needed for Windows 365 Cloud PC. We are using Microsoft Intune, Azure Image Builder (AIB), PowerShell and ARM templates for this in combination with GitHub Actions.
In my demo scenario I divided all the steps into separate actions to make it more easy to read, but you can combine it easily in GitHub Actions or Azure DevOps. Also, you can use the variables from Azure DevOps variable groups or retrieve info from Azure key vault to fill the variables.
All scripts can be found on my GitHub and can be used in other environments when changing variables. Always check first before running scripts! |
Scenario:
- You want to use custom configuration on a marketplace image that you want to use with Windows 365 Cloud PC.
- The image will be created by using Azure Image Builder.
- The image will be converted so it can be used in Windows 365 custom images.
- The whole process will be automated with GitHub Actions.
- An admin account with global administrator rights and full permissions on the subscription.
- Have a Windows 365 Enterprise license.
- Integrate your Azure tenant with GitHub (Actions) or Azure DevOps (Pipelines) to run the code using yml files.
Create the image
We need an user-assigned managed identity and Azure Compute Galleries definition. Check this blog for detailed instructions. The yaml file for creating the Identity can be found below.
When the identity is created you can create the image by using the scripting below. If you look closely, you see that I use the Ucorp-CPC-Baseline-Configuration.ps1 to adjust the marketplace image. Edit this to your own needs. To check what kind of Offer and SKU you want and need to use for Windows 365 Cloud PC, check Get-AzVMImageSku.ps1.
The yaml file for creating the image with Azure Image Builder can be found below.
After the process is completed successfully, you will see an image version in your image definitions within Azure compute galleries.
Remove resources and check for errors
Check the resource group IT_\DestinationResourceGroup_\TemplateName_\(GUID) for packer logging about the deployment. If you want to run the AIB imaging process again you need to remove the current image deployment first. The image can be found in the resource group you used for the deployment. After deleting this image resource, the additional imaging resource group will also be deleted.
Windows 365 Cloud PC
As mentioned before, additional steps are needed for the use of custom images for Windows 365 Cloud PC. Those steps are:
- Create a managed disk from Azure Compute Galleries image version we build earlier with Azure Image Builder.
- Create an image from the managed disk that we can import in Windows 365 custom images.
- Add the image manually by going to Microsoft Intune, Windows 365 Custom images.
- Create a provisioning policy and select the custom image.
After running the script below, the following resources are created:
- Disk based on the VM image version we created with Azure Image Builder and can also be found in Azure Compute Galleries.
- The image file that is created by using the disk as input.
After following all the steps mentioned in this blog, you will have the following resources within your specified resource group.
Add the custom image to Windows 365 custom images. Go to endpoint.microsoft.com, Devices, Windows 365, Custom images and select the subscription where the resources are deployed in. You should be able to select the image like in the example below.
Create a provisioning policy and select the custom image we just uploaded earlier.
Wait till the provisioning process is done and check your Windows 365 Cloud PC that’s running your custom image! |
AIB Azure Compute Galleries Azure Image Builder CPC Custom images Windows 365 Cloud PC