
Explanation

Step 1: Stop VM1.
Step 2: Detach Disk1 from VM1.
Step 3: Start VM1.
Detach a data disk using the portal
* In the left menu, select Virtual Machines.
* Select the virtual machine that has the data disk you want to detach and click Stop to deallocate the VM.
* In the virtual machine pane, select Disks.
* At the top of the Disks pane, select Edit.
* In the Disks pane, to the far right of the data disk that you would like to detach, click the Detach button image detach button.
* After the disk has been removed, click Save on the top of the pane.
* In the virtual machine pane, click Overview and then click the Start button at the top of the pane to restart the VM.
* The disk stays in storage but is no longer attached to a virtual machine.
Step 4: Attach Disk1 to VM2
Attach an existing disk
Follow these steps to reattach an existing available data disk to a running VM.
* Select a running VM for which you want to reattach a data disk.
* From the menu on the left, select Disks.
* Select Attach existing to attach an available data disk to the VM.
* From the Attach existing disk pane, select OK.
References:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
https://docs.microsoft.com/en-us/azure/lab-services/devtest-lab-attach-detach-data-disk