PowerShell script exchange
Post Reply
dionmitchell
Lurker
Posts: 1
Liked: never
Joined: May 17, 2024 10:49 am
Full Name: Dion MITCHELL
Contact:

Set-VBRViReplicaJob : Broker service has not started hierarchy collection for host

Post by dionmitchell »

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:

Code: Select all

# 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.
david.domask
Veeam Software
Posts: 2120
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set-VBRViReplicaJob : Broker service has not started hierarchy collection for host

Post by david.domask » 1 person likes this post

Hi Dion, welcome to the forums.

The response there is not expected from the cmdlet, it looks more like perhaps a rescan of the VMware environment is required from the Veeam Backup and Replication console. Can you try going to the Backup Infrastructure Tab in the console, right-click the vCenter/ESXi host in question and select "Rescan"? Does it help?

If it does not, please reproduce the issue and then collect logs from the Veeam Server (use the 3rd radio option to select a host and pick the Veeam Server itself), and then open a Support Case and let Veeam Support take a look.

Just for your reference, the Broker Service handles the communication with Vmware environments for Veeam, and the error is telling that the Broker service wants to rescan the hierarchy but hasn't yet; this should be automatic but can be done manually if required. Perhaps it is an issue with the cmdlet, but I think starting with a rescan is a good first step, then a Support Case.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 5 guests