[pve-devel] [PATCH qemu-server] allow insecure migrations from older qemu-servers

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Dec 2 17:55:29 CET 2016


When trying to migrate a VM from a node with qemu server <= 4.0-92 to
a node with qemu server >= 4.0-93 we failed as the remote qemu-server
got no explicit migration_type' from the older qemu server on the
source.

Check if migration_type is defined on a incoming migration start, if
not set it.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

Tested from old (qemu-server: 4.0-91) to new (current master with this patch)
with insecure and secure migration, works now as expected.
Also new -> new with insecure/secure/dedicated storage network combination

 PVE/QemuServer.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4046923..1ca6b79 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4476,6 +4476,14 @@ sub vm_start {
 		my $datacenterconf = PVE::Cluster::cfs_read_file('datacenter.cfg');
 		my $nodename = PVE::INotify::nodename();
 
+		if (!defined($migration_type)) {
+		    if (defined($datacenterconf->{migration}->{type})) {
+			$migration_type = $datacenterconf->{migration}->{type};
+		    } else {
+			$migration_type = 'secure';
+		    }
+		}
+
 		if ($migration_type eq 'insecure') {
 		    my $migrate_network_addr = PVE::Cluster::get_local_migration_ip($migration_network);
 		    if ($migrate_network_addr) {
-- 
2.1.4





More information about the pve-devel mailing list