When you no longer need a data disk that is attached to a virtual machine, you can easily detach it. This removes the disk from the virtual machine, but doesn't remove it from storage. If you want to use the existing data on the disk again, you can reattach it to the same virtual machine, or another one.
Step 1: Find the disk
If you don't know or want to verify the name of the disk before you detach it, follow these steps.
Azure automatically assigns a name to the disk when you attach it. The name consists of the cloud service name, the virtual machine name, and a number.
If you haven't already done so, sign in to the Azure Management Portal.
Click Virtual Machines, and then select the appropriate virtual machine. The VM's dashboard opens.
Under Disks, the table lists the name and type of all attached disks. For example, this screen shows a virtual machine with one operating system (OS) disk and one data disk:
Step 2: Detach the disk
After you find the name of the disk, you're ready to detach the disk:
- Click Virtual Machines, select the virtual machine that has the data disk you want to detach.
From the command bar, click Detach the Disk.
Select the data disk, and then click the check mark to detach it.
The disk remains in storage but is no longer attached to a virtual machine.