Skip to content

Detaching OS disk #25812

@rguptar

Description

@rguptar

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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotact-observability-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions