|
| 1 | +--- |
| 2 | +title: Deploy Windows Server Azure Edition VMs on Azure Stack HCI, version 23H2 |
| 3 | +description: Learn how to deploy Windows Server Azure Edition VMs on Azure Stack HCI, version 23H2 starting with an image in Azure Stack HCI Marketplace or Azure Marketplace. |
| 4 | +ms.topic: conceptual |
| 5 | +author: alkohli |
| 6 | +ms.author: alkohli |
| 7 | +ms.reviewer: alkohli |
| 8 | +ms.service: azure-stack |
| 9 | +ms.subservice: azure-stack-hci |
| 10 | +ms.custom: |
| 11 | + - devx-track-azurecli |
| 12 | +ms.date: 05/31/2024 |
| 13 | +--- |
| 14 | + |
| 15 | +# Deploy Windows Server Azure Edition VMs on Azure Stack HCI, version 23H2 |
| 16 | + |
| 17 | +[!INCLUDE [hci-applies-to-23h2](../../includes/hci-applies-to-23h2.md)] |
| 18 | + |
| 19 | +The Windows Server Azure Edition operating system can be deployed as a guest virtual machine (VM) on Azure Stack HCI, version 23H2. 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. |
| 20 | + |
| 21 | +> [!NOTE] |
| 22 | +> Both Azure Arc VMs and non-Arc VMs are supported. |
| 23 | +
|
| 24 | +Azure Stack HCI is the only on-premises platform to run Windows Server Azure Edition with [Azure Automanage](/azure/automanage/automanage-windows-server-services-overview). Azure Automanage brings new capabilities specifically to Windows Server Azure Edition, including [Hotpatch](/azure/automanage/automanage-hotpatch), [SMB over QUIC](/windows-server/storage/file-server/smb-over-quic), and [Extended network for Azure](/windows-server/manage/windows-admin-center/azure/azure-extended-network). |
| 25 | + |
| 26 | +To upgrade an existing VM to Windows Server Azure Edition, see [Upgrade VMs to Windows Server Azure Edition](upgrade-vm-windows-server-azure-edition.md). |
| 27 | + |
| 28 | +## Considerations |
| 29 | + |
| 30 | +To use Windows Server Azure Edition on your Azure Stack HCI environment, here are a couple of considerations: |
| 31 | + |
| 32 | +- **Azure Stack HCI host version:** Windows Server Azure Edition can be deployed on Azure Stack HCI, version 23H2. |
| 33 | + |
| 34 | +- **VM licensing:** Windows Server Azure Edition can be licensed with either: |
| 35 | + |
| 36 | + - **Windows Server subscription**: Turn on the subscription on your Azure Stack HCI cluster, then choose one of the following options to activate: |
| 37 | + - Apply [AVMA client keys](/windows-server/get-started/automatic-vm-activation#avma-keys) on the guest VM using the `slmgr /ipk <AVMA_key>` command. |
| 38 | + - Apply AVMA client key on every Azure Stack HCI host using the `Set-VMAutomaticActivation <product key>` cmdlet. |
| 39 | + To learn more, see [Activate Windows Server subscription](vm-activate.md#activate-windows-server-subscription). |
| 40 | + |
| 41 | + - **Bring Your Own License (BYOL)**: If you have a valid Windows Server Datacenter license with active Software Assurance (SA), you can use [AVMA](vm-activate.md#activate-bring-your-own-license-byol-through-avma) or [KMS](/windows-server/get-started/kms-client-activation-keys) for guest activation. |
| 42 | + |
| 43 | + > [!Tip] |
| 44 | + > 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](../concepts/azure-hybrid-benefit-hci.md?tabs=azureportal). This is more convenient and allows you to save more. |
| 45 | +
|
| 46 | +- **Azure verification for VMs:** You must enable Azure verification for VMs on your cluster. Azure VM verification is an attestation feature on Azure Stack HCI that makes it possible to run supported Azure-exclusive workloads, such as Windows Server Azure Edition. For more information, see [Azure verification for VMs](../deploy/azure-verification.md). |
| 47 | + |
| 48 | + > [!NOTE] |
| 49 | + > If you are experiencing issues with Windows Server Azure Edition, a member of the Administrator group needs to sign onto the Azure Stack HCI host to perform attestation and provide the proper license. For more information, see the [Troubleshooting](#troubleshooting) section in this article. |
| 50 | +
|
| 51 | +## Deploy the OS |
| 52 | + |
| 53 | +Windows Server Azure Edition can be deployed as a guest VM using either an HCI Marketplace VHD image or an [Azure Marketplace](/marketplace/azure-marketplace-overview) VHD image. |
| 54 | + |
| 55 | +## [HCI marketplace image](#tab/hci) |
| 56 | + |
| 57 | +You can provision a Windows Server Azure Edition VM using an Azure Stack HCI Marketplace image in conjunction with [VM provisioning using Azure portal](azure-arc-vm-management-overview.md). |
| 58 | + |
| 59 | +You do this by following these steps: |
| 60 | + |
| 61 | +1. Deploy [Azure Arc VM management](azure-arc-vm-management-overview.md#) on your Azure Stack HCI. |
| 62 | + |
| 63 | +1. Learn about how certain [Azure Marketplace images](virtual-machine-image-azure-marketplace.md) can now be used to create VMs on Azure Stack HCI. |
| 64 | + |
| 65 | +1. Configure a new Azure Stack HCI gallery OS image for Windows Server Azure Edition that links to the corresponding Azure Marketplace OS image. |
| 66 | + |
| 67 | +1. Use the Windows Server Azure Edition HCI gallery OS image to provision a VM. |
| 68 | + |
| 69 | +## [Azure Marketplace image](#tab/azure) |
| 70 | + |
| 71 | +You can provision a Windows Server Azure Edition VM using an Azure Marketplace image using the process described below. |
| 72 | + |
| 73 | +You can run the commands below from the Azure portal using either the Azure Cloud Shell or locally using the Azure CLI. |
| 74 | + |
| 75 | +**Using Azure Cloud Shell:** Make sure you're connected to Azure and are running [Azure Cloud Shell](/azure/cloud-shell/overview) in either a command prompt or in a bash environment. |
| 76 | + |
| 77 | +**Using Azure CLI locally:** Run the [az login](/cli/azure/reference-index?#az-login) command to sign into Azure. Follow any other prompts to finish signing in. |
| 78 | + |
| 79 | +If this is your first time using Azure CLI, install any required extensions as described in [Use extensions with the Azure CLI](/cli/azure/azure-cli-extensions-overview). |
| 80 | + |
| 81 | +Run the [az version](/cli/azure/reference-index?#az-version) command to make sure your client is up to date. If it's out of date, run the [az upgrade](/cli/azure/reference-index?#az-upgrade) command to upgrade to the latest version. |
| 82 | + |
| 83 | +### 1. Download OS image |
| 84 | + |
| 85 | +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: |
| 86 | + |
| 87 | +```powershell |
| 88 | +az vm image list --all --publisher "microsoftwindowsserver" --offer "WindowsServer" --sku "2022-datacenter-azure-edition-core" |
| 89 | +``` |
| 90 | + |
| 91 | +This command should return the following example result: |
| 92 | + |
| 93 | +```output |
| 94 | +MicrosoftWindowsServer:WindowsServer:2022-datacenter-azure-edition-core:latest |
| 95 | +``` |
| 96 | + |
| 97 | +### 2. Create a new Azure managed disk |
| 98 | + |
| 99 | +Next, you'll create an Azure managed disk from the image you downloaded from Azure Marketplace. |
| 100 | + |
| 101 | +To create an Azure managed disk: |
| 102 | + |
| 103 | +1. 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: |
| 104 | + |
| 105 | + ```azurecli |
| 106 | + $urn = <URN_of_Marketplace_image> #Example: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-azure-edition-core:latest" |
| 107 | + $diskName = <disk_name> #Name for new disk to be created |
| 108 | + $diskRG = <resource_group> #Resource group that contains the new disk |
| 109 | + ``` |
| 110 | +
|
| 111 | +1. Run the following commands to create the disk and generate a Serial Attached SCSI (SAS) access URL: |
| 112 | +
|
| 113 | + ```azurecli |
| 114 | + az disk create -g $diskRG -n $diskName --image-reference $urn |
| 115 | + $sas = az disk grant-access --duration-in-seconds 36000 --access-level Read --name $diskName --resource-group $diskRG |
| 116 | + $diskAccessSAS = ($sas | ConvertFrom-Json)[0].accessSas |
| 117 | + ``` |
| 118 | +
|
| 119 | +### 3. Export VHD to Azure Stack HCI cluster |
| 120 | +
|
| 121 | +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. |
| 122 | +
|
| 123 | +To export the VHD: |
| 124 | +
|
| 125 | +1. 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](/azure/virtual-desktop/azure-stack-hci#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. |
| 126 | +
|
| 127 | +1. 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](/azure/storage/common/storage-ref-azcopy) command, you can skip MD5 checksum validation by running this command: |
| 128 | +
|
| 129 | + ```powershell |
| 130 | + azcopy copy "$sas" "destination_path_on_cluster" --check-md5 NoCheck |
| 131 | + ``` |
| 132 | +
|
| 133 | +### 4. Clean up the disk |
| 134 | +
|
| 135 | +When you're done with your VHD, free up space by deleting the managed disk. |
| 136 | +
|
| 137 | +To delete the managed disk you created, first revoke access: |
| 138 | +
|
| 139 | +```powershell |
| 140 | +az disk revoke-access --name $diskName --resource-group $diskRG |
| 141 | +``` |
| 142 | + |
| 143 | +Then, delete the disk: |
| 144 | + |
| 145 | +```powershell |
| 146 | +az disk delete --name $diskName --resource-group $diskRG --yes |
| 147 | +``` |
| 148 | + |
| 149 | +### 5. (Optional) Convert to dynamic VHDX |
| 150 | + |
| 151 | +Optionally, you can convert the downloaded VHD to a dynamic VHDX by running the following PowerShell command: |
| 152 | + |
| 153 | +```powershell |
| 154 | +Convert-VHD -Path "<path_to_vhd\filename.vhd>" -DestinationPath "destination_path_on_cluster\filename.vhdx" -VHDType Dynamic |
| 155 | +``` |
| 156 | + |
| 157 | +--- |
| 158 | + |
| 159 | +## Using Hotpatch |
| 160 | + |
| 161 | +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. |
| 162 | + |
| 163 | +These differences include the following limitations for using Hotpatch with Azure Edition guest VMs for this Azure Stack HCI release: |
| 164 | + |
| 165 | +- Hotpatch configuration isn't available using Azure Update Manager. |
| 166 | +- Hotpatch can't be disabled. |
| 167 | +- Automatic Patching orchestration isn't available. |
| 168 | + |
| 169 | +## Troubleshooting |
| 170 | + |
| 171 | +To obtain Azure verification for the Windows Server Azure Edition license, a member of the Administrator group is required to sign onto the host to enable attestation. In this case, run the following command in *FClip.exe* as an administrator in the system context: |
| 172 | + |
| 173 | +```cmd |
| 174 | +Schtasks /change /TN "\Microsoft\Windows\Clip\LicenseImdsIntegration" /RU "NT Authority\System" |
| 175 | +``` |
| 176 | + |
| 177 | +For more information, see [flcip](https://github.com/urbans0ft/fclip) on GitHub. |
| 178 | + |
| 179 | +## Next steps |
| 180 | + |
| 181 | +Learn more about [Azure Automanage for Windows Server](/azure/automanage/automanage-windows-server-services-overview). |
0 commit comments