On 12/04/14 17:53, Jim Fehlig wrote:
A user asked me about setting max downtime prior to migration, which
I
thought could be done similar to MigrateSetMaxSpeed. I was surprised to
find that it can only be set when migration is in progress
# virsh migrate-setmaxdowntime test 1000
error: Requested operation is not valid: domain is not being migrated
Is there any reason this cannot be set prior to migration? Max speed
can even be set on a persistent domain that is not running. I'd be happy
to work on a patch if the only reason is no one has needed this itch
scratched.
qemu driver allows this already since:
commit fe808d95bf353647bb39b3bc468f5a841b5588dd
Author: Chris St. Pierre <chris.a.st.pierre(a)gmail.com>
Date: Mon Sep 29 13:45:28 2014 +0000
Allow setting migration max downtime any time
This removes the artificial and unnecessary restriction that
virDomainSetMaxDowntime() only be called while a migration is in
progress.
https://bugzilla.redhat.com/show_bug.cgi?id=1146618
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 63fc83f..e873d45 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12023,12 +12023,6 @@ qemuDomainMigrateSetMaxDowntime(virDomainPtr dom,
priv = vm->privateData;
- if (priv->job.asyncJob != QEMU_ASYNC_JOB_MIGRATION_OUT) {
- virReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("domain is not being migrated"));
- goto endjob;
- }
-
VIR_DEBUG("Setting migration downtime to %llums", downtime);
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorSetMigrationDowntime(priv->mon, downtime);
.. so I don't see any problem doing that with XEN too.
Regards,
Jim
Peter