[libvirt] python migrateSetMaxSpeed not taking effect

Martin Kletzander mkletzan at redhat.com
Mon Dec 1 07:15:21 UTC 2014


On Mon, Dec 01, 2014 at 10:12:36AM +0400, Krutskikh Ivan wrote:
>Hi,
>
>I am writing a simple python script for migrating vm's based on zfs
>zvol's. Either I am doing something wrong or python migrateSetMaxSpeed
>not taking effect: no mater what value I specify (except for 0), I end
>up with 10 Mib/s migration speed. The code is:
>

And how much you get for 0?  I'm asking because the only thing I can
think of is that the network you are using has the fastest speed of
10Mib and since the lowest number (1) for the SetSpeed function means
1MiB which is 8Mib, it might just not go way higher...

Sorry if I missed something and this question is irrelevant.

>def virt_migrate(domain):
>    conn = libvirt.open('qemu:///system')
>    domain_obj = conn.lookupByName(domain)
>    dst='qemu+ssh://root@%s/system' % args.remote
>    domain_obj.migrateSetMaxSpeed(40,0)
>    new_dom = domain_obj.migrateToURI(dst,libvirt.VIR_MIGRATE_LIVE |
>libvirt.VIR_MIGRATE_PEER2PEER | libvirt.VIR_MIGRATE_NON_SHARED_INC |
>libvirt.VIR_MIGRATE_PERSIST_DEST |
>libvirt.VIR_MIGRATE_UNDEFINE_SOURCE, None, 0)
>    conn.close()
>
>Also tried to specify bandwidth at migrateToUri- I still get 10 mib/s
>at any value...
>
>Thanks in advance!
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141201/629b256b/attachment-0001.sig>


More information about the libvir-list mailing list