allow insecure migrations from older qemu-servers

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>
This commit is contained in:
Thomas Lamprecht 2016-12-02 17:55:29 +01:00 committed by Dietmar Maurer
parent 1b314d19be
commit b7a5a2251b

View 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) {