Hi All,
I recently migrated some replicated VM’s on our VMWare infrastructure to a new DVSwitch and updated VLAN names, so I had to update all the Veeam replication jobs, when i tried to automate this using the Veeam powershell library I got the following error on 95% of the jobs.
I did a little investigation but didnt manage to figure out what the difference was between all the failed jobs and the 3 that successfully updated. Has anyone ever seen this error message before ?
Set-VBRViReplicaJob : Broker service has not started hierarchy collection for host xxxxx
Here is a simplified version of the script i was using:
# get all replication jobs
$jobs = Get-VBRJob | Where-Object TypeToString -eq "VMware Replication"
foreach ($job in $jobs) {
$jobOptions = Get-VBRJobOptions -Job $job
# get list of network objects on new target dvswitch
$destSwitchNets = Get-VBRViServerNetworkInfo -Server "<server with new dv switch>" | Where-Object SwitchName -eq "NEW SWITCH"
# build array of source and destination network objects
$srcNetworks = @()
$destNetworks = @()
foreach($net in $jobOptions.ViNetworkMappingOptions.NetworkMapping){
$srcNetworks += $net.SourceNetwork
$destNetworks += $destSwitchNets | Where-Object NetworkName -eq $net.TargetNetwork.NetworkName
}
# update job with new network mappings
"'$($job.Name)' remapping $($jobOptions.ViNetworkMappingOptions.NetworkMapping.TargetNetwork.NetworkName) -> $destNetworks"
Set-VBRViReplicaJob -Job $job -EnableNetworkMapping -SourceNetwork $srcNetworks -TargetNetwork $destNetworks
}
Thanks for any help that can be provided.