Update-AzureRMVmss fails with error "Changing property 'zones' is not allowed."
Cmdlet(s)
Update-AzureRMVmss
PowerShell Version
5.1.15063.608
Module Version
AzureRM.Compute 3.4.0
OS Version
10.0.15063.608
Description
When attempting to update a Virtual Machine Scale Set. The command fails with error "Changing property 'zones' is not allowed." The VirtualMachineScaleSet object passed to Update-AzureRMVmss has null as the value for the Zones property, so it shouldn't be interpreted as an attempt to change it. Furthermore, Get-AzureRMVmss returns an empty list in the Zones property. Passing an empty list to Update-AzureRMVmss results in the same error. What value should be passed in Zones?
Script/Steps for Reproduction
Have an existing VMSS and a Key Vault with a certificate loaded to it. Attempt to add the certificate to the VMSS.
$vault = Get-AzureRmKeyVault -VaultName <vaultName>
$certConfig = New-AzureRmVmssVaultCertificateConfig -CertificateUrl <certUrl>
$VMSS = New-AzureRmVmssConfig
$VMSS.Location = 'westus'
Add-AzureRmVmssSecret -VirtualMachineScaleSet $VMSS -SourceVaultId $vault.ResourceId -VaultCertificate $certConfig
Update-AzureRmVmss -ResourceGroupName <RGName> -VMScaleSetName <vmssName> -VirtualMachineScaleSet $VMSS
throws Update-AzureRmVmss : Changing property 'zones' is not allowed. ErrorCode: PropertyChangeNotAllowed ErrorMessage: Changing property 'zones' is not allowed. StatusCode: 409 ReasonPhrase: Conflict OperationID : 6ed2e604-43ae-4b8a-ae6e-57819ee554ad At line:1 char:1
I have same issue...
$VMSS = Add-AzureRmVmssSecret -VirtualMachineScaleSet $VMSS -VaultCertificate $CertConfig -SourceVaultId $kvResourceID
Update-AzureRmVmss -Name $ScaleSetName -ResourceGroupName $vmResourceGroup -VirtualMachineScaleSet $VMSS -Verbose
Error message:
Update-AzureRmVmss : Changing property 'zones' is not allowed. ErrorCode: PropertyChangeNotAllowed ErrorMessage: Changing property 'zones' is not allowed. StatusCode: 409 ReasonPhrase: Conflict OperationID : 7e33e66f-e715-4136-a644-cd7630b25f6f At line:136 char:17 Update-AzureRmVmss -Name $ScaleSetName -ResourceGroupName ... CategoryInfo : NotSpecified: (:) [Update-AzureRmVmss], ComputeCloudException FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Common.ComputeCloudException,Microsoft.Azure.Commands.C ompute.Automation.UpdateAzureRmVmss
_
@hyonholee Hey Hyonho, would you mind taking a look at this issue?
CC: @gbowerman
@cormacpayne fixed in https://github.com/Azure/azure-powershell/pull/4701 - should be in October PowerShell release.
Any suggestions about how to go about updating a VMSS in the meantime?
Can you update the properties of the VMSS in:
- resources.azure.com
- CLI (e.g. in Cloud shell in portal)
Is there a workaround available or an ETA on the release becoming available? I have a cert that needs to be updated within a week.
@mjsabin01 workarounds:
- Use resources.azure.com to edit the scale set properties.
- Use CLI to update the scale set properties. Latest CLI is available from the portal in the cloud shell.
- Install the 4.4.1 release candidate https://github.com/Azure/azure-powershell/releases
This is fixed. https://github.com/Azure/azure-powershell/pull/4701