Skip to content

Commit 02a4120

Browse files
committed
updates
1 parent d3d5162 commit 02a4120

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

azure-local/manage/virtual-machine-image-azure-compute-gallery.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,44 @@ ms.date: 05/06/2025
1414

1515
[!INCLUDE [hci-applies-to-23h2](../includes/hci-applies-to-23h2.md)]
1616

17-
This article describes how to create virtual machine (VM) images for Azure Local using source images from Azure Marketplace. You can create VM images using the Azure portal or Azure CLI and then use these VM images to create Arc VMs on Azure Local.
17+
This article describes how to create Azure Local VMs enabled by Azure Arc using source images from the Azure Compute Gallery. You can create VM images on Azure CLI using the following steps and then use these VM images to create Azure Local VMs.
1818

1919
## Prerequisites
2020

2121
Before you begin, make sure that the following prerequisites are completed.
2222

2323
- Make sure to review and [complete the prerequisites](./azure-arc-vm-management-prerequisites.md).
24+
- Make sure that your image is using a [supported operating system](/azure/azure-arc/servers/prerequisites#supported-operating-systems).
25+
- For custom images in Azure Storage account, you have the following extra prerequisites:
26+
- You should have a VHD loaded in your Azure Storage account. See how to [Upload a VHD image in your Azure Storage account](/azure/databox-online/azure-stack-edge-gpu-create-virtual-machine-image#copy-vhd-to-storage-account-using-azcopy).
27+
- Make sure that you're uploading your VHD or VHDX as a page blob image into the Storage account. Only page blob images are supported to create VM images via the Storage account.
28+
- If using a VHDX:
29+
- The VHDX image must be Gen 2 type and secure boot enabled.
30+
- The VHDX image must be prepared using `sysprep /generalize /shutdown /oobe`. For more information, see [Sysprep command-line options](/windows-hardware/manufacture/desktop/sysprep-command-line-options).
2431

2532
## Export image to managed disk
2633

27-
To transfer your Azure compute gallery image to be an Azure Local compatible image, you export your Azure Compute Gallery image version to a managed disk.
34+
To transfer your Azure compute gallery image to be an Azure Local compatible image, you need to export your Azure Compute Gallery image version to a managed disk.
2835

29-
Follow these steps to create a VM image using the Azure CLI.
36+
1. To download the Azure Compute Gallery image to your resource group, follow the steps in [Export an image version to a managed disk](/azure/virtual-machines/managed-disk-from-image-version). Note the name of the managed disk.
37+
38+
1. Obtain the SAS token of the managed disk by using the following command:
39+
40+
```azurecli
41+
az disk grant-access --resource-group $resourceGroupName --name $diskName --duration-in-seconds $sasExpiryDuration --query [accessSas] -o tsv
42+
```
3043
3144
## Create Azure Local image
3245
33-
[Create Azure Local VMs enabled by Azure Arc in Azure Storage account](virtual-machine-image-storage-account.md#set-some-parameters)
46+
To create an Azure Local image:
47+
48+
1. Follow the steps in [Create Azure Local VM image in Azure Storage account](virtual-machine-image-storage-account.md#set-some-parameters), using the SAS token from the managed disk instead of the storage account container.
3449
35-
## Delete managed disk
50+
1. To avoid costs associated with a disk, make sure to delete the managed disk that was used to create this image using the following command:
3651
37-
To avoid costs associated with a disk, make sure to delete the managed disk that was used to create this image.
52+
```azurecli
53+
az disk delete --name $diskName --resource-group $resourceGroupName
54+
```
3855
3956
## Next steps
4057

0 commit comments

Comments
 (0)