Image Credit: azure.microsoft.com
Azure Backup allows you to back up the data for on-premises servers, virtual machines, virtualized workloads, SQL server, SharePoint server, and more.
As a pay-as-you-go service, Azure Backup gives you the flexibility to pick and choose the data you want to protect, for as long as you want to protect it. Azure Backup is designed to be cost effective whether you’re interested in short- or long-term retention. And, you can restore virtual machines or individual files and folders—in Azure or on-premises—as needed, for free.
I was recently migrating Hyper-V virtual machines from on-premises to Azure, and during the scope of that project, I need to protect those VMs after the migration using Azure Backup service.
When I enabled Azure Backup, I noticed that the backup job is failing with the following error message:
VM agent is unable to communicate with the Azure Backup Service
With the following error code:
After you register and schedule a VM for the Backup service, Azure Backup initiates the job by communicating with the VM agent to take a point-in-time snapshot. There are many conditions that might prevent the snapshot from being triggered. When a snapshot isn’t triggered, the backup job might fail.
According to Microsoft recommendation, there are 5 potential cases that could cause this issue to happen:
Cause 1: The VM doesn’t have internet access
Cause 2: The agent is installed in the VM, but it’s unresponsive (for Windows VMs)
Cause 3: The agent installed in the VM is out of date (for Linux VMs)
Cause 4: The snapshot status can’t be retrieved, or a snapshot can’t be taken
Cause 5: The backup extension fails to update or load
Finding the cause
After I started eliminating the potential root causes following the list above, I noticed that none of them is related directly to my issue.
However, the cause number 2 gave me an insight that could be an agent issue. Because the Azure VM Agent is installed by default on any Windows virtual machine deployed from an Azure Gallery image. When deploying an Azure gallery image from the Portal, PowerShell, Command Line Interface (CLI), or an Azure Resource Manager template, the Azure VM Agent is also be installed. And since this particular VM is migrated from on-premises environment, then Windows Azure VM agent is not installed.
Fixing the issue
The Windows Azure VM agent can be manually installed using a Windows installer package. Manual installation may be necessary when creating a custom or migrated a virtual machine that will be deployed in Azure. To manually install the Windows VM Agent, download the latest VM Agent installer from this location Windows Azure VM Agent Download (4MB in size), and then copy it to the virtual machine in Azure.
As a side note, if you are migrating a 32-bit machine (i.e. Windows Server 2008 x86, or Windows Server 2008 R2 x86), there is currently NO support for the VM agent, which subsequently prevents the use of any extension (and hence Azure Backup).
At the time of this writing, the Windows Azure VM agent is Version 2.7.41491.872. The VM Agent can be installed by double-clicking the windows installer file. For an automated or unattended installation of the VM agent, open command prompt as an Administrator and run the following command:
msiexec.exe /i WindowsAzureVmAgent.2.7.41491.872_180220-1153.fre.msi /quiet
To detect if Windows Azure VM agent is installed successfully, when you logon into a Windows Azure VM, open Task Manager > click the Details Tab, and look for a process name WindowsAzureGuestAgent.exe. The presence of this process indicates that the VM agent is installed.
After I installed the Windows Azure VM agent, I triggered the backup again and now the job is completed successfully!
Then make sure to join me next week at CDC Germany in Hanau where I will cover in details the benefits of using Azure Backup to protect on-premises workloads. I Also have a surprise in store for you, thanks to Altaro Software! I’ll tell you more about how you can WIN during my talk!
There are still a few seats left for the conference, please make sure to register now #CDCGermany2018.
Thank you for reading my blog.
If you have any questions or feedback, please leave a comment.