Check Replica Status – Before deleting it – Part 2

My previous article explained the procedure to perform a failover from VBR console explaining why it is safe (Click here to read it)

In this second article, I’ll show you what can happen if you try a failover in a different way, answering the behavior that a partner had during a cleanup procedure.

In my lab, I created a new Replica Job where the original VM is still Ubuntu-02 (Picture 1) and the replica VM has the suffix _Rep_vc01-1-1 (Picture 2).

Picture 1

Picture 2

After the VM has been created (Picture 3) It is switched it on directly from the vCENTER console (Picture 4). To be sure it works as expected, it is possible to connect remotely.

Picture 3

Picture 4

Picture 5

Going back to VBR console it’s possible to see that nothing has changed (Picture 6) just because the power-on action has been performed directly from the  VMware console

Picture 6

Attention point: If you try to perform a replica task it fails because the VM is running (picture 7)

Picture 7

Now the main point of the two articles:

It’s a bad choice deleting VMs from VBR “Ready Replica VM”  menu (picture 8/9) without knowing if the VMs have been started from vCENTER console. Why? Because also the production VM gets deleted as shown in picture 10.

Picture 8

Picture 9

Picture 10

Let’s get a little wild with some supposing:

1. If you see the “active” status icon switched on ( from VBR console) it means the failover is started (picture 11)

Picture 11

2. If a permanent failover was performed, the VM disappears from “Replica Ready” menu and replica job results to be empty (Picture 12)

Picture 12

3. If the replica job works fine it means that no permanent failover has been performed

4. If the replica Job works fine but when clicking on the delete button (from “Replica ready menu” of VBR console) (picture 13) the production VM disappears, it means that a new replica job has been re-created after the manual failover has been launched (picture 14).

Picture 13

Picture 14

Knowing that deleting a VM replicated from VBR console needs a little attention, especially if you do not have the continuous and complete control of the VMware architecture, the question is: is it possible to think an easy checking-up before deleting VM?

The answer is Yes and Veeam One can easily help just creating them.

a. From vCENTER: setting up a report that checks if the VM to be deleted is running (power state status) (Table 1)

b. From VBR: if a Replication job is setted-up for that VM (Table 2)

Name Computer name MoRef Datacenter Instance UUID Boot  Power-State
Ubuntu-Master ubuntu-10 vm-1243 Milan 502da7c3-ae30-0448-58f8-5bb220af7b2d 28/05/2020 19:56:42 powered-Off
Ubuntu-Proxy ubuntu-03 vm-126 Venice 501d20dd-afc8-84ae-a9d4-d8cfa8e91fca 31/08/2020 11:38:31 powered-On
Ubuntu-02 ubuntu-02 vm-2270 Milan 502d2405-cc8f-de73-1a19-57e8496bcc12 powered-Off
Ubuntu-02_Rep_VCDR Not set vm-399 Venice 501d517b-672e-30e0-665a-fd4b4af7dcb6 powered-Off
Ubuntu-02_replica_VAO Not set vm-413 Venice 502d2405-cc8f-de73-1a19-57e8496bcc12 powered-Off
Ubuntu-02_Rep_vc01-1 ubuntu-02 vm-2760 Venice 502d7549-a3cd-d58d-92bd-3741f6705478 02/09/2020 19:04:41 poweredOn
Ubuntu-02_Rep_VC01_3 Not set vm-2780 Milan 502d37f9-18f7-8cf2-858d-068850884463 poweredOff

Table 1

Name Has Replica Host Guest OS Has Restore Point Is Backed Up by Multiple Jobs Platform
Ubuntu-02 True esx-01.thegable.internal Ubuntu Linux (64-bit) True True VMware


Is there another way to check it up?

Yes. using Powershell scripts.

The example you can find here below is just the first idea that can be polished with a little bit of your effort.

NB1: I’m not a PowerShell expert, I just love writing scripts easy to read from anyone.

NB2: Before trying it please ask your PowerShell expert a consultant!

NB3: It is meant to be launched from VBR.

NB4: If you think that it can be a feature request write to me!

#snapin Veeam
Add-PSSnapin VeeamPSSnapin -ErrorAction SilentlyContinue
#accessing to vCenter
$credentials=Get-Credential -UserName administrator@yoursite.local -Message “Enter your vCenter password”
Connect-VIServer -server yourvCenter -Credential $credentials
#listing of all job configurated in VBR
#selecting replica job
$replicajobs = $alljobs | Where-Object {$_.isReplica -eq ‘true’}
#getting just Name
#getting VM powered on
$VMsPoweredOn = get-vm | where {$_.Powerstate -eq “PoweredOn”} | Where-Object {$_.Name -like “*Rep*”}
#Showing Replica jobs name & VMs switched on
Disconnect-VIServer -Force -confirm:$false
Read-Host “Replicated VMs = $replicajob_name “,”VMsPoweredOn = $VMsPoweredOn” “Click enter to Exit”

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *