5
0
mirror of git://git.proxmox.com/git/pve-guest-common.git synced 2024-12-25 23:21:36 +03:00

Add guest type at find_local_replication_job

We need this at migration time.
This commit is contained in:
Wolfgang Link 2017-06-28 14:27:37 +02:00 committed by Wolfgang Bumiller
parent 9622dffbb4
commit 914b6647a4

View File

@ -213,9 +213,13 @@ sub check_for_existing_jobs {
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;
}