Skip to content

'az image create' doesn't provide a way to create premium storage images #7115

@gregjhogan

Description

@gregjhogan

az image create seems to always create Standard_LRS images (even if the source VM/disk is Premium_LRS)

example:

az image create --resource-group $VM_RESOURCE_GROUP --name $IMAGE_NAME --source $VM_NAME --os-type Linux

or

az image create --resource-group $VM_RESOURCE_GROUP --name $IMAGE_NAME --source $VM_OS_DISK_NAME --os-type Linux

resource created:

{
  "name": "ubuntu-16.04-base-image-ssd",
  "provisioningState": "Succeeded",
  "sourceVirtualMachine": null,
  "storageProfile": {
    "dataDisks": [],
    "osDisk": {
      "blobUri": null,
      "caching": "None",
      "diskSizeGb": 30,
      "osState": "Generalized",
      "osType": "Linux",
      "snapshot": null,
      "storageAccountType": "Standard_LRS"
    },
    "zoneResilient": null
  },
  "tags": {},
  "type": "Microsoft.Compute/images"
}

We need to be able to pass the storage account type for disks, or default to the storage account type of the source disk
https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#storageaccounttypes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Compute-cliquestionThe 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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions