[pve-devel] [PATCH guest-common] migrate: set migration_type
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Jun 6 10:04:00 CEST 2017
Moved from qemu-server: set $opts->{migration_type} to a
default or a value from datacenter.cfg.
---
PVE/AbstractMigrate.pm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/PVE/AbstractMigrate.pm b/PVE/AbstractMigrate.pm
index 3cbe164..a0096fa 100644
--- a/PVE/AbstractMigrate.pm
+++ b/PVE/AbstractMigrate.pm
@@ -114,14 +114,23 @@ sub migrate {
$class = ref($class) || $class;
+ my $dc_conf = PVE::Cluster::cfs_read_file('datacenter.cfg');
+
my $migration_network = $opts->{migration_network};
if (!defined($migration_network)) {
- my $dc_conf = PVE::Cluster::cfs_read_file('datacenter.cfg');
$migration_network = $dc_conf->{migration}->{network};
}
my $ssh_info = PVE::Cluster::get_ssh_info($node, $migration_network);
$nodeip = $ssh_info->{ip};
+ my $migration_type = 'secure';
+ if (defined($opts->{migration_type})) {
+ $migration_type = $opts->{migration_type};
+ } elsif (defined($dc_conf->{migration}->{type})) {
+ $migration_type = $dc_conf->{migration}->{type};
+ }
+ $opts->{migration_type} = $migration_type;
+
my $self = {
delayed_interrupt => 0,
opts => $opts,
--
2.11.0
More information about the pve-devel
mailing list