Interview Prep/Azure/Compute and App Platforms

What is the VM agent and the Custom Script Extension vs cloud-init?

IntermediateConceptCompute and App Platforms
Answer

The Azure VM agent (waagent on Linux) talks to the platform and runs extensions (Custom Script, Azure Monitor Agent, Entra login, Key Vault).

  • cloud-init runs at first boot from custom data (--custom-data cloud-init.yaml), handles packages, users, files. Preferred for Linux bootstrapping.
  • Custom Script Extension downloads and runs a script, can be re-run with a new timestamp, reports status to ARM. Useful post-deployment or for Windows.

Both run as root, so never put secrets in them; pull secrets from Key Vault with the VM's managed identity.

Azure All Azure questions Roadmap: Azure core services

More on Compute and App Platforms