VM Scaleset Set OS Disk Storage Account Type

Luke Uhren 191 Reputation points
2020-05-06T19:27:01.563+00:00

I am wanting to know if it's possible to change the Storage Account Type of the OS Disk on a VM Scaleset with powershell easily? I am looking up all the commands like Update-AzVmss, Set-AzVmssVM, Set-AzVmssStorageProfile and don't see it mentioned how to change it. All I've tried as well does not work.

Is this possible and if so does anyone know the correct syntaxes to use? Only way right now I have done it, is I just rerun my ARM templates as all my servers as rebuilt on scripts and will be as good as before if I do, but doing so in powershell would be likely easier. And I am talking about deleting it and rebuilding or else it gives this error...
Changing | property osDisk.managedDisk.storageAccountType is not allowed

Example, I would want change the Storage Account type of the OS disk from Standard HDD to Premium SSD and vice versa.

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
348 questions
0 comments No comments
{count} votes

Accepted answer
  1. vipullag-MSFT 24,211 Reputation points Microsoft Employee
    2020-05-11T14:48:21.253+00:00

    @Luke Uhren

    The managed OS disk storage account type is a property that can only be set when the VMSS is created, please see the link for reference.

    Which means you cannot use the "-ManagedDiskStorageAccountType" parameter for updating the VMSS with Update-AzVmss cmdlet once the scale set is deployed. Work on document update is in progress to make this clear and avoid confusion, please see this link for reference:

    Thanks.

    Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

0 additional answers

Sort by: Most helpful