1

I have an Azure VM with a data disk attached and mounted in a folder in c:\ - the VM is bricked after uninstalling .NET 4.5 (don't do that on 2012 R2).

I have created a new VM. Now how do I detach my data disk and reattach it to the new VM?

The detach disk option for the VM only lists its primary C: system disk.

chicks
  • 3,793
  • 10
  • 27
  • 36
Luke Puplett
  • 939
  • 3
  • 16
  • 24

2 Answers2

4

Alexus pointed towards a link with the solution, though for StackOverflow, we should always pull out the salient points and post them here.

  • Delete the old VM, choose to keep the disks.
  • Restart the portal, this is important since the UI controls availability (show|hide) is computed once on load.
  • With the new VM highlighted, from the bottom menu, choose Attach > Existing Disk. When all disks are assigned to VMs, only Attach > "Empty Disk" is an option.
  • Choose the disk to attach.
  • RDP to the VM and mount the volume in Disk Manager.
Luke Puplett
  • 939
  • 3
  • 16
  • 24
1

You can use following guide to do that:

Recover Azure VM by attaching OS disk to another Azure VM - Microsoft Azure Support Team Blog - Site Home - MSDN Blogs

alexus
  • 13,112
  • 32
  • 117
  • 174