azure vm swapping disk with another vm
During a recovery, we often restore a VM and then start our recovery process. Sometimes, DBA don't like VM to be called differently. So lets swap the OS disk drive. To do that, follow these steps :-
We restore the backup to a new VM using the latest snapshot available (standard and snapshot
Swap the VM disk with the VM and re-init sql server registration for the VM
Go to the restored VM → Goto the Disk → Create Snapshot. Ensure it is the same configuration as the target restore VM (Premium SSD vs Standard HDD).
Call it OS-disk-snapshot-<date>.
Then once this is completed, we will go and use this to create an OS Disk. Click on the snapshot → Create Disk.
Once we have done this, we will be able to do a OS swap. VM does not need to be stopped
Attached all the disk back
Install extension such as VMBackup, Azure diagnostic extension →
Comments