Reputation: 382
I want to create an Azure VM with a non-Premium SSD as OS disk to save costs. I must use the CLI. I did not find a parameter for az vm create
where I could specify the SKU of the OS disk. When I try to create the disk manually it succeeds, but after that when I try to attach the disk to a new VM with --attach-os-disk
I cannot use the --admin-username
and --admin-password
any more that I need for initialization.
Upvotes: 0
Views: 796
Reputation: 2507
Use the --storage-sku parameter to choose your storage type:
--storage-sku The SKU of the storage account with which to persist VM. Use a singular sku that would be applied across all disks, or specify individual disks. Usage: [--storage-sku SKU | --storage-sku ID=SKU ID=SKU ID=SKU...], where each ID is "os" or a 0-indexed lun. Allowed values: Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS.
https://learn.microsoft.com/en-us/cli/azure/vm?view=azure-cli-latest#az-vm-create
Upvotes: 1