Skip to content

Commit 10749ca

Browse files
Merge pull request #228035 from mattmcinnes/patch-34
Freshness Pass on resize-vm.md
2 parents a6b25ca + 2976bdf commit 10749ca

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

articles/virtual-machines/resize-vm.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: cynthn
55
ms.service: virtual-machines
66
ms.workload: infrastructure
77
ms.topic: how-to
8-
ms.date: 11/14/2022
8+
ms.date: 2/21/2023
99
ms.author: cynthn
1010
ms.custom: devx-track-azurepowershell
1111

@@ -14,9 +14,9 @@ ms.custom: devx-track-azurepowershell
1414

1515
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets
1616

17-
This article shows you how to move a VM to a different [VM size](sizes.md).
17+
This article shows you how to change an existing virtual machine's [VM size](sizes.md).
1818

19-
After you create a virtual machine (VM), you can scale the VM up or down by changing the VM size. In some cases, you must deallocate the VM first. This can happen if the new size isn't available on the hardware cluster that is currently hosting the VM.
19+
After you create a virtual machine (VM), you can scale the VM up or down by changing the VM size. In some cases, you must deallocate the VM first. Deallocation may be necessary if the new size isn't available on the same hardware cluster that is currently hosting the VM.
2020

2121
If your VM uses Premium Storage, make sure that you choose an **s** version of the size to get Premium Storage support. For example, choose Standard_E4**s**_v3 instead of Standard_E4_v3.
2222

@@ -29,8 +29,8 @@ If your VM uses Premium Storage, make sure that you choose an **s** version of t
2929
1. In the left menu, select **Size**.
3030
1. Pick a new size from the list of available sizes and then select **Resize**.
3131

32-
33-
If the virtual machine is currently running, changing its size will cause it to restart.
32+
> [!Note]
33+
> If the virtual machine is currently running, changing its size will cause it to restart.
3434
3535
If your VM is still running and you don't see the size you want in the list, stopping the virtual machine may reveal more sizes.
3636

@@ -44,15 +44,15 @@ If your VM is still running and you don't see the size you want in the list, sto
4444

4545
To resize a VM, you need the latest [Azure CLI](/cli/azure/install-az-cli2) installed and logged in to an Azure account using [az login](/cli/azure/reference-index).
4646

47-
1. View the list of available VM sizes on the hardware cluster where the VM is hosted with [az vm list-vm-resize-options](/cli/azure/vm). The following example lists VM sizes for the VM named `myVM` in the resource group `myResourceGroup` region:
47+
1. View the list of available VM sizes on the current hardware cluster using [az vm list-vm-resize-options](/cli/azure/vm). The following example lists VM sizes for the VM named `myVM` in the resource group `myResourceGroup` region:
4848

4949
```azurecli-interactive
5050
az vm list-vm-resize-options \
5151
--resource-group myResourceGroup \
5252
--name myVM --output table
5353
```
5454
55-
2. If the desired VM size is listed, resize the VM with [az vm resize](/cli/azure/vm). The following example resizes the VM named `myVM` to the `Standard_DS3_v2` size:
55+
2. If you find the desired VM size listed, resize the VM with [az vm resize](/cli/azure/vm). The following example resizes the VM named `myVM` to the `Standard_DS3_v2` size:
5656
5757
```azurecli-interactive
5858
az vm resize \
@@ -61,9 +61,9 @@ To resize a VM, you need the latest [Azure CLI](/cli/azure/install-az-cli2) inst
6161
--size Standard_DS3_v2
6262
```
6363
64-
The VM restarts during this process. After the restart, your existing OS and data disks are kept. Anything on the temporary disk is lost.
64+
The VM restarts during this process. After the restart, your VM will keep existing OS and data disks. Anything on the temporary disk will be lost.
6565
66-
3. If the desired VM size isn't listed, you need to first deallocate the VM with [az vm deallocate](/cli/azure/vm). This process allows the VM to then be resized to any size available that the region supports and then started. The following steps deallocate, resize, and then start the VM named `myVM` in the resource group named `myResourceGroup`:
66+
3. If you don't see the desired VM size, deallocate the VM with [az vm deallocate](/cli/azure/vm). This process allows you to resize the VM to any size available that the region supports. The following steps deallocate, resize, and then start the VM named `myVM` in the resource group named `myResourceGroup`:
6767
6868
```azurecli-interactive
6969
# Variables will make this easier. Replace the values with your own.
@@ -99,21 +99,21 @@ $resourceGroup = "myResourceGroup"
9999
$vmName = "myVM"
100100
```
101101

102-
List the VM sizes that are available in the region where the VM is hosted.
102+
List the VM sizes that are available in the region where you hosted the VM.
103103

104104
```azurepowershell-interactive
105105
Get-AzVMSize -ResourceGroupName $resourceGroup -VMName $vmName
106106
```
107107

108-
If the size you want is listed, run the following commands to resize the VM. If the desired size isn't listed, go on to step 3.
108+
If you see the size you want listed, run the following commands to resize the VM. If you don't see the desired size, go on to step 3.
109109

110110
```azurepowershell-interactive
111111
$vm = Get-AzVM -ResourceGroupName $resourceGroup -VMName $vmName
112112
$vm.HardwareProfile.VmSize = "<newVMsize>"
113113
Update-AzVM -VM $vm -ResourceGroupName $resourceGroup
114114
```
115115

116-
If the size you want isn't listed, run the following commands to deallocate the VM, resize it, and restart the VM. Replace **\<newVMsize>** with the size you want.
116+
If you don't see the size you want listed, run the following commands to deallocate the VM, resize it, and restart the VM. Replace **\<newVMsize>** with the size you want.
117117

118118
```azurepowershell-interactive
119119
Stop-AzVM -ResourceGroupName $resourceGroup -Name $vmName -Force
@@ -131,22 +131,22 @@ Start-AzVM -ResourceGroupName $resourceGroup -Name $vmName
131131

132132
**Use PowerShell to resize a VM in an availability set**
133133

134-
If the new size for a VM in an availability set isn't available on the hardware cluster currently hosting the VM, then all VMs in the availability set will need to be deallocated to resize the VM. You also might need to update the size of other VMs in the availability set after one VM has been resized. To resize a VM in an availability set, perform the following steps.
134+
If the new size for a VM in an availability set isn't available on the hardware cluster currently hosting the VM, then you will need to deallocate all VMs in the availability set to resize the VM. You also might need to update the size of other VMs in the availability set after one VM has been resized. To resize a VM in an availability set, perform the following steps.
135135

136136
```azurepowershell-interactive
137137
$resourceGroup = "myResourceGroup"
138138
$vmName = "myVM"
139139
```
140140

141-
List the VM sizes that are available on the hardware cluster where the VM is hosted.
141+
List the VM sizes that are available on the hardware cluster where you hosted the VM.
142142

143143
```azurepowershell-interactive
144144
Get-AzVMSize `
145145
-ResourceGroupName $resourceGroup `
146146
-VMName $vmName
147147
```
148148

149-
If the desired size is listed, run the following commands to resize the VM. If it isn't listed, go to the next section.
149+
If you see the size you want listed, run the following commands to resize the VM. If you don't see it listed, go to the next section.
150150

151151
```azurepowershell-interactive
152152
$vm = Get-AzVM `
@@ -158,7 +158,7 @@ Update-AzVM `
158158
-ResourceGroupName $resourceGroup
159159
```
160160

161-
If the size you want isn't listed, continue with the following steps to deallocate all VMs in the availability set, resize VMs, and restart them.
161+
If you don't see the size you want listed, continue with the following steps to deallocate all VMs in the availability set, resize VMs, and restart them.
162162

163163
Stop all VMs in the availability set.
164164

0 commit comments

Comments
 (0)