I created azure vm scale set with custom script extension. After some time I updated custom script extension and wanted to apply changes on each virtual machine on scale set. However nothing is changing. To update VM Scale Set I used Update-AzureRmVmss command in powershell. There is not any error message, command executes successfully
-
Giving your command and error message will be helpful. – Joy Wang Jul 09 '18 at 05:50
-
@JoyWang edited question – support_ms Jul 09 '18 at 05:53
-
Your issue could be related to https://github.com/MicrosoftDocs/azure-docs/issues/15359 You need to remove the old extension first and then update the extension as described in the solution for the above GitHub issue. – Karishma Tiwari - MSFT Sep 25 '18 at 20:56
2 Answers
I would say you VMSS is set to update mode manual, so you need to force the node update.
another thing you are missing: forceUpdateTag
. check this: How to force VM created with an ARM template + CustomScriptExtension to redownload the script and run it?

- 69,186
- 6
- 100
- 141
It sounds like you need to update the "forceUpdateTag" property in the scale set extension profile. You can do this in your ARM template by adding this property at the same level as "publisher" and giving it any value you want (as long as it's different from the previous value). You can also do the same in Powershell and Az CLI using code like the following:
Powershell:
$vmss = Get-AzureRmVmss -ResourceGroupName YOUR_RG_NAME -Name YOUR_VMSS_NAME
$vmss.VirtualMachineProfile.ExtensionProfile.Extensions[0].ForceUpdateTag="1"
Update-AzureRmVmss -ResourceGroupName YOUR_RG_NAME -VMScaleSetName YOUR_VMSS_NAME -VirtualMachineScaleSet $vmss
CLI:
# run the first time
az vm extension set -g ...
# run again
az vm extension set --force-update -g ...
It's a bit complicated in some cases, so I threw together a quick blog post describing it: https://negatblog.wordpress.com/2018/07/11/rerun-extensions-in-azure/
Hope this helps! :) -Neil

- 857
- 6
- 10