0

I had a problem where I was updating cloud-init.txt for a VMSS deployment like https://github.com/KaiWalter/azure-private-link-port-forward/blob/main/infra/modules/forwarder/cloud-init.txt for while, but non of the updates seemed to be effective - although I was deleting and redeploying the VMSS.

Somehow an older version of cloud-init.txt was stuck in my deployment process which I was able to identify for a while.

How can I check on the running VMSS instance or on a VM which version is effective?

Kai Walter
  • 3,485
  • 2
  • 32
  • 62

1 Answers1

0

Connect to the VMSS instance or VM and check by extracting the value <ns1:CustomData> from /var/lib/waagent/ovf-env.xml:

cat /var/lib/waagent/ovf-env.xml | sed -n -e 's/.*<ns1:CustomData>\(.*\)<\/ns1:CustomData>.*/\1/p' | base64 --decode

based on this documentation https://learn.microsoft.com/en-us/azure/virtual-machines/custom-data#linux and this answer to extract from XML with sed

Kai Walter
  • 3,485
  • 2
  • 32
  • 62