Azure’s supplied Linux images come preinstalled with the Azure Linux Agent, a process that manages virtual machine interaction with the Azure Fabric Controller, such as providing the oh-so-useful availability status and the VM name to Azure. It also performs self-updates, by the way.
This is great for as long as you are not using the
Standard B1ls instance. The instance has a burstable 1 vCPU and 0.5 GiB memory configuration, and so in reality, you will see ~390 MiB memory usable. You will literally hear your Azure instance screams for removing the Azure Linux Agent, when it gets randomly choked periods of memory and CPU spikes, even if you are not doing anything.
With the culprit identified, the following steps would allow you to disable and uninstall
sudo systemctl stop walinuxagent sudo systemctl disable walinuxagent sudo waagent -deprovision -force sudo rm -rf /var/lib/waagent sudo rm /etc/waagent.conf
If you regret your decision to remove
WALinuxAgent, you may reinstall it by:
sudo apt-get update sudo apt-get install walinuxagent
Or simply restore an earlier snapshot.