Skip to content

Commit 7f553be

Browse files
committed
update
1 parent 91f1030 commit 7f553be

File tree

1 file changed

+72
-73
lines changed

1 file changed

+72
-73
lines changed

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

Lines changed: 72 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ To transfer your Azure Compute Gallery image to be an Azure Local compatible ima
4040
az disk grant-access --resource-group $resourceGroupName --name $diskName --duration-in-seconds $sasExpiryDuration --query [accessSas] -o tsv
4141
```
4242
43-
## Set some parameters
43+
## Set parameters
4444
45-
### Set some parameters
45+
Before creating an Azure Local VM image, you'll first need to set some parameters:
4646
4747
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.
4848
49-
```azurecli
50-
$subscription = "<Subscription ID>"
51-
$resource_group = "<Resource group>"
52-
$location = "<Location for your Azure Local>"
53-
$osType = "<OS of source image>"
54-
$imageName = "<VM image name>"
55-
```
49+
```azurecli
50+
$subscription = "<Subscription ID>"
51+
$resource_group = "<Resource group>"
52+
$location = "<Location for your Azure Local>"
53+
$osType = "<OS of source image>"
54+
$imageName = "<VM image name>"
55+
```
5656
5757
The parameters are described in the following table:
5858
@@ -66,13 +66,13 @@ The parameters are described in the following table:
6666
6767
Here's a sample output:
6868
69-
```
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-
```
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+
```
7676
7777
## Create an Azure Local VM image
7878
@@ -99,66 +99,65 @@ To create an Azure Local VM image:
9999
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.
100100
101101
Here's a sample output:
102-
103-
```
104-
PS > $customLocationID=(az customlocation show --resource-group $resource_group --name "mylocal-cl" --query id -o tsv)
105-
PS C:\Users\azcli> az stack-hci-vm image create -g $rg --custom-location $cl --name "ws2022-acg" --os-type "Windows" --image-path $sas
106-
107-
{
108-
"extendedLocation": {
109-
"name": "/subscriptions/304d8fdf-1c02-4907-9c3a-ddbd677199cd/resourceGroups/EDGECI-REGISTRATION-rr1s45r2305-yxwEPQD5/providers/Microsoft.ExtendedLocation/customLocations/s45r2305-cl-customlocation",
110-
"type": "CustomLocation"
111-
},
112-
"id": "/subscriptions/304d8fdf-1c02-4907-9c3a-ddbd677199cd/resourceGroups/EDGECI-REGISTRATION-rr1s45r2305-yxwEPQD5/providers/Microsoft.AzureStackHCI/galleryImages/ws2022-acg",
113-
"location": "eastus2euap",
114-
"name": "ws2022-acg",
115-
"properties": {
116-
"cloudInitDataSource": null,
117-
"containerId": "/subscriptions/304d8fdf-1c02-4907-9c3a-ddbd677199cd/resourceGroups/EDGECI-REGISTRATION-rr1s45r2305-yxwEPQD5/providers/Microsoft.AzureStackHCI/storageContainers/UserStorage2-213e900d7d9646a18b0f0d78e05d2fac",
118-
"hyperVGeneration": null,
119-
"identifier": null,
120-
"imagePath": null,
121-
"osType": "Windows",
122-
"provisioningState": "Succeeded",
123-
"sourceVirtualMachineId": null,
124-
"status": {
125-
"downloadStatus": {
126-
"downloadSizeInMb": 11482
102+
103+
```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+
{
107+
"extendedLocation": {
108+
"name": "/subscriptions/<Subscription ID>/resourceGroups/mylocal-rg/providers/Microsoft.ExtendedLocation/customLocations/mylocal-cl",
109+
"type": "CustomLocation"
127110
},
128-
"errorCode": "",
129-
"errorMessage": "",
130-
"progressPercentage": 100,
131-
"provisioningStatus": {
132-
"operationId": "c8ddceb0-024a-4c2c-b085-5851f49c8e70*C185A1631E1C1B45E1069847327BBD6B413DB17AA1F8C87B2911596ACA473D16",
133-
"status": "Succeeded"
134-
}
135-
},
136-
"version": {
137-
"name": null,
111+
"id": "/subscriptions/<Subscription ID>/resourceGroups/mylocal-rg/providers/Microsoft.AzureStackHCI/galleryImages/mylocal-image",
112+
"location": "eastus2euap",
113+
"name": "mylocal-image",
138114
"properties": {
139-
"storageProfile": {
140-
"osDiskImage": {
141-
"sizeInMb": 130050
115+
"cloudInitDataSource": null,
116+
"containerId": "/subscriptions/<Subscription ID>/resourceGroups/mylocal-rg/providers/Microsoft.AzureStackHCI/storageContainers/mylocal-storagepath",
117+
"hyperVGeneration": null,
118+
"identifier": null,
119+
"imagePath": null,
120+
"osType": "Windows",
121+
"provisioningState": "Succeeded",
122+
"sourceVirtualMachineId": null,
123+
"status": {
124+
"downloadStatus": {
125+
"downloadSizeInMb": 11482
126+
},
127+
"errorCode": "",
128+
"errorMessage": "",
129+
"progressPercentage": 100,
130+
"provisioningStatus": {
131+
"operationId": "c8ddceb0-024a-4c2c-b085-5851f49c8e70*C185A1631E1C1B45E1069847327BBD6B413DB17AA1F8C87B2911596ACA473D16",
132+
"status": "Succeeded"
142133
}
143-
}
144-
}
145-
},
146-
"vmImageRepositoryCredentials": null
147-
},
148-
"resourceGroup": "EDGECI-REGISTRATION-rr1s45r2305-yxwEPQD5",
149-
"systemData": {
150-
"createdAt": "2025-05-21T00:44:16.385633+00:00",
151-
"createdBy": "[email protected]",
152-
"createdByType": "User",
153-
"lastModifiedAt": "2025-05-21T00:48:34.016113+00:00",
154-
"lastModifiedBy": "319f651f-7ddb-4fc6-9857-7aef9250bd05",
155-
"lastModifiedByType": "Application"
156-
},
157-
"tags": null,
158-
"type": "microsoft.azurestackhci/galleryimages"
159-
}
160-
```
161-
134+
},
135+
"version": {
136+
"name": null,
137+
"properties": {
138+
"storageProfile": {
139+
"osDiskImage": {
140+
"sizeInMb": 130050
141+
}
142+
}
143+
}
144+
},
145+
"vmImageRepositoryCredentials": null
146+
},
147+
"resourceGroup": "EDGECI-REGISTRATION-rr1s45r2305-yxwEPQD5",
148+
"systemData": {
149+
"createdAt": "2025-05-21T00:44:16.385633+00:00",
150+
"createdBy": "[email protected]",
151+
"createdByType": "User",
152+
"lastModifiedAt": "2025-05-21T00:48:34.016113+00:00",
153+
"lastModifiedBy": "319f651f-7ddb-4fc6-9857-7aef9250bd05",
154+
"lastModifiedByType": "Application"
155+
},
156+
"tags": null,
157+
"type": "microsoft.azurestackhci/galleryimages"
158+
}
159+
```
160+
162161
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:
163162
164163
```azurecli

0 commit comments

Comments
 (0)