Skip to content

Commit d82a085

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/azure-stack-docs-pr (branch live)
2 parents 14b395e + 93f488b commit d82a085

File tree

29 files changed

+89
-76
lines changed

29 files changed

+89
-76
lines changed
-1.47 KB
Loading
-16.5 KB
Loading

azure-stack/hci/manage/virtual-machine-image-azure-marketplace.md

Lines changed: 82 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: azure-stack
88
ms.subservice: azure-stack-hci
99
ms.custom:
1010
- devx-track-azurecli
11-
ms.date: 08/19/2024
11+
ms.date: 09/25/2024
1212
---
1313

1414
# Create Azure Stack HCI VM image using Azure Marketplace images
@@ -53,9 +53,9 @@ Follow these steps to create a VM image using the Azure CLI.
5353
```azurecli
5454
$subscription = "<Subscription ID>"
5555
$resource_group = "<Resource group>"
56+
$mktplaceImage = "<Marketplace image name>"
5657
$customLocationName = "<Custom location name>"
57-
$customLocationID
58-
/subscriptions/<Subscription ID>/resourcegroups/$resource_group/providers/microsoft.extendedlocation/customlocations/$customLocationName
58+
$customLocationID = (az customlocation show --resource-group $resource_group --name "<custom_location_name_for_Azure_Stack_HCI_cluster>" --query id -o tsv)
5959
$location = "<Location for your Azure Stack HCI cluster>"
6060
$osType = "<OS of source image>"
6161
```
@@ -65,7 +65,9 @@ Follow these steps to create a VM image using the Azure CLI.
6565
| Parameter | Description |
6666
|----------------|--------------------------------------------------------------------------------------------|
6767
| `subscription` | Subscription associated with your Azure Stack HCI cluster. |
68-
| `resource-group` | Resource group for Azure Stack HCI cluster that you associate with this image. |
68+
| `resource-group` | Resource group for Azure Stack HCI cluster that you associate with this image. |
69+
| `name` | Name of the marketplace image for Azure Stack HCI cluster. |
70+
| `customLocation` | Resource ID of custom location for Azure Stack HCI cluster. |
6971
| `location` | Location for your Azure Stack HCI cluster. For example, this could be `eastus`. |
7072
| `os-type` | Operating system associated with the source image. This can be Windows or Linux. |
7173
@@ -74,20 +76,24 @@ Follow these steps to create a VM image using the Azure CLI.
7476
```
7577
PS C:\Users\azcli> $subscription = "<Subscription ID>"
7678
PS C:\Users\azcli> $resource_group = "myhci-rg"
79+
PS C:\Users\azcli> $mktplaceImage= "myhci-marketplaceimage"
7780
PS C:\Users\azcli> $customLocationName = "myhci-cl"
81+
PS C:\Users\azcli> $customerLocationID /subscriptions$subscription/resourcegroups/$resource_group/providers/microsoft.extendedlocation/customlocations/$customLocationName
7882
PS C:\Users\azcli> $location = "eastus"
7983
PS C:\Users\azcli> $ostype = "Windows"
8084
```
8185
8286
### Create VM image from marketplace image
8387
84-
1. Select a custom location to deploy your VM image. The custom location should correspond to the custom location for your Azure Stack HCI cluster. Get the custom location ID for your Azure Stack HCI cluster. Run the following command:
88+
1. Set additional parameters that specify the intended VM image you would like to create. You will need to include the offer, publisher, SKU, and version for the marketplace image. Replace the parameters in \< \> with the appropriate values:
8589
8690
```azurecli
87-
$customLocationID=(az customlocation show --resource-group $resource_group --name "<custom_location_name_for_Azure_Stack_HCI_cluster>" --query id -o tsv)
91+
$publisher = "<Publisher name>"
92+
$offer = "<OS offer>"
93+
$sku = "<Image SKU>"
8894
```
8995
90-
1. Create the VM image starting with a specified marketplace image. Make sure to specify the offer, publisher, SKU, and version for the marketplace image. Use the following table to find the available marketplace images and their attribute values:
96+
Use the following table to find the available marketplace images and their attribute values:
9197
9298
| Name | Publisher | Offer | SKU |
9399
|------|-----------|-------|------|
@@ -103,81 +109,86 @@ Follow these steps to create a VM image using the Azure CLI.
103109
| Windows Server 2019 | microsoftwindowsserver | windowsserver | 2019-datacenter-gensecond<br>2019-datacenter-core-g2 |
104110
| SQL Server 2022 Enterprise on Windows Server 2022 | microsoftsqlserver | sql2022-ws2022 | enterprise-gen2<br>standard-gen2 |
105111
112+
If you wanted to create a Windows Server 2019 Datacenter image, you would have the following parameters:
113+
106114
107115
```azurecli
108-
az stack-hci-vm image create --subscription $subscription --resource-group $resource_group --custom-location $customLocationID --location $location --name "<VM_image_name>" --os-type $ostype --offer "windowsserver" --publisher "<publisher_name>" --sku "<SKU>"
116+
$publisher = "microsoftwindowsserver"
117+
$offer = "windowsserver"
118+
$sku = "2019-datacenter-gensecond"
109119
```
110120
111-
A deployment job starts for the VM image.
112-
113-
In this example, the storage path was specified using the `--storage-path-id` flag and that ensured that the workload data (including the VM, VM image, non-OS data disk) is placed in the specified storage path.
114-
115-
If the flag is not specified, the workload data is automatically placed in a high availability storage path.
121+
1. Create the VM image starting with a specified marketplace image:
116122
117-
The image deployment takes a few minutes to complete. The time taken to download the image depends on the size of the Marketplace image and the network bandwidth available for the download.
123+
```azurecli
124+
az stack-hci-vm image create --resource-group $resource_group --custom-location $customLocationID --name $mktplaceImage --os-type $ostype --offer $offer --publisher $publisher --sku $sku
125+
```
118126
119127
Here's a sample output:
120128
121129
```
122-
PS C:\Users\azcli> $customLocationID=(az customlocation show --resource-group $resource_group --name "myhci-cl" --query id -o tsv)
123-
PS C:\Users\azcli> $customLocationID
124-
/subscriptions/<Subscription ID>/resourcegroups/myhci-rg/providers/microsoft.extendedlocation/customlocations/myhci-cl
125-
PS C:\Users\azcli> az stack-hci-vm image create --subscription $subscription --resource-group $resource_group --custom-location $customLocationID --location $location --name "myhci-marketplaceimage" --os-type $ostype --offer "windowsserver" --publisher "microsoftwindowsserver" --sku "2022-datacenter-azure-edition-core" --version "20348.2031.231006" --storage-path-id $storagepathid
126-
{
127-
"extendedLocation": {
128-
"name": "/subscriptions/<Subscription ID>/resourceGroups/myhci-rg/providers/Microsoft.ExtendedLocation/customLocations/myhci-cl",
129-
"type": "CustomLocation"
130-
},
131-
"id": "/subscriptions/<Subscription ID>/resourceGroups/myhci-rg/providers/Microsoft.AzureStackHCI/marketplacegalleryimages/myhci-marketplaceimage",
132-
"location": "eastus",
133-
"name": "myhci-marketplaceimage",
134-
"properties": {
135-
"identifier": {
136-
"offer": "windowsserver",
137-
"publisher": "microsoftwindowsserver",
138-
"sku": "2022-datacenter-azure-edition-core"
139-
},
140-
"imagePath": null,
141-
"osType": "Windows",
142-
"provisioningState": "Succeeded",
143-
"status": {
144-
"downloadStatus": {
145-
"downloadSizeInMB": 6750
146-
},
147-
"progressPercentage": 98,
148-
"provisioningStatus": {
149-
"operationId": "13be90e0-a780-45bf-a84a-ae91b6e5e468*A380D53083FF6B0A3A157ED7DFD00D33F6B3D40D5559D11AEAED6AD68F7F1A4A",
150-
"status": "Succeeded"
151-
}
152-
},
153-
"storagepathId": "/subscriptions/<Subscription ID>/resourceGroups/myhci-rg/providers/Microsoft.AzureStackHCI/storagecontainers/myhci-storagepath",
154-
"version": {
155-
"name": "20348.2031.231006",
156-
"properties": {
157-
"storageProfile": {
158-
"osDiskImage": {
159-
"sizeInMB": 130050
160-
}
161-
}
162-
}
163-
}
164-
},
165-
"resourceGroup": "myhci-rg",
166-
"systemData": {
167-
"createdAt": "2023-10-27T21:43:15.920502+00:00",
168-
"createdBy": "[email protected]",
169-
"createdByType": "User",
170-
"lastModifiedAt": "2023-10-27T22:06:15.092321+00:00",
171-
"lastModifiedBy": "319f651f-7ddb-4fc6-9857-7aef9250bd05",
172-
"lastModifiedByType": "Application"
173-
},
174-
"tags": null,
175-
"type": "microsoft.azurestackhci/marketplacegalleryimages"
176-
}
177-
178-
PS C:\Users\azcli>
130+
PS C:\Users\azcli> az stack-hci-vm image create --custom-location $cl --name $mktplaceImage --os-type $ostype --resource-group $rg --publisher $publisher --offer $offer --sku $sku
131+
{
132+
"extendedLocation": {
133+
"name": “/subscriptions/<Subscription ID>/resourceGroups/myhci-rg/providers/Microsoft.ExtendedLocation/customLocations/myhci-cl",
134+
"type": "CustomLocation"
135+
},
136+
"id": "/subscriptions/<Subscription ID>/resourceGroups/myhci-rg/providers/Microsoft.AzureStackHCI/marketplacegalleryimages/myhci-marketplaceimage",
137+
\
138+
"location": "eastus",
139+
"name": "myhci-marketplaceimage",
140+
"properties": {
141+
"cloudInitDataSource": null,
142+
"containerId": null,
143+
"hyperVGeneration": null,
144+
"identifier": {
145+
"offer": "windowsserver",
146+
"publisher": "microsoftwindowsserver",
147+
"sku": "2019-datacenter-gensecond"
148+
},
149+
"osType": "Windows",
150+
"provisioningState": "Succeeded",
151+
"status": {
152+
"downloadStatus": {
153+
"downloadSizeInMb": 10832
154+
},
155+
"errorCode": "",
156+
"errorMessage": "",
157+
"progressPercentage": 100,
158+
"provisioningStatus": {
159+
"operationId": "13efc468-7473-429f-911b-858c1e6fc1d5*B11A62EE76B08EF194F8293CDD40F7BC71BFB93255D5A99DD11B4167690752D9",
160+
"status": "Succeeded"
161+
}
162+
},
163+
"version": {
164+
"name": "17763.6293.240905",
165+
"properties": {
166+
"storageProfile": {
167+
"osDiskImage": {
168+
"sizeInMb": 130050
169+
}
170+
}
171+
}
172+
173+
}
174+
},
175+
"resourceGroup": "myhci-rg",
176+
"systemData": {
177+
"createdAt": "2024-09-23T18:53:13.734389+00:00",
178+
"createdBy": "[email protected]",
179+
"createdByType": "User",
180+
"lastModifiedAt": "2024-09-23T19:06:07.532276+00:00",
181+
"lastModifiedBy": "319f651f-7ddb-4fc6-9857-7aef9250bd05",
182+
"lastModifiedByType": "Application"
183+
},
184+
185+
"tags": null,
186+
"type": "microsoft.azurestackhci/marketplacegalleryimages"
187+
}
179188
```
180189
190+
For more information on this CLI command, see [az stack-hci-vm image](/cli/azure/stack-hci-vm/image).
191+
181192
# [Azure portal](#tab/azureportal)
182193
183194
Follow these steps to create a VM image using the Azure portal. In the Azure portal of your Azure Stack HCI cluster resource, take the following steps:

azure-stack/includes/hci-delete-vm-image-azure-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ ms.service: azure-stack
55
ms.subservice: azure-stack-hci
66
ms.custom: devx-track-azurecli
77
ms.topic: include
8-
ms.date: 11/06/2023
8+
ms.date: 09/24/2024
99
---
1010

1111
1. Run PowerShell as an administrator.
12-
1. Set the following parameters.
12+
1. Set the following parameters:
1313

1414
```azurecli
1515
$subscription = "<Subscription ID>"
1616
$resource_group = "<Cluster resource group>"
17-
$galleryImageName = "<Gallery image name>"
17+
$mktplaceImage = "<Markeplace image name>"
1818
```
1919
2020
1. Remove an existing VM image. Run the following command:

azure-stack/includes/hci-list-vm-image-azure-cli.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.service: azure-stack
55
ms.subservice: azure-stack-hci
66
ms.custom: devx-track-azurecli
77
ms.topic: include
8-
ms.date: 11/06/2023
8+
ms.date: 09/24/2024
99
---
1010

1111
Follow these steps to list VM image using Azure CLI.
@@ -93,4 +93,6 @@ inServer2022Az-01",
9393
}
9494
]
9595
PS C:\Users\azcli>
96-
```
96+
```
97+
98+
For more information on this CLI command, see [az stack-hci-vm image list](/cli/azure/stack-hci-vm/image#az-stack-hci-vm-image-list).
Loading
-18.8 KB
Loading
16.6 KB
Loading
-3.7 KB
Loading
-4.89 KB
Loading

0 commit comments

Comments
 (0)