How to detach a disk from a Windows virtual machine
Azure has two different deployment models for creating and working with resources: Resource Manager and classic. This article covers using the classic deployment model. Microsoft recommends that most new deployments use the Resource Manager model.
When you no longer need a data disk that's 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.
It's not possible to detach an operating system disk unless you also delete the virtual machine.
If you don't know the name of the disk or want to verify it before you detach it, follow these steps.
Sign in to the Azure classic portal.
Click Virtual Machines, click the name of virtual machine, and then click Dashboard.
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:
Click Virtual Machines, click the name of the virtual machine that has the data disk you want to detach, and then click Dashboard.
From the command bar, click Detach 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.