Azure / Azure/azure-cli

Detaching OS disk

Open
#25,812 1 comment 1 reaction 1 assignee Claimed by @zhoxing-ms View on GitHub
act-observability-squad Auto-Assign Azure CLI Team Compute question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
$ az vm disk detach -g $RG--vm-name $VM --name $OS_DISK

**Describe the bug**
Command errors with `No disk with the name '...' was found`.

**To Reproduce**
$ az vm disk detach -g $RG--vm-name $VM --name $OS_DISK

**Expected behavior**
Users may not know that detaching an OS disk is not allowed. The cli should check if the disk specified is an OS disk and return a different error message saying something along the lines of `Only detaching data disks is allowed. '...' is an OS disk.`

**Environment summary**
xplat

**Additional context**
n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.