Recover back to an On-Prem Infrastructure

  • 14 February 2024
  • 3 comments
  • 202 views

Userlevel 5
Badge +1

VRO has the built in capability to use Azure as a Disaster Recovery location, allowing customers to easily restore workloads into Azure in the event of an outage. However, this option has generated a few questions from users:

  1. Can I use VRO to get back to an On-prem infrastructure?
  2. If I can, how do I accomplish this?

 

Let’s start to address these questions. 

Yes, it is possible with the current version to recover back into either VMware or Nutanix AHV. 

Yes, VRO can accomplish this with planning and customizing. 

 

This will take several steps and scripts, so I have broken this up into 4 posts . This is post 1 of 4

 

A core component that needs to be deployed and setup is a Veeam Backup for Azure appliance. This is required to protect the restored workloads and makes it possible to recover them into another location. Without this, none of the rest of this matters. You can follow this link for instructions:

https://helpcenter.veeam.com/docs/vbazure/guide/deploying_appliance.html?ver=60

 

If you already have one deployed, then we just need a new policy. Otherwise get one deployed and then build the policy. After it has been deployed you can either leave it running and disable the policy, or power it off, depending on your needs.

 

For the backup policy, to make it automatically backup the recovered workloads, we will use an Azure tag. Tags in Azure are a little different than in VMware. The example I am using is a tag with the key backup and the value yes. In Veeam Backup for Azure Policy, under Resources, choose Protect the following resources – Resource type: Tag – Key:backup – Value:yes

 

FYI – This tag must be setup before you can select it, so you must either have a VM in Azure that already has this tag or restore one with the tag on it so you can make the policy (chicken and egg)

 

Set this policy with Enable Backups and send backups to an Azure Blob location that we will be able to copy back to an On-Prem repository eventually.

 

Now that the core puzzle piece is there, let’s get into VRO and setting up the recovery plan step to add that Azure tag needed for the policy to auto protect the workloads that are being recovered into Azure. To do this, we need to add a custom Plan Step utilizing a PowerShell script in VRO. I have created a PowerShell script that can be used as a template for to accomplish this that can be found here.

https://github.com/VeeamHub/veeam-orchestrator/tree/main/AddTagToRecoveredVM

 

This script uses a VRO built in variable to pass the VM name to the script. This way the custom plan step can be added to each VM in the Group, and it will add based on the name of the VM in Azure. 

 

In VRO, go to Administration-Plan Steps and click Add.

Name the Step something meaningful, like Azure Add VM Tag  and give it a description.

At Scripts, click Browse for the PowerShell script and add it.  You will see the script in the window. Go ahead and create it.

Once created, we need to edit the step to add the parameter for the PowerShell variable.

Go to the Parameters tab. I recommend under Common Parameters to change the Retries to 0 to prevent partial finish reruns of the script.

Click Add to add a Parameter.

Based on my script, the parameter name must match the variable setup in PowerShell, so VMName. Type is Text, and Default Value, click edit, and select %current_vm_name%.

 

Now that we have the Plan Step, it can be added to the VM in the Recovery Plan.

Exit the Administration and go to Recovery Plans.

Select your clou recovery plan and edit it.

Select the VM and click Add under Steps

Add the Plan Step that you just created and set this as the last step.

 

Click Save on the plan and it is now ready. When you run the plan, it will recover and convert the VMs into your Azure account and then it will add the Tag.

Once it finished, you can look at the VM in Azure, and see the Tag:

 

Part 1 complete. Stay tuned for Parts 2-4 coming soon.


3 comments

Userlevel 7
Badge +20

Great part one @skitch210 looking forward to the rest. Going to absorb all VRO stuff now to start using it.

Userlevel 7
Badge +17

I don't really use Cloud solutions myself, but good post regardless. Thanks for sharing. 

Userlevel 7
Badge +6

Great post….I’m with Shane, have very little cloud solutions, but there are many folks moving things back from the cloud, so it’s great to see more information that can ease that transition.

Comment