You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Find Azure Marketplace image information using the Azure CLI
14
14
@@ -29,7 +29,7 @@ A Marketplace image in Azure has the following attributes:
29
29
30
30
These values can be passed individually or as an image *URN*, combining the values separated by the colon (:). For example: *Publisher*:*Offer*:*Sku*:*Version*. You can replace the version number in the URN with `latest` to use the latest version of the image.
31
31
32
-
If the image publisher provides additional license and purchase terms, then you must accept those before you can use the image. For more information, see [Check the purchase plan information](#check-the-purchase-plan-information).
32
+
If the image publisher provides extra license and purchase terms, then you must accept those terms before you can use the image. For more information, see [Check the purchase plan information](#check-the-purchase-plan-information).
33
33
34
34
35
35
@@ -41,7 +41,7 @@ You can run the [az vm image list --all](/cli/azure/vm/image) to see all of the
41
41
az vm image list --output table
42
42
```
43
43
44
-
The output includes the image URN. You can also use the *UrnAlias* which is a shortened version created for popular images like *UbuntuLTS*.
44
+
The output includes the image URN. You can also use the *UrnAlias*, which is a shortened version created for popular images like *UbuntuLTS*.
45
45
46
46
```output
47
47
Offer Publisher Sku Urn UrnAlias Version
@@ -79,7 +79,7 @@ az vm image list --offer Debian --all --output table
79
79
80
80
Another way to find an image in a location is to run the [az vm image list-publishers](/cli/azure/vm/image), [az vm image list-offers](/cli/azure/vm/image), and [az vm image list-skus](/cli/azure/vm/image) commands in sequence. With these commands, you determine these values:
81
81
82
-
1. List the image publishers for a location. In this example, we are looking at the *West US* region.
82
+
1. List the image publishers for a location. In this example, we're looking at the *West US* region.
83
83
84
84
```azurecli
85
85
az vm image list-publishers --location westus --output table
@@ -107,20 +107,20 @@ Another way to find an image in a location is to run the [az vm image list-publi
107
107
--all --output table
108
108
```
109
109
110
-
Pass this value of the URN column with the `--image` parameter when you create a VM with the [az vm create](/cli/azure/vm) command. You can also replace the version number in the URN with "latest", to simply use the latest version of the image.
110
+
Pass this value of the URN column with the `--image` parameter when you create a VM with the [az vm create](/cli/azure/vm) command. You can also replace the version number in the URN with "latest", to use the latest version of the image.
111
111
112
112
If you deploy a VM with a Resource Manager template, you set the image parameters individually in the `imageReference` properties. See the [template reference](/azure/templates/microsoft.compute/virtualmachines).
113
113
114
114
115
115
## Check the purchase plan information
116
116
117
-
Some VM images in the Azure Marketplace have additional license and purchase terms that you must accept before you can deploy them programmatically.
117
+
Some VM images in the Azure Marketplace have extra license and purchase terms that you must accept before you can deploy them programmatically.
118
118
119
119
To deploy a VM from such an image, you'll need to accept the image's terms the first time you use it, once per subscription. You'll also need to specify *purchase plan* parameters to deploy a VM from that image
120
120
121
-
To view an image's purchase plan information, run the [az vm image show](/cli/azure/image) command with the URN of the image. If the `plan` property in the output is not `null`, the image has terms you need to accept before programmatic deployment.
121
+
To view an image's purchase plan information, run the [az vm image show](/cli/azure/image) command with the URN of the image. If the `plan` property in the output isn't `null`, the image has terms you need to accept before programmatic deployment.
122
122
123
-
For example, the Canonical Ubuntu Server 18.04 LTS image doesn't have additional terms, because the `plan` information is `null`:
123
+
For example, the Canonical Ubuntu Server 18.04 LTS image doesn't have extra terms, because the `plan` information is `null`:
124
124
125
125
```azurecli
126
126
az vm image show --location westus --urn Canonical:UbuntuServer:18.04-LTS:latest
@@ -206,7 +206,7 @@ az vm image terms accept --urn bitnami:rabbitmq:rabbitmq:latest
206
206
207
207
With information about the image, you can deploy it using the `az vm create` command.
208
208
209
-
To deploy an image that does not have plan information, like the latest Ubuntu Server 18.04 image from Canonical, pass the URN for `--image`:
209
+
To deploy an image that doesn't have plan information, like the latest Ubuntu Server 18.04 image from Canonical, pass the URN for `--image`:
210
210
211
211
```azurecli-interactive
212
212
az group create --name myURNVM --location westus
@@ -235,20 +235,20 @@ az vm create \
235
235
--plan-publisher bitnami
236
236
```
237
237
238
-
If you get a message about accepting the terms of the image, review section [Accept the terms](#accept-the-terms). Make sure the output of `az vm image accept-terms` returns the value `"accepted": true,` showing that you have accepted the terms of the image.
238
+
If you get a message about accepting the terms of the image, review section [Accept the terms](#accept-the-terms). Make sure the output of `az vm image accept-terms` returns the value `"accepted": true,` showing that you've accepted the terms of the image.
239
239
240
240
241
241
## Using an existing VHD with purchase plan information
242
242
243
-
If you have an existing VHD from a VM that was created using a paid Azure Marketplace image, you might need to supply the purchase plan information when you create a new VM from that VHD.
243
+
If you have an existing VHD from a VM that was created using a paid Azure Marketplace image, you might need to give the purchase plan information when creating a new VM from that VHD.
244
244
245
245
If you still have the original VM, or another VM created using the same marketplace image, you can get the plan name, publisher, and product information from it using [az vm get-instance-view](/cli/azure/vm#az-vm-get-instance-view). This example gets a VM named *myVM* in the *myResourceGroup* resource group and then displays the purchase plan information.
246
246
247
247
```azurecli-interactive
248
248
az vm get-instance-view -g myResourceGroup -n myVM --query plan
249
249
```
250
250
251
-
If you didn't get the plan information before the original VM was deleted, you can file a [support request](https://portal.azure.com/#create/Microsoft.Support). They will need the VM name, subscription ID and the time stamp of the delete operation.
251
+
If you didn't get the plan information before the original VM was deleted, you can file a [support request](https://portal.azure.com/#create/Microsoft.Support). They'll need the VM name, subscription ID and the time stamp of the delete operation.
252
252
253
253
Once you have the plan information, you can create the new VM using the `--attach-os-disk` parameter to specify the VHD.
0 commit comments