From 42668529e658557aaf1a8ad5c1fdf189da0e85c6 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 5 Jun 2013 10:24:39 +0200 Subject: [PATCH] migrate: pass --machine parameter to remote 'qm start' command --- PVE/QemuMigrate.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 085aa16..dd48f78 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -139,6 +139,7 @@ sub prepare { if (my $pid = PVE::QemuServer::check_running($vmid)) { die "cant migrate running VM without --online\n" if !$online; $running = $pid; + $self->{forcemachine} = PVE::QemuServer::get_current_qemu_machine($vmid); } if (my $loc_res = PVE::QemuServer::check_local_resources($conf, 1)) { @@ -313,6 +314,10 @@ sub phase2 { my $cmd = [@{$self->{rem_ssh}}, 'qm', 'start', $vmid, '--stateuri', 'tcp', '--skiplock', '--migratedfrom', $nodename]; + if ($self->{forcemachine}) { + push @$cmd, '--machine', $self->{forcemachine}; + } + PVE::Tools::run_command($cmd, outfunc => sub { my $line = shift; -- 2.39.2