Manually install the Azure VM Agent


When you first deploy a Virtual Machine to Azure using the Gallery, you have the option of installing the VM Agent. You should always leave this box selected because it adds tremendous value.


VM extensions can help you:

  • Modify security and identity features, such as resetting account values and using antimalware
  • Start, stop, or configure monitoring and diagnostics
  • Reset or install connectivity features, such as RDP and SSH
  • Diagnose, monitor, and manage your VMs
  • Backup your VMs with the new Azure VM level Backup feature (see my blog post here for more information on that feature announced March 26, 2015).

The agent allows you to add extensions to the VM, for more information, see this article:

You can manually download and install the VM Agent if it is not installed on the VM, see this article for more information:

The VM agent itself can be downloaded directly from (here) and is very small and takes seconds to install.

After manually installing the agent, it is necessary to set the ProvisionGuestAgent value to true using Powershell or a REST call. If you do not set this value after manually installing the VM Agent, the addition of the VM Agent is not detected properly.) The following code example shows how to do this using PowerShell where the $svc and $name arguments have already been determined

$vm = Get-AzureVM –serviceName $svc –Name $name
$vm.VM.ProvisionGuestAgent = $TRUE
Update-AzureVM –Name $name –VM $vm.VM –ServiceName $svc

Before you can run the powershell commands above, you first need to install the Azure Active Directory powershell module and then run the add-azureaccount command. Then to make sure you can see your VM’s, you can run get-azurevm.

In this screenshot you can see I have two VM’s, one with the agent installed and one without it.


So after manually installing the VM Agent, I can then run these commands to update Azure so that it knows the agent has been installed inside the guest VM:

$vm = Get-AzureVM –serviceName TCTCloudService –Name MyBackupTest
$vm.VM.ProvisionGuestAgent = $TRUE
Update-AzureVM –Name MyBackupTest –VM $vm.VM –ServiceName TCTCloudService


Now when I check for guest agent status, I can now see the same for both VM’s:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s