The Microsoft Azure Virtual Machine Agent (VM Agent) is a secure, lightweight process that manages virtual machine (VM) interaction with the Azure Fabric Controller. The VM Agent has a primary role in enabling and executing Azure virtual machine extensions. VM Extensions enable post-deployment configuration of VM, such as installing and configuring software. VM extensions also enable recovery features such as resetting the administrative password of a VM. Without the Azure VM Agent, VM extensions cannot be run.

If you have worked on on-premises virtualization platform such as VMware or Hyper-V, I would like you to compare it with the VMware tools or Integration services. Even though the way of working is completely different but the underlying logic is similar. Azure Guest agent helps the virtual machines communicate with the underlying hosts or the Fabric controller. The Azure Fabric Controller functions as the kernel of the Azure operating system. It provisions, stores, delivers, monitors and commands the virtual machines (VMs) and physical servers that make up Azure.

Table of contents

Azure Guest Agent Components.

Azure VM guest agent is installed on any machine that you deploy from marketplace. The functioning varies when we talk about Windows and Linux guest agents, explained later in this article. But the guest agent can be broken in two parts:

  • Guest Agent
  • Provisioning Agent

Role of different components

  • Provisioning agent: As the name suggests, provisioning agent is responsible for provisioning of the virtual machines. There are a lot of things that happen in background when you spin up a virtual machines and a virtual machine can’t run without provisioning agent. A few operations performed by provisioning agent:
    • Image Provisioning
    • Creation of a user account
    • Manages routes to improve compatibility with platform DHCP servers
    • Ensures the stability of the network interface name
    • Attaching a DVD for IaaS deployments. This DVD includes an OVF-compliant configuration file for OS provisioning, this can be found under “C:\Windows\Panther” or “/var/lib/waagent”
    • Deciding on which cluster and host this virtual machine needs to run, ensuring the provisioning is successful.
  • Guest Agent: The primary role of the guest agent is to install extensions. If you don’t have guest agent installed you won’t be able to use few azure services such as Azure backup or Azure security. This is because relevant extensions are installed for these operations.

Key differences between Windows Guest Agent (WinGA) and Linux Guest Agent (waagent)

The key difference between Windows and Linux guest agent is that the provisioning agent is embedded with guest agent for Linux virtual machines, which means uninstalling a guest agent on a Linux virtual machine can result in unexpected behavior. Whereas we can uninstall guest agent on the Windows virtual machines as part of our troubleshooting.

We also have an option to deploy a windows virtual machine without guest agent. You can select not to install WinGA. Or alternatively use below section in your ARM template.

{
	"resources": [{
		"name": ["parameters('virtualMachineName')"],
		"type": "Microsoft.Compute/virtualMachines",
		"apiVersion": "2016-04-30-preview",
		"location": ["parameters('location')"],
		"dependsOn": ["[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]"],
		"properties": {
			"osProfile": {
				"computerName": ["parameters('virtualMachineName')"],
				"adminUsername": ["parameters('adminUsername')"],
				"adminPassword": ["parameters('adminPassword')"],
				"windowsConfiguration": {
					"provisionVmAgent": "false"
				}
			}
		}
	}]
}

Note

Please comment below if you would like to know more about guest agent and how to troubleshoot relevant issues.