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