Hide Forgot
We currently only allow migration speed to be set when the migration is started. QEMU supports changing this migration speed dynamically. We should expose some form of migration_set_speed externally to allow a management system to adjust the migration speed - this would allow an external management system to increase the bandwidth if it detects the migration is not going to complete in time.
This functionality went upstream in a series ending with v0.8.8-235-g83cc3d1: commit 83cc3d1d55f8a7ea042ecd6dea07347159215f16 Author: Daniel P. Berrange <berrange> Date: Thu Feb 17 14:33:00 2011 +0000 Wire up virDomainMigrateSetSpeed into QEMU driver Enhance the QEMU migration monitoring loop, so that it can get a signal to change migration speed on the fly * src/qemu/qemu_domain.h: Add signal for changing speed on the fly * src/qemu/qemu_driver.c: Wire up virDomainMigrateSetSpeed driver * src/qemu/qemu_migration.c: Support signal for changing speed
Verified this bug pass with libvirt-0.9.1-1.el6.x86_64 1. Could find the API in libvirt-python # cat /usr/lib64/python2.6/site-packages/libvirt.py ... def migrateSetMaxSpeed(self, bandwidth, flags): """The maximum bandwidth (in Mbps) that will be used to do migration can be specified with the bandwidth parameter. Not all hypervisors will support a bandwidth cap """ ret = libvirtmod.virDomainMigrateSetMaxSpeed(self._o, bandwidth, flags) if ret == -1: raise libvirtError ('virDomainMigrateSetMaxSpeed() failed', dom=self) return ret ... 2. Configue migrate env on 2 hosts 3. On source host, # virsh list --all Id Name State ---------------------------------- 8 rhel61_1 running # virsh migrate rhel61_1 qemu+ssh://10.66.5.5/system 4. During migration, execute the following commands # python Python 2.6.6 (r266:84292, Apr 11 2011, 15:50:32) [GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import libvirt >>> con = libvirt.open ("qemu:///system") >>> dom = con.lookupByID (8) >>> dom.migrateSetMaxSpeed(2,0) 0
Move to Verified according to Comment #2
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1513.html