Skip to content

support az disk grant-access ... #9

@jimdigriz

Description

@jimdigriz

It would be helpful to be able to use a Compute Gallery Image without having to create a blob to provide a suitable sourceVhdUri.

I understand that whilst in preview, not everything is fleshed out, but there are other SAS URIs that Azure provides, in particular the one generated by az disk grant-access ..., the output is a SAS URL to a PageBlob.

An example of creating one is:

SUB=00000000-0000-0000-0000-000000000000
RG=misc
LOC=southcentralus
NAME=aitl
az disk create \
    --subscription $SUB \
    --resource-group $RG \
    --location $LOC \
    --name $NAME \
    --gallery-image-reference /subscriptions/.../resourceGroups/.../providers/Microsoft.Compute/galleries/.../images/.../versions/... \
    --sku Premium_LRS \
    --accelerated-network true \
    --output none
az disk grant-access \
    --subscription $SUB \
    --resource-group $RG \
    --name $NAME \
    --access Read \
    --duration-in-seconds 86400 \
    --query accessSAS \
    --output tsv

Unfortunately this does not work (correlation ID f5ec4120-05d8-4056-9963-d927eedc7976) and dies with:

{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/.../providers/Microsoft.Resources/deployments/computevalidation-onboarding","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"ResourceDeploymentFailure","target":"/subscriptions/.../resourceGroups/OnboardComputeValidation/providers/Microsoft.Resources/deployments/deployCloudValidationAndPlan","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"Conflict","message":"{\r\n  \"status\": \"Failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"BadRequest\",\r\n        \"message\": \"AzCertify validation failed with status 400: {\\r\\n  \\\"error\\\": {\\r\\n    \\\"innererror\\\": {\\r\\n      \\\"internalErrorCode\\\": \\\"ParameterValueInvalid\\\"\\r\\n    },\\r\\n    \\\"code\\\": \\\"InvalidParameter\\\",\\r\\n    \\\"message\\\": \\\"The value of parameter osDiskImage.sourceVhdUri is invalid.\\\",\\r\\n    \\\"target\\\": \\\"osDiskImage.sourceVhdUri\\\"\\r\\n  }\\r\\n}\"\r\n      }\r\n    ]\r\n  }\r\n}"}]}]}]}}

Can this constraint be loosened up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions