The Azure Linux VM Agent, also known as waagent, is a tool that manages Linux and FreeBSD provisioning, as well as virtual machine (VM) interaction with the Azure fabric controller. It’s an essential part of the Azure infrastructure as it enables Azure to provide many of its services to VMs. The Azure Linux VM Agent provides functionality in several areas:
- Image provisioning: It creates a user account, configures SSH authentication types, deploys SSH public keys and key pairs, sets the hostname, publishes the hostname to the platform DNS, reports the SSH host key fingerprint to the platform, and manages the resource disk, among other tasks.
- Networking: It manages routes to improve compatibility with platform DHCP servers and ensures the stability of the network interface name.
- Kernel: It configures virtual NUMA, consumes Hyper-V entropy for /dev/random, and configures SCSI timeouts for the root device, which can be remote.
- Diagnostics: It provides console redirection to the serial port.
- System Center Virtual Machine Manager deployments: It detects and bootstraps the Virtual Machine Manager agent for Linux when it’s running in a System Center Virtual Machine Manager 2012 R2 environment.
- VM Extension: It injects components authored by Microsoft and partners into Linux VMs to enable software and configuration automation.
Reference: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-linux
The Azure Linux VM Agent communicates with the Azure platform through two channels:
- A boot-time attached DVD for VM deployments. This DVD includes an Open Virtualization Format (OVF)-compliant configuration file that contains all provisioning information other than the SSH key pairs.
- A TCP endpoint that exposes a REST API that’s used to get deployment and topology configuration.
The Azure Linux VM Agent is compatible with several Linux distributions and requires certain system packages to function properly, including Python 2.6+, OpenSSL 1.0+, OpenSSH 5.3+, and others. It is usually installed and upgraded using an RPM or a DEB package from the distribution’s package repository.
The Azure Linux VM Agent supports several command-line options and flags that help manage its functionality. These include flags like verbose and force, and commands such as help, deprovision, version, serialconsole, daemon, and start1. It is also configurable via the /etc/waagent.conf file.
In terms of security, Microsoft has developed the Azure Security Linux Agent, which is a newer version of the Linux analytics agent for Azure Security Center. This agent is part of the Azure VM extensions and is designed to improve the onboarding of Linux VMs and servers to the Azure Security Center. The Azure Linux Agent is responsible for processing the platform extension commands and ensuring the correct state of the extension inside the VM.
Reference: https://learn.microsoft.com/en-us/answers/questions/1292115/what-is-azure-security-linux-agent
