Busy migrating Vmware VMs to a new VCenter using VBR Replications,
keeping source migrated VMs in a powered off state for DRP in case of
issue for a while, I try to "power-shell scipt" a way to verify the new
replicated vms to be correctly updated in my vbr backup jobs.
By updated, I mean the source VM (old Vcenter) object to be deleted from backup job
and the new VM (new Vcenter) to be added to the same backup job.
To do so, I started with this basic script :
Code: Select all
foreach ($job in get-vbrjob | sort-object -property name) {
foreach ($jobobj in (Get-VBRJobObject -job $job )) {
write-host "JOB : ", $job.name, " - VM : ", $jobobj.name , " - Path : ", $jobobj.location
}
}
What I notice is the "$jobobj.location" is not correct and inaccurate.
Let me explain what I mean:
When I replicate my VMs, I use a temp ressource pool to store replicas, first to
separate the being migrated VMs from the migrated and runnins ones and
to easier retrieve migrated VMs when updating vbr backup jobs (see later on)
I then create my replication job with selected VMS.
Then run a replication with source VM running, some VMs are quite big in size.
Replicat suffix (_replica by defaut) set to emtpy to keep same names.
When completed (full sync) and ready for migration, I power off source VMs,
re-run replication job (Incr sync) then start replica VMs.
If ok, after a week, I delete my source VMs.
As I deal with a 500+VMs, and for easier vbr backup job update,
I update my backup jobs with VMs stored in temp resource pool, easier to
retrieve VMs.
When migration is ok and backup job updated, the VMs is moved to another ressource pool.
like [ACC/DEV/PROD/....]_[LINUX/vAPP/WINDOWS]
The issue :
When I delete the migrated source VMs from the VBR Backup job and
add the replica ones, Veeam seems to keep the location of the replica VMs
(being VCENTER/DATA_CENTER/CLUSTER/##TEMP_MIGRATION) at update time
and does not update/take care when the VMs are moved to another ressource pool.
Meaning the $jobobj.location is inaccurate when calling Get-VBRJobObject.
If I run "Find-VBRViEntity -VMsAndTemplates", I retrive all of my VMs,
original and replicated ones, but I cannot reply on VM Name only
to be sure my backups are correct (Source and replicat VMs keep original names and
both still exists on the 2 VCenters) and I do not find a quick way using any ID to make
the join ... It's the reason I used $jobobj.location from Get-VBRJobObject.
As a sample, for a given migrated VM :
location from VBRJobObject : VCENTER/DATA_CENTER/CLUSTER/##TEMP_MIGRATION
location from Find-VBRViEntity : VCENTER/DATA_CENTER/CLUSTER/PROD_WINDOWS
As workaround I parse the $jobobj.location, cuting after VCenter Cluster name.
being : VCENTER/DATA_CENTER/CLUSTER
Any idea ? Is this a bug ?
Any advises
Th