Azure / Azure/azure-cli

az storage blob does not seem to work with a managed disk SAS

Open
#17,539 3 comments 0 reactions 1 assignee Claimed by @Juliehzl View on GitHub
act-codegen-extensibility-squad Customer Usage customer-response-expected feature-request Storage
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**
When using `az storage blob upload` to upload a vhd to a managed disk using SAS uri, upload to blob completes but is never imported as disk

**To Reproduce**
```
az disk create -n test-disk -g aim-pipeline -l westus2 --for-upload --upload-size-bytes 8589935104 --sku standard_lrs --os-type Linux --hyper-v-generation V2
az disk grant-access -n test-disk -g aim-pipeline --access-level Write --duration-in-seconds 86400

az storage account keys list -g aim-pipeline -n aimpipelinestorage --query "[?keyName=='key1'] | [0].value" -o tsv
az storage blob upload -c aimstoragecontainer -f ./test.vhd -n test --account-name aimpipelinestorage --account-key "+kz....Xg==" --sas-token "sv=2018-03-28&....ss%3D" -t page
```

**Expected behavior**
az disk list will show a non null size for disk

**Environment summary**
apt-get install on Ubuntu 20.04

**Additional context**
I already verified the vhd works, so does the blob upload, I am able to create a disk directly via this command
`az disk create -n test-disk2 -g aim-pipeline -l westus2 --source https://aimpipelinestorage.blob.core.windows.net/aimstoragecontainer/test --sku standard_lrs --hyper-v-generation V2 --os-type Linux`

but unable to upload a vhd directly to a disk created with `--for-upload`

This looks like it's quite related to #10192 which was closed but no update was provided

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.