The Azure VM Agent is utilized for a number of reasons between Azure Services and Extensions. Sometimes VM Agent needs some attention and a simple restart, reinstall, or an update will do the trick.

  • This blog is powershell focused, so methods that do not include powershell may not be covered.

There are several ways to check the VM Agent Status. Your options will be dependent upon the VM type:

ARM VMs

Login into the Portal > Select the VM Properties > Choose Boot Diagnostic Logs or download the Boot Diagnostic Logs

Classic VMs

The agent can be checked by either logging into the VM or using the azure powershell module

Windows & Linux

  • Azure Powershell Module Commands

This gets a specific vm and returns the guest agent status and the last alert message.

$VMName = 'UbuClassicTest'
$VM = Get-AzureVM | ?{$_.name -eq $vmname}
$VM.guestagentstatus
$VM.guestagentstatus.formattedmessage

Windows Logs

There should be a windows event log dedicated to the agent events.

Linux Logs

Logging may be dependent on the linux flavor. Ubuntu logs can be found the following locations.

/var/lib/waagent/*.xml
/var/log/waagent.log
/var/log/azure/*

Support Links
Azure VM Agent and Extensions