Pradeep Kumar
Pradeep Kumar

Reputation: 1

how to create custom image from blob storage hvd in azure dev test labs?

When I try creating custom image using arm template https://github.com/Microsoft/azure-docs/blob/master/articles/devtest-lab/devtest-lab-create-custom-image-from-vhd-using-powershell.md

I am getting

{
  "error": {
    "code": "InvalidStorageAccountForLab",
    "message": "Invalid storage account for lab"
  }
}

I have added lab storage type as Premium, but when I deploy only standard storage is created.

  "apiVersion": "2016-05-15",
  "type": "Microsoft.DevTestLab/labs",
  "name": "[parameters('newLabName')]",
  "location": "[resourceGroup().location]",
  "tags": {
    "ResourceType": "Rig",
    "RigTemplate": "[parameters('customTag')]"
  },      
  "properties": {
            "labStorageType": "Premium"
        },

Upvotes: 0

Views: 327

Answers (1)

Jason Ye
Jason Ye

Reputation: 13974

I have added lab storage type as Premium, but when I deploy only standard storage is created.

We can't create a premium VHD to a standard storage account.

If you want to create custom image in premium storage account, we should create a premium storage account first, then replace the storage account and key with premium storage account and key in the PowerShell script.

Note:

The link you followed, the PowerShell script create image will store in the default storage account (standard), so if you want to store image to a premium storage account, we should create a premium first.

Upvotes: 0

Related Questions