Windows Azure Guest Agent in failover scenario

Andreas Marx 1 Reputation point
2020-11-01T13:52:20.253+00:00

Hi.
When doing a failover from Hyper-V to Azure the Azure VM agent is not automatically installed. The agent is important for extensions and executing scripts inside the vm after failover.
I found some hints that in a VMWare to Azure failover scenario there seems to be half of the solution (Azure VM agent preinstalled OnPremise but disabled), but enabling the agent after failover is still manually … ?
I cannot find any guidance how to deal with that situation in a Hyper-V to Azure failover scenario. I do not want to install the agent manually on every vm during a failover and do not like the idea to implement a workaround like hybrid worker, GPO or similar solution. I would like to handle it fully automated and somehow inside the ASR process.

I think of the following solution:

  • Install the agent on all asr protected vms OnPremise
  • Implement a scheduled task on system startup that does the following:
  • Check it the vm is running OnPremise or in Azure by accessing 168.63.129.16 over port 80
  • Disable the 3 services (rdagent, WindowsAzureGuestAgent, WindowsAzureTelemetryService) when vm is running OnPremise
  • Enable and start the 3 services when vm is running in Azure

Questions:

  • Do I miss something, or is this really so complicated?
  • Is my solution vital? Is installing the Azure VM agent on non azure vms supported?
  • Isn’t there an easier solution? I would have expected it would be automatically …

Best regards
Andreas

Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
697 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Marx 1 Reputation point
    2020-11-09T23:28:32.08+00:00

    Thank you all for your feedback.

    @SadiqhAhmed-MSFT
    My question is not about enabling replication.

    @olufemia-MSFT
    All extensions depend on the "Windows Azure Guest Agent". And from all I can find in the docs, the only way to get this agent installed is executing the MSI inside the VM. I am not aware of any method doing things inside the VMs guest OS from the Azure management when the "Windows Azure Guest Agent" is not installed. Or do I miss something?

    I have put my solution in place, and it seams to be working fine so far.

    But I would appriciate that ASR would handle the installation of the "Windows Azure Guest Agent" itself.

    Best regards
    Andreas


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.