sub find_local_replication_job {
my ($cfg, $vmid, $target) = @_;
+ my $vms = PVE::Cluster::get_vmlist();
+
foreach my $id (keys %{$cfg->{ids}}) {
my $data = $cfg->{ids}->{$id};
+ $data->{vmtype} = $vms->{ids}->{$vmid}->{type};
+
return $data if $data->{type} eq 'local' &&
$data->{guest} == $vmid && $data->{target} eq $target;
}