You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,7 +71,7 @@ Edit the */etc/fstab* file to remove references to the disk.
71
71
72
72
Open the **/etc/fstab** file in a text editor and remove the line containing the UUID of your disk. Using the example values in this article, the line would look like the following:
This example detaches the *myDataDisk* disk from VM named *myVM* in *myResourceGroup*.
90
90
91
91
```azurecli
92
-
az vm disk detach \
93
-
-g myResourceGroup \
94
-
--vm-name myVm \
95
-
-n myDataDisk
92
+
az vm disk detach -g myResourceGroup --vm-name myVm -n myDataDisk
96
93
```
97
94
98
95
The disk stays in storage but is no longer attached to a virtual machine.
@@ -116,4 +113,4 @@ The disk stays in storage but is no longer attached to a virtual machine. The di
116
113
## Next steps
117
114
If you want to reuse the data disk, you can just [attach it to another VM](add-disk.md).
118
115
119
-
If you want to delete the disk, so that you no longer incur storage costs, see [Find and delete unattached Azure managed and unmanaged disks - Azure portal](../disks-find-unattached-portal.md).
116
+
If you want to delete the disk, so that you no longer incur storage costs, see [Find and delete unattached Azure managed and unmanaged disks - Azure portal](../disks-find-unattached-portal.md).
0 commit comments