Run a Python Runbook on a Linux virtual machine during Azure Recovery Site failover

Antoine Davis 0 Reputation points
2024-07-02T12:29:37.53+00:00

Hello everyone,

I'm currently trying Azure Site Recovery to replicate a VMware virtual machine into Azure.

I've done the test failover successfully but now I'm trying to execute a Python script onto my replicate VM during the failover phase.

I tried to use the Recovery Plans feature so i created an Automation account, i created a Runbook with Python-3.8 as Runtime environment. After that, I went to customize my Recovery plan to add a Failover post-action configured to run my Runbook as below:

User's image

When i start a Test failover, my Recovery Job looks as below:

User's image

and the error i get from Post Steps:

User's image

I thought the script where only executed on my replicate Linux VM so i don't understand why he is searching for python library on a windows environment.

How can i execute my Python script on my replicate VM during/after a failover?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,257 questions
Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
717 questions
0 comments No comments
{count} votes

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.