[pve-devel] [PATCH 10/14] convert migrate_set_speed monitor command to qmp

Alexandre Derumier aderumier at odiso.com
Tue Jun 26 06:34:19 CEST 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index bd6e8ed..cbe6d6c 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2661,9 +2661,9 @@ sub vm_start {
 	# we set a very hight default of 8192m which is basically unlimited
 	my $migrate_speed = $defaults->{migrate_speed} || 8192;
 	$migrate_speed = $conf->{migrate_speed} || $migrate_speed;
+	$migrate_speed = $migrate_speed * 1048576;
 	eval {
-	    my $cmd = "migrate_set_speed ${migrate_speed}m";
-	    vm_monitor_command($vmid, $cmd);
+	    vm_mon_cmd($vmid, "migrate_set_speed", value => $migrate_speed);
 	};
 
 	my $migrate_downtime = $defaults->{migrate_downtime};
-- 
1.7.2.5




More information about the pve-devel mailing list