use vm_mon_cmd_nocheck at startup

To avoid errors on migration.
This commit is contained in:
Dietmar Maurer 2012-12-20 12:41:03 +01:00
parent 4bdb05142c
commit 95381ce06c

View File

@ -2972,7 +2972,7 @@ sub vm_start {
print "migration listens on port $migrate_port\n" if $migrate_port; print "migration listens on port $migrate_port\n" if $migrate_port;
if ($statefile && $statefile ne 'tcp') { if ($statefile && $statefile ne 'tcp') {
eval { vm_mon_cmd($vmid, "cont"); }; eval { vm_mon_cmd_nocheck($vmid, "cont"); };
warn $@ if $@; warn $@ if $@;
} }
@ -2982,13 +2982,13 @@ sub vm_start {
$migrate_speed = $conf->{migrate_speed} || $migrate_speed; $migrate_speed = $conf->{migrate_speed} || $migrate_speed;
$migrate_speed = $migrate_speed * 1048576; $migrate_speed = $migrate_speed * 1048576;
eval { eval {
vm_mon_cmd($vmid, "migrate_set_speed", value => $migrate_speed); vm_mon_cmd_nocheck($vmid, "migrate_set_speed", value => $migrate_speed);
}; };
my $migrate_downtime = $defaults->{migrate_downtime}; my $migrate_downtime = $defaults->{migrate_downtime};
$migrate_downtime = $conf->{migrate_downtime} if defined($conf->{migrate_downtime}); $migrate_downtime = $conf->{migrate_downtime} if defined($conf->{migrate_downtime});
if (defined($migrate_downtime)) { if (defined($migrate_downtime)) {
eval { vm_mon_cmd($vmid, "migrate_set_downtime", value => $migrate_downtime); }; eval { vm_mon_cmd_nocheck($vmid, "migrate_set_downtime", value => $migrate_downtime); };
} }
if($migratedfrom) { if($migratedfrom) {
@ -3001,9 +3001,9 @@ sub vm_start {
# fixme: how do we handle that on migration? # fixme: how do we handle that on migration?
if (!defined($conf->{balloon}) || $conf->{balloon}) { if (!defined($conf->{balloon}) || $conf->{balloon}) {
vm_mon_cmd($vmid, "balloon", value => $conf->{balloon}*1024*1024) vm_mon_cmd_nocheck($vmid, "balloon", value => $conf->{balloon}*1024*1024)
if $conf->{balloon}; if $conf->{balloon};
vm_mon_cmd($vmid, 'qom-set', vm_mon_cmd_nocheck($vmid, 'qom-set',
path => "machine/peripheral/balloon0", path => "machine/peripheral/balloon0",
property => "stats-polling-interval", property => "stats-polling-interval",
value => 2); value => 2);