Skip to content

Commit 6b34401

Browse files
authored
Update tutorial-manage-vm.md
1 parent 0c41432 commit 6b34401

File tree

1 file changed

+51
-45
lines changed

1 file changed

+51
-45
lines changed

articles/virtual-machines/linux/tutorial-manage-vm.md

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: cynthn
55
ms.service: virtual-machines
66
ms.collection: linux
77
ms.topic: tutorial
8-
ms.date: 03/23/2018
8+
ms.date: 03/23/2023
99
ms.author: cynthn
1010
ms.custom: mvc, devx-track-azurecli
1111

@@ -118,34 +118,41 @@ x64 WindowsServer MicrosoftWindowsServer 2012-Datac
118118
x64 WindowsServer MicrosoftWindowsServer 2008-R2-SP1 MicrosoftWindowsServer:WindowsServer:2008-R2-SP1:latest Win2008R2SP1 latest
119119
```
120120

121-
A full list can be seen by adding the `--all` parameter. The image list can also be filtered by `--publisher` or `–-offer`. In this example, the list is filtered for all images with an offer that matches *CentOS*.
121+
A full list can be seen by adding the `--all` parameter. The image list can also be filtered by `--publisher` or `–-offer`. In this example, the list is filtered for all images, published by OpenLogic, with an offer that matches *CentOS*.
122122

123123
```azurecli-interactive
124-
az vm image list --offer CentOS --all --output table
124+
az vm image list --offer CentOS --publisher OpenLogic --all --output table
125125
```
126126

127-
Partial output:
127+
Example partial output:
128128

129129
```output
130-
Offer Publisher Sku Urn Version
131-
---------------- ---------------- ---- -------------------------------------- -----------
132-
CentOS OpenLogic 6.5 OpenLogic:CentOS:6.5:6.5.201501 6.5.201501
133-
CentOS OpenLogic 6.5 OpenLogic:CentOS:6.5:6.5.201503 6.5.201503
134-
CentOS OpenLogic 6.5 OpenLogic:CentOS:6.5:6.5.201506 6.5.201506
135-
CentOS OpenLogic 6.5 OpenLogic:CentOS:6.5:6.5.20150904 6.5.20150904
136-
CentOS OpenLogic 6.5 OpenLogic:CentOS:6.5:6.5.20160309 6.5.20160309
137-
CentOS OpenLogic 6.5 OpenLogic:CentOS:6.5:6.5.20170207 6.5.20170207
130+
Architecture Offer Publisher Sku Urn Version
131+
-------------- ------------------------- ----------- --------------- -------------------------------------------------------- ---------------
132+
x64 CentOS OpenLogic 8_2 OpenLogic:CentOS:8_2:8.2.2020111800 8.2.2020111800
133+
x64 CentOS OpenLogic 8_2-gen2 OpenLogic:CentOS:8_2-gen2:8.2.2020062401 8.2.2020062401
134+
x64 CentOS OpenLogic 8_2-gen2 OpenLogic:CentOS:8_2-gen2:8.2.2020100601 8.2.2020100601
135+
x64 CentOS OpenLogic 8_2-gen2 OpenLogic:CentOS:8_2-gen2:8.2.2020111801 8.2.2020111801
136+
x64 CentOS OpenLogic 8_3 OpenLogic:CentOS:8_3:8.3.2020120900 8.3.2020120900
137+
x64 CentOS OpenLogic 8_3 OpenLogic:CentOS:8_3:8.3.2021020400 8.3.2021020400
138+
x64 CentOS OpenLogic 8_3-gen2 OpenLogic:CentOS:8_3-gen2:8.3.2020120901 8.3.2020120901
139+
x64 CentOS OpenLogic 8_3-gen2 OpenLogic:CentOS:8_3-gen2:8.3.2021020401 8.3.2021020401
140+
x64 CentOS OpenLogic 8_4 OpenLogic:CentOS:8_4:8.4.2021071900 8.4.2021071900
141+
x64 CentOS OpenLogic 8_4-gen2 OpenLogic:CentOS:8_4-gen2:8.4.2021071901 8.4.2021071901
142+
x64 CentOS OpenLogic 8_5 OpenLogic:CentOS:8_5:8.5.2022012100 8.5.2022012100
143+
x64 CentOS OpenLogic 8_5 OpenLogic:CentOS:8_5:8.5.2022101800 8.5.2022101800
144+
x64 CentOS OpenLogic 8_5-gen2 OpenLogic:CentOS:8_5-gen2:8.5.2022012101 8.5.2022012101
138145
```
139146

140147

141148

142149
> [!NOTE]
143150
> Canonical has changed the **Offer** names they use for the most recent versions. Before Ubuntu 20.04, the **Offer** name is UbuntuServer. For Ubuntu 20.04 the **Offer** name is `0001-com-ubuntu-server-focal` and for Ubuntu 22.04 it's `0001-com-ubuntu-server-jammy`.
144151
145-
To deploy a VM using a specific image, take note of the value in the *Urn* column, which consists of the publisher, offer, SKU, and optionally a version number to [identify](cli-ps-findimage.md#terminology) the image. When specifying the image, the image version number can be replaced with `latest`, which selects the latest version of the distribution. In this example, the `--image` parameter is used to specify the latest version of a CentOS 6.5 image.
152+
To deploy a VM using a specific image, take note of the value in the *Urn* column, which consists of the publisher, offer, SKU, and optionally a version number to [identify](cli-ps-findimage.md#terminology) the image. When specifying the image, the image version number can be replaced with `latest`, which selects the latest version of the distribution. In this example, the `--image` parameter is used to specify the latest version of a CentOS 8.5.
146153

147154
```azurecli-interactive
148-
az vm create --resource-group myResourceGroupVM --name myVM2 --image OpenLogic:CentOS:6.5:latest --generate-ssh-keys
155+
az vm create --resource-group myResourceGroupVM --name myVM2 --image OpenLogic:CentOS:8_5:latest --generate-ssh-keys
149156
```
150157

151158
## Understand VM sizes
@@ -156,14 +163,14 @@ A virtual machine size determines the amount of compute resources such as CPU, G
156163

157164
The following table categorizes sizes into use cases.
158165

159-
| Type | Common sizes | Description |
160-
|--------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------|
161-
| [General purpose](../sizes-general.md) |B, Dsv3, Dv3, DSv2, Dv2, Av2, DC| Balanced CPU-to-memory. Ideal for dev / test and small to medium applications and data solutions. |
162-
| [Compute optimized](../sizes-compute.md) | Fsv2 | High CPU-to-memory. Good for medium traffic applications, network appliances, and batch processes. |
163-
| [Memory optimized](../sizes-memory.md) | Esv3, Ev3, M, DSv2, Dv2 | High memory-to-core. Great for relational databases, medium to large caches, and in-memory analytics. |
164-
| [Storage optimized](../sizes-storage.md) | Lsv2, Ls | High disk throughput and IO. Ideal for Big Data, SQL, and NoSQL databases. |
165-
| [GPU](../sizes-gpu.md) | NV, NVv2, NC, NCv2, NCv3, ND | Specialized VMs targeted for heavy graphic rendering and video editing. |
166-
| [High performance](../sizes-hpc.md) | H | Our most powerful CPU VMs with optional high-throughput network interfaces (RDMA). |
166+
| Type | Description |
167+
|--------------------------|------------------------------------------------------------------------------------------------------------------------------------|
168+
| [General purpose](../sizes-general.md) | Balanced CPU-to-memory. Ideal for dev / test and small to medium applications and data solutions. |
169+
| [Compute optimized](../sizes-compute.md) | High CPU-to-memory. Good for medium traffic applications, network appliances, and batch processes. |
170+
| [Memory optimized](../sizes-memory.md) | High memory-to-core. Great for relational databases, medium to large caches, and in-memory analytics. |
171+
| [Storage optimized](../sizes-storage.md) | High disk throughput and IO. Ideal for Big Data, SQL, and NoSQL databases. |
172+
| [GPU](../sizes-gpu.md) | Specialized VMs targeted for heavy graphic rendering and video editing. |
173+
| [High performance](../sizes-hpc.md) | Our most powerful CPU VMs with optional high-throughput network interfaces (RDMA). |
167174

168175

169176

@@ -180,22 +187,21 @@ Example partial output:
180187
```output
181188
MaxDataDiskCount MemoryInMb Name NumberOfCores OsDiskSizeInMb ResourceDiskSizeInMb
182189
------------------ ------------ ---------------------- --------------- ---------------- ----------------------
183-
2 3584 Standard_DS1 1 1047552 7168
184-
4 7168 Standard_DS2 2 1047552 14336
185-
8 14336 Standard_DS3 4 1047552 28672
186-
16 28672 Standard_DS4 8 1047552 57344
187-
4 14336 Standard_DS11 2 1047552 28672
188-
8 28672 Standard_DS12 4 1047552 57344
189-
16 57344 Standard_DS13 8 1047552 114688
190-
32 114688 Standard_DS14 16 1047552 229376
191-
1 768 Standard_A0 1 1047552 20480
192-
2 1792 Standard_A1 1 1047552 71680
193-
4 3584 Standard_A2 2 1047552 138240
194-
8 7168 Standard_A3 4 1047552 291840
195-
4 14336 Standard_A5 2 1047552 138240
196-
16 14336 Standard_A4 8 1047552 619520
197-
8 28672 Standard_A6 4 1047552 291840
198-
16 57344 Standard_A7 8 1047552 619520
190+
4 8192 Standard_D2ds_v4 2 1047552 76800
191+
8 16384 Standard_D4ds_v4 4 1047552 153600
192+
16 32768 Standard_D8ds_v4 8 1047552 307200
193+
32 65536 Standard_D16ds_v4 16 1047552 614400
194+
32 131072 Standard_D32ds_v4 32 1047552 1228800
195+
32 196608 Standard_D48ds_v4 48 1047552 1843200
196+
32 262144 Standard_D64ds_v4 64 1047552 2457600
197+
4 8192 Standard_D2ds_v5 2 1047552 76800
198+
8 16384 Standard_D4ds_v5 4 1047552 153600
199+
16 32768 Standard_D8ds_v5 8 1047552 307200
200+
32 65536 Standard_D16ds_v5 16 1047552 614400
201+
32 131072 Standard_D32ds_v5 32 1047552 1228800
202+
32 196608 Standard_D48ds_v5 48 1047552 1843200
203+
32 262144 Standard_D64ds_v5 64 1047552 2457600
204+
32 393216 Standard_D96ds_v5 96 1047552 3686400
199205
```
200206

201207
### Create VM with specific size
@@ -207,7 +213,7 @@ az vm create \
207213
--resource-group myResourceGroupVM \
208214
--name myVM3 \
209215
--image SLES \
210-
--size Standard_F4s \
216+
--size Standard_D2ds_v4 \
211217
--generate-ssh-keys
212218
```
213219

@@ -228,7 +234,7 @@ az vm list-vm-resize-options --resource-group myResourceGroupVM --name myVM --qu
228234
If the desired size is available, the VM can be resized from a powered-on state, however it is rebooted during the operation. Use the [az vm resize]( /cli/azure/vm) command to perform the resize.
229235

230236
```azurecli-interactive
231-
az vm resize --resource-group myResourceGroupVM --name myVM --size Standard_DS4_v2
237+
az vm resize --resource-group myResourceGroupVM --name myVM --size Standard_D4s_v3
232238
```
233239

234240
If the desired size is not on the current cluster, the VM needs to be deallocated before the resize operation can occur. Use the [az vm deallocate]( /cli/azure/vm) command to stop and deallocate the VM. Note, when the VM is powered back on, any data on the temp disk may be removed. The public IP address also changes unless a static IP address is being used.
@@ -279,9 +285,9 @@ az vm get-instance-view \
279285
Output:
280286

281287
```output
282-
ode DisplayStatus Level
283-
------------------ --------------- -------
284-
PowerState/running VM running Info
288+
Code Level DisplayStatus
289+
------------------ ------- ---------------
290+
PowerState/running Info VM running
285291
```
286292

287293
To retrieve the power state of all the VMs in your subscription, use the [Virtual Machines - List All API](/rest/api/compute/virtualmachines/listall) with parameter **statusOnly** set to *true*.
@@ -312,9 +318,9 @@ az vm start --resource-group myResourceGroupVM --name myVM
312318

313319
### Deleting VM resources
314320

315-
You can delete a VM, but by default this only deletes the VM resource, not the disks and networking resources the VM uses. You can change the default behavior to delete other resources when you delete the VM. For more information, see [Delete a VM and attached resources](../delete.md).
321+
Depending on how you delete a VM, it may only delete the VM resource, not the networking and disk resources. You can change the default behavior to delete other resources when you delete the VM. For more information, see [Delete a VM and attached resources](../delete.md).
316322

317-
Deleting a resource group also deletes all resources contained within, such as the VM, virtual network, and disk. The `--no-wait` parameter returns control to the prompt without waiting for the operation to complete. The `--yes` parameter confirms that you wish to delete the resources without an additional prompt to do so.
323+
Deleting a resource group also deletes all resources in the resource group, like the VM, virtual network, and disk. The `--no-wait` parameter returns control to the prompt without waiting for the operation to complete. The `--yes` parameter confirms that you wish to delete the resources without an additional prompt to do so.
318324

319325
```azurecli-interactive
320326
az group delete --name myResourceGroupVM --no-wait --yes

0 commit comments

Comments
 (0)