Skip to content

Commit 753dee2

Browse files
committed
update
1 parent 7f553be commit 753dee2

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

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

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ Before you begin, make sure that the following prerequisites are completed.
2828
- The VHDX image must be Gen 2 type and secure boot enabled.
2929
- 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).
3030

31-
## Export image to managed disk
31+
## Create an Azure Local VM image from Azure Compute Gallery
32+
33+
Follow these steps to create an Azure Local VM image using Azure CLI.
34+
35+
### Sign in and set subscription
36+
37+
[!INCLUDE [hci-vm-sign-in-set-subscription](../includes/hci-vm-sign-in-set-subscription.md)]
38+
39+
### Export image to managed disk
3240

3341
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.
3442

@@ -40,9 +48,9 @@ To transfer your Azure Compute Gallery image to be an Azure Local compatible ima
4048
az disk grant-access --resource-group $resourceGroupName --name $diskName --duration-in-seconds $sasExpiryDuration --query [accessSas] -o tsv
4149
```
4250
43-
## Set parameters
51+
### Set parameters
4452
45-
Before creating an Azure Local VM image, you'll first need to set some parameters:
53+
Before creating an Azure Local VM image, you'll need to set some parameters.
4654
4755
1. Set your subscription, resource group, location, path to the image in local share, and OS type for the image. Replace the parameters in `< >` with the appropriate values.
4856
@@ -66,15 +74,15 @@ The parameters are described in the following table:
6674
6775
Here's a sample output:
6876
69-
```azurecli
70-
PS C:\Users\azcli> $subscription = "<Subscription ID>"
71-
PS C:\Users\azcli> $resource_group = "mylocal-rg"
72-
PS C:\Users\azcli> $location = "eastus"
73-
PS C:\Users\azcli> $osType = "Windows"
74-
PS C:\Users\azcli> $imageName = "mylocal-computegalleryimage"
75-
```
77+
```azurecli
78+
PS C:\Users\azcli> $subscription = "<Subscription ID>"
79+
PS C:\Users\azcli> $resource_group = "mylocal-rg"
80+
PS C:\Users\azcli> $location = "eastus"
81+
PS C:\Users\azcli> $osType = "Windows"
82+
PS C:\Users\azcli> $imageName = "mylocal-computegalleryimage"
83+
```
7684

77-
## Create an Azure Local VM image
85+
### Create an Azure Local VM image
7886

7987
To create an Azure Local VM image:
8088

@@ -96,14 +104,12 @@ To create an Azure Local VM image:
96104
97105
If the flag is not specified, the workload data is automatically placed in a high availability storage path.
98106
99-
The image deployment takes a few minutes to complete. The time taken to download the image depends on the size of the image and the network bandwidth available for the download.
107+
The image deployment takes a few minutes to complete. The time taken to download the image depends on the size of the image and the network bandwidth available for the download.
108+
109+
Here's a sample output:
100110
101-
Here's a sample output:
102-
103111
```azurecli
104-
PS C:\Users\azcli> az stack-hci-vm image create -g $rg --custom-location $cl --name "mylocal-image" --os-type "Windows" --image-path $sas
105-
106-
{
112+
{
107113
"extendedLocation": {
108114
"name": "/subscriptions/<Subscription ID>/resourceGroups/mylocal-rg/providers/Microsoft.ExtendedLocation/customLocations/mylocal-cl",
109115
"type": "CustomLocation"
@@ -128,7 +134,7 @@ Here's a sample output:
128134
"errorMessage": "",
129135
"progressPercentage": 100,
130136
"provisioningStatus": {
131-
"operationId": "c8ddceb0-024a-4c2c-b085-5851f49c8e70*C185A1631E1C1B45E1069847327BBD6B413DB17AA1F8C87B2911596ACA473D16",
137+
"operationId": "00000000-0000-0000-0000-000000000000*0000000000000000000000000000000000000000000000000000000000000000",
132138
"status": "Succeeded"
133139
}
134140
},
@@ -144,13 +150,13 @@ Here's a sample output:
144150
},
145151
"vmImageRepositoryCredentials": null
146152
},
147-
"resourceGroup": "EDGECI-REGISTRATION-rr1s45r2305-yxwEPQD5",
153+
"resourceGroup": "mylocal-rg",
148154
"systemData": {
149155
"createdAt": "2025-05-21T00:44:16.385633+00:00",
150156
"createdBy": "[email protected]",
151157
"createdByType": "User",
152158
"lastModifiedAt": "2025-05-21T00:48:34.016113+00:00",
153-
"lastModifiedBy": "319f651f-7ddb-4fc6-9857-7aef9250bd05",
159+
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
154160
"lastModifiedByType": "Application"
155161
},
156162
"tags": null,

0 commit comments

Comments
 (0)