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
**Applies to:**:heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets
16
16
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).
18
18
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.
20
20
21
21
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.
22
22
@@ -29,8 +29,8 @@ If your VM uses Premium Storage, make sure that you choose an **s** version of t
29
29
1. In the left menu, select **Size**.
30
30
1. Pick a new size from the list of available sizes and then select **Resize**.
31
31
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.
34
34
35
35
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.
36
36
@@ -44,15 +44,15 @@ If your VM is still running and you don't see the size you want in the list, sto
44
44
45
45
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).
46
46
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:
48
48
49
49
```azurecli-interactive
50
50
az vm list-vm-resize-options \
51
51
--resource-group myResourceGroup \
52
52
--name myVM --output table
53
53
```
54
54
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:
56
56
57
57
```azurecli-interactive
58
58
az vm resize \
@@ -61,9 +61,9 @@ To resize a VM, you need the latest [Azure CLI](/cli/azure/install-az-cli2) inst
61
61
--size Standard_DS3_v2
62
62
```
63
63
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.
65
65
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`:
67
67
68
68
```azurecli-interactive
69
69
# Variables will make this easier. Replace the values with your own.
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.
**Use PowerShell to resize a VM in an availability set**
133
133
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.
135
135
136
136
```azurepowershell-interactive
137
137
$resourceGroup = "myResourceGroup"
138
138
$vmName = "myVM"
139
139
```
140
140
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.
142
142
143
143
```azurepowershell-interactive
144
144
Get-AzVMSize `
145
145
-ResourceGroupName $resourceGroup `
146
146
-VMName $vmName
147
147
```
148
148
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.
150
150
151
151
```azurepowershell-interactive
152
152
$vm = Get-AzVM `
@@ -158,7 +158,7 @@ Update-AzVM `
158
158
-ResourceGroupName $resourceGroup
159
159
```
160
160
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.
0 commit comments