Blog

Re-IP Linux Replicas in Veeam Failover Plan

last updated on 2018-04-25

Veeam has a cool feature that allows you to change the IP Address of a virtual machine that is replicated, the only issue is that by default this works for Windows only. Every once in a while we get questions about how you would do this on Linux. To address this I wrote some example PowerShell scripts for Veeam to trigger Re-IP behavior on CentOs and Red Hat virtual machines, this concept can be extended to support all OS flavors. BR-UpdateReplicaIP consists of three parts:

  • BR-WatchFailover which is added as a pre-failover script to a Failover Plan.
  • BR-UpdateReplicaIp which watches the Failover Plan while it executes and Re-Ips the virtual machines as they fail over.
  • BR-UpdateReplicaIpModule which contains all the dependencies required.

BR-WatchFailover is run as a pre-failover script. This triggers BR-UpdateReplicaIp which stays running in the background. By default all scripts expect to be run from a static path (C:\Scripts\BR-UpdateReplicaIp) on the backup server. BR-UpdateReplicaIp uses VeeamPSSnapin, VMware.PowerCli and BR-UpdateReplicaIpModule.

For Re-IP to work Re-IP rules (ReIpRulesOptions) and Guest OS credentials (VssOptions.LinCreds or VssOptions.WinCreds) have to be set in the source Replication Job. Although those have to be configured, application consistency itself can be disabled. Note that these scripts all run in a different user space associated with the Veeam service account, which means certain defaults have to be set correctly. To allow successful connectivity this script sets PowerCLI to ignore invalid SSL certificates in this user space. If there are other defaults that need to be set in this user space be sure to address this as well.