Skip to content

Commit 77ddc7e

Browse files
authored
Merge pull request #194274 from mimckitt/patch-15
Update os-disk-swap.md
2 parents 9ede8cc + 0f9d704 commit 77ddc7e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

articles/virtual-machines/linux/os-disk-swap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.custom: devx-track-azurecli
1616

1717
If you have an existing VM, but you want to swap the disk for a backup disk or another OS disk, you can use the Azure CLI to swap the OS disks. You don't have to delete and recreate the VM. You can even use a managed disk in another resource group, as long as it isn't already in use.
1818

19-
The VM does need to be stopped\deallocated, then the resource ID of the managed disk can be replaced with the resource ID of a different managed disk.
19+
The VM does not need to be stopped\deallocated. The resource ID of the managed disk can be replaced with the resource ID of a different managed disk.
2020

2121
Make sure that the VM size and storage type are compatible with the disk you want to attach. For example, if the disk you want to use is in Premium Storage, then the VM needs to be capable of Premium Storage (like a DS-series size).
2222

@@ -33,7 +33,7 @@ az disk list \
3333
```
3434

3535

36-
Use [az vm stop](/cli/azure/vm) to stop\deallocate the VM before swapping the disks.
36+
(Optional) Use [az vm stop](/cli/azure/vm) to stop\deallocate the VM before swapping the disks.
3737

3838
```azurecli-interactive
3939
az vm stop \

articles/virtual-machines/windows/os-disk-swap.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ ms.custom: devx-track-azurepowershell
1717

1818
If you have an existing VM, but you want to swap the disk for a backup disk or another OS disk, you can use Azure PowerShell to swap the OS disks. You don't have to delete and recreate the VM. You can even use a managed disk in another resource group, as long as it isn't already in use.
1919

20-
21-
22-
The VM does need to be stopped\deallocated, then the resource ID of the managed disk can be replaced with the resource ID of a different managed disk.
20+
The VM does not need to be stopped\deallocated. The resource ID of the managed disk can be replaced with the resource ID of a different managed disk.
2321

2422
Make sure that the VM size and storage type are compatible with the disk you want to attach. For example, if the disk you want to use is in Premium Storage, then the VM needs to be capable of Premium Storage (like a DS-series size). Both disks must also be the same size.
2523
And ensure that you're not mixing an un-encrypted VM with an encrypted OS disk, this is not supported. If the VM doesn't use Azure Disk Encryption, then the OS disk being swapped in shouldn't be using Azure Disk Encryption. If disks are using Disk Encryption Sets, both disks should belong to same Disk Encryption set.
@@ -36,7 +34,7 @@ When you have the name of the disk that you would like to use, set that as the O
3634
# Get the VM
3735
$vm = Get-AzVM -ResourceGroupName myResourceGroup -Name myVM
3836
39-
# Make sure the VM is stopped\deallocated
37+
# (Optional) Stop/ deallocate the VM
4038
Stop-AzVM -ResourceGroupName myResourceGroup -Name $vm.Name -Force
4139
4240
# Get the new disk that you want to swap in

0 commit comments

Comments
 (0)