Deploy Windows Server Azure Edition VMs
Applies to: Azure Stack HCI, version 22H2
The Windows Server Azure Edition operating system can be deployed as a guest virtual machine (VM) on Azure Stack HCI. This article describes how to deploy and hotpatch Windows Server Azure Edition VMs starting with an image in Azure Stack HCI marketplace or an image in Azure Marketplace.
To upgrade an existing VM to Windows Server Azure Edition, see Upgrade VMs to Windows Server Azure Edition.
Considerations
To use Windows Server Azure Edition on your Azure Stack HCI environment, here are a couple of considerations:
Azure Stack HCI host version: Windows Server Azure Edition can be deployed only on Azure Stack HCI version 21H2 and Azure Stack HCI version 22H2.
VM licensing: Windows Server Azure Edition can be licensed with either:
Windows Server subscription: Turn on the subscription on your Azure Stack HCI cluster, then apply AVMA client keys on the guest. To learn more, see Activate Windows Server subscription.
Bring Your Own License (BYOL): If you have a valid Windows Server Datacenter license with active Software Assurance (SA), you can use AVMA or KMS for guest activation.
Tip
If you already have Windows Server Datacenter licenses with active Software Assurance, you can also turn on Windows Server subscription at no additional cost through Azure Hybrid Benefit. This is more convenient and allows you to save more.
Azure Benefits: You'll need to enable Azure Benefits on your cluster. Azure Benefits is an attestation feature on Azure Stack HCI that makes it possible to run supported Azure-exclusive workloads like Windows Server Azure Edition. For specific information, see Azure Benefits on Azure Stack HCI.
Deploy the OS
Windows Server Azure Edition can be deployed as a guest VM using an Azure Marketplace VHD image.
You can provision a Windows Server Azure Edition VM using an Azure Marketplace image using the process described below.
You can run the commands below using locally using the Azure CLI.
Using Azure CLI locally: Run the az login command to sign into Azure. Follow any other prompts to finish signing in.
If this is your first time using Azure CLI, install any required extensions as described in Use extensions with the Azure CLI.
Run the az version command to make sure your client is up to date. If it's out of date, run the az upgrade command to upgrade to the latest version.
1. Download OS image
You can find Windows Server Azure Edition images that are available to download by using the search function in Azure Marketplace in the Azure portal. The example query below has search criteria for Windows Server 2022 Azure Edition Core:
az vm image list --all --publisher "microsoftwindowsserver" --offer "WindowsServer" --sku "2022-datacenter-azure-edition-core"
This command should return the following example result:
MicrosoftWindowsServer:WindowsServer:2022-datacenter-azure-edition-core:latest
2. Create a new Azure managed disk
Next, you'll create an Azure managed disk from the image you downloaded from Azure Marketplace.
To create an Azure managed disk:
Run the following commands in an Azure command prompt to set the parameters of your managed disk. Make sure to replace the items in brackets with relevant values:
$urn = <URN_of_Marketplace_image> #Example: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-azure-edition-core:latest" $diskName = <disk_name> #Name for new disk to be created $diskRG = <resource_group> #Resource group that contains the new disk
Run the following commands to create the disk and generate a Serial Attached SCSI (SAS) access URL:
az disk create -g $diskRG -n $diskName --image-reference $urn $sas = az disk grant-access --duration-in-seconds 36000 --access-level Read --name $diskName --resource-group $diskRG $diskAccessSAS = ($sas | ConvertFrom-Json)[0].accessSas
3. Export VHD to Azure Stack HCI cluster
Next, you'll need to export the VHD you created from the managed disk to your Azure Stack HCI cluster, which will let you create new VMs. Use the following method using a regular web browser or using Azure Storage Explorer.
To export the VHD:
Open a browser and go to the SAS URL of the managed disk you created at Create a new Azure managed disk from the image. You can download the VHD image for the image you downloaded at Azure Marketplace at this URL.
Download the VHD image. The process might take several minutes. Make sure the image has fully downloaded before proceeding. If you're running the azcopy command, you can skip MD5 checksum validation by running this command:
azcopy copy "$sas" "destination_path_on_cluster" --check-md5 NoCheck
4. Clean up the disk
When you're done with your VHD, free up space by deleting the managed disk.
To delete the managed disk you created, first revoke access:
az disk revoke-access --name $diskName --resource-group $diskRG
Then, delete the disk:
az disk delete --name $diskName --resource-group $diskRG --yes
5. (Optional) Convert to dynamic VHDX
Optionally, you can convert the downloaded VHD to a dynamic VHDX by running the following PowerShell command:
Convert-VHD -Path "<path_to_vhd\filename.vhd>" -DestinationPath "destination_path_on_cluster\filename.vhdx" -VHDType Dynamic
Using Hotpatch
There are a few important differences using Hotpatch with Azure Edition guest VMs on Azure Stack HCI as compared to using Hotpatch with Azure Edition guest VMs on Azure IaaS.
These differences include the following limitations for using Hotpatch with Azure Edition guest VMs for this Azure Stack HCI release:
- Hotpatch configuration isn't available using Azure Update Manager.
- Hotpatch can't be disabled.
- Automatic Patching orchestration isn't available.