]> git.proxmox.com Git - qemu-server.git/commitdiff
allow insecure migrations from older qemu-servers
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 2 Dec 2016 16:55:29 +0000 (17:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 2 Dec 2016 17:48:49 +0000 (18:48 +0100)
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@proxmox.com>
PVE/QemuServer.pm

index 404692351b6ba7218e3fcb9100f0b00e6eb7cfad..1ca6b791d389fa4396a983df97cb1dbbeb780250 100644 (file)
@@ -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) {