Azure Troubleshooting – VM agent is unable to communicate with the Azure Backup Service

When enabling Backup and Recovery services for an Azure VM, you may get a deployment failed error message:

VM agent is unable to communicate with the Azure Backup Service

With the following error code:

UserErrorGuestAgentStatusUnavailable

This is often because the Azure VM Agent is in a failed provisioning state.

Check Azure VM Agent is Installed

Azure services such as Azure Backup require the Agent extension to be installed.

Windows

To detect if the Windows Azure VM agent is installed successfully, when you logon to a Windows Azure VM, open Task Manager > click the Details tab, and look for a process named WindowsAzureGuestAgent.exe. The presence of this process indicates the VM agent is installed.

The Azure VM Agent is installed by default on any Windows VM deployed from an Azure Marketplace image. Manual installation may be necessary when you create a custom VM image that is deployed to Azure. You can manually install the Azure VM Agent with a Windows installer package.

To manually install the Windows VM Agent, download the latest VM Agent installer from this location.

The VM Agent can be installed by double-clicking the Windows installer file. For an automated or unattended installation of the VM agent, change the name of the downloaded installer if necessary and run the following command:

msiexec.exe /i WindowsAzureVmAgent.2.7.41491.885_180531-1125.fre /quiet

As of this writing, the Windows Azure VM Agent is version 2.7.41491.885.

Linux

NOTE: The following commands are based upon the CentOS 6 operating system.

SSH into the Linux VM.

Check to see if the Azure VM Agent is installed by running the following command:
sudo yum list WALinuxAgent

If the Azure VM Agent is installed, it should return a result similar to the below:

Loaded plugins: security
Installed Packages
WALinuxAgent.noach 2.2.18-1.e16 @openlogic

Check for available updates to the Azure VM Agent with the following command:

sudo yum check-update WALinuxAgent

If necessary, install the latest package version:

sudo yum install WALinuxAgent

Enable Azure VM Agent via PowerShell

 

Once the Azure VM Agent has been installed on the virtual machine, you must use Azure PowerShell to update the ProvisionGuestAgent property so Azure knows the VM has the agent installed.

Azure RM

Open PowerShell as Administrator

Connect to Azure RM account and enter credentials:

Connect-AzureRMAccount

Run the following commands to update the ProvisionGuestAgent property to be set as True:

$vm=get-azureRMvm -ResourceGroupName <resource group name> -Name <VM name> -DisplayHint Expand

$vm.OSProfile.windowsConfiguration.provisionVMAgent = $True

Update-AzureRmVM -ResourceGroupName $rg -VM $vm

If you run the Get-AzureRmVM command again, the -DisplayHint Expand will show the Windows Configuration -> ProvisionVMAgent property set as True.

get-azureRMvm -ResourceGroupName <resource group name> -Name <VM name> -DisplayHint Expand

Azure Classic

Classic Azure deployments will not be accessible through the Azure RM PowerShell. You must use the Classic Azure PowerShell module instead.

NOTE: User must be a Co-Administrator on Azure Subscription to be able to connect to Azure Classic PowerShell.

Open PowerShell as Administrator

Connect to Azure Classic PowerShell and enter credentials:

Add-AzureAccount

Run the following commands to update the ProvisionGuestAgent property to be set as True:

$vm = Get-AzureVM –ServiceName <cloud service name> –Name <VM name>

$vm.VM.ProvisionGuestAgent = $TRUE

Update-AzureVM –Name <VM name> –VM $vm.VM –ServiceName <cloud service name>

The command should say it was successful once complete.

NOTE: In Classic Azure PowerShell, you cannot see the value of ProvisionGuestAgent property, whether it is True or False. You have to rely on the message saying it succeeded.

Please follow and like us: