Azure / Azure/azure-cli

az disk create with --os-type doesn't actually create an OS disk

Open
#18,040 3 comments 0 reactions 2 assignees Claimed by @Juliehzl View on GitHub
act-observability-squad Compute feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Describe the bug**

Create a disk with `--os-type` from az cli doesn't create a OS disk. For example,
`az disk create --os-type Linux --hyper-v-generation v1 -g $RG -n $DN --zone 1 --source $BLOB `
where $RG is the resource group, $DN is the name of disk, $BLOB is the URL to the page blob in container.

The above command does create a disk, but not OS disk as you can't create a VM from the disk.

**To Reproduce**

1. Upload a VHD installed with Linux
2. Use above command to create a disk

**Expected behavior**

The disk created by above method would be used to create a VM. The equivalent PowerScript does create a disk which can be used to create a VM.

**Environment summary**

**Additional context**

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.