Bug 673811

Summary: [RFE] VIRSH : Add ability to specify max migration bandwidth
Product: Red Hat Enterprise Linux 6 Reporter: Andrew Cathrow <acathrow>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: bsarathy, dallan, dyuan, eblake, jyang, mzhan, rbalakri, rwu, veillard, weizhan, xen-maint, yupzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.9.9-1.el6 Doc Type: Enhancement
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 06:26:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Cathrow 2011-01-30 17:29:13 UTC
Libvirt supports the ability to set the migration bandwidth through the API but not via virsh. So VMs will migrate at qemu's default (30mbs)

There are a couple of ways we could approach this, one would be to add a new parameter to the migrate verb another would be to add a separate call.

Since we already use migrate-setmaxdowntime  to set the downtime maybe a consistent approach would be to add a migrate-setspeed call ?

Comment 1 Andrew Cathrow 2011-01-30 17:33:10 UTC
(In reply to comment #0)
> Libvirt supports the ability to set the migration bandwidth through the API but
> not via virsh. So VMs will migrate at qemu's default (30mbs)
> 
> There are a couple of ways we could approach this, one would be to add a new
> parameter to the migrate verb another would be to add a separate call.
> 
> Since we already use migrate-setmaxdowntime  to set the downtime maybe a
> consistent approach would be to add a migrate-setspeed call ?

Another advantage of using a separate command is that we could use this command to adjust a migration that's already in progress.

Comment 3 Osier Yang 2011-06-08 02:45:29 UTC
patch pushed into upstream:


commit b73f1f8d5c63ee28afc01c999e65dd93d092a720
Author: Osier Yang <jyang>
Date:   Wed Jun 8 10:40:57 2011 +0800

    virsh: Expose virDomainMigrateSetMaxSpeed API to virsh
    
    API virDomainMigrateSetMaxSpeed was introduced since 0.9.0, but
    no command in virsh yet.

Comment 6 weizhang 2012-01-10 11:52:01 UTC
Verify pass on
kernel-2.6.32-223.el6.x86_64
libvirt-0.9.9-1.el6.x86_64
qemu-kvm-0.12.1.2-2.213.el6.x86_64

# virsh migrate-setspeed kvm-rhel6u2-x86_64-new 1000
# virsh migrate-getspeed kvm-rhel6u2-x86_64-new
1000

# virsh migrate --live kvm-rhel6u2-x86_64-new  qemu+ssh://10.66.83.197/system

cat /var/log/libvirt/libvirtd.log

2012-01-10 11:47:08.178+0000: 29358: debug : virDomainMigrateSetMaxSpeed:16037 : dom=0x7f35180c3890, (VM: name=kvm-rhel6u2-x86_64-new, uuid=43ed7ac4-20e3-8c6c-8d9d-b9c672c0eb46), bandwidth=1000, flags=0

2012-01-10 11:47:28.392+0000: 29362: debug : qemuMonitorSetMigrationSpeed:1613 : mon=0x7f350c009110 bandwidth=1000

Comment 7 Osier Yang 2012-05-04 09:47:09 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 9 errata-xmlrpc 2012-06-20 06:26:09 UTC
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/RHSA-2012-0748.html