| Summary: | [RFE] Add external API to change migration speed | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Andrew Cathrow <acathrow> |
| Component: | libvirt | Assignee: | Daniel Veillard <veillard> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2 | CC: | ajia, dyuan, eblake, jdenemar, liko, mzhan, rbalakri, weizhan, xen-maint, yoyzhang |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.9.1-1.el6 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 10:53:47 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Andrew Cathrow
2011-01-30 17:37:13 UTC
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 |