[pve-devel] [PATCH] Add guest type at find_local_replication_job

Wolfgang Link w.link at proxmox.com
Wed Jun 28 14:27:37 CEST 2017


We need this at migration time.
---
 PVE/ReplicationConfig.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/ReplicationConfig.pm b/PVE/ReplicationConfig.pm
index 51cfe81..670113d 100644
--- a/PVE/ReplicationConfig.pm
+++ b/PVE/ReplicationConfig.pm
@@ -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;
     }
-- 
2.11.0





More information about the pve-devel mailing list