azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Update-AzureRMVmss fails with error "Changing property 'zones' is not allowed."

Open andradf opened this issue 9 years ago • 9 comments

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

andradf avatar Oct 03 '17 15:10 andradf

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

_

svpudik avatar Oct 09 '17 13:10 svpudik

@hyonholee Hey Hyonho, would you mind taking a look at this issue?

cormacpayne avatar Oct 10 '17 00:10 cormacpayne

CC: @gbowerman

cormacpayne avatar Oct 10 '17 00:10 cormacpayne

@cormacpayne fixed in https://github.com/Azure/azure-powershell/pull/4701 - should be in October PowerShell release.

gbowerman avatar Oct 10 '17 01:10 gbowerman

Any suggestions about how to go about updating a VMSS in the meantime?

andradf avatar Oct 11 '17 17:10 andradf

Can you update the properties of the VMSS in:

  • resources.azure.com
  • CLI (e.g. in Cloud shell in portal)

gbowerman avatar Oct 11 '17 20:10 gbowerman

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 avatar Oct 12 '17 21:10 mjsabin01

@mjsabin01 workarounds:

  1. Use resources.azure.com to edit the scale set properties.
  2. Use CLI to update the scale set properties. Latest CLI is available from the portal in the cloud shell.
  3. Install the 4.4.1 release candidate https://github.com/Azure/azure-powershell/releases

gbowerman avatar Oct 12 '17 21:10 gbowerman

This is fixed. https://github.com/Azure/azure-powershell/pull/4701

hyonholee avatar Oct 18 '17 23:10 hyonholee