0
votes

For the life of me, I can't work out what the differences are between Update-AzureRmVmss, Update-AzureRmVmssInstance and Update-AzureRmVmssVM in relation to Azure Resource Manager (AzureRM), even after reading the documentation.

https://docs.microsoft.com/en-us/powershell/module/azurerm.compute/update-azurermvmss?view=azurermps-6.13.0

I'm looking to run a command that will update all my VMs in my Azure VMSS (virtual machine scale set) regardless of the number of instances. The upgrade policy is set to manual.

1

1 Answers

0
votes

You have many VM's in a scale set each VM is referred to as an instance.

In manual mode when you update the scale set model, nothing happens to existing VMs.

To update existing VMs, you must do a "manual upgrade" of each existing VM.

The powershell command is:

Update-AzVmssInstance -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -InstanceId instanceId

You must run this command for each VM in your scale set.

If you want to upgrade all VM's with a single command you need to change the upgrade policy to automatic or rolling.