Bug 625315 - Migrate fail with error "internal error unable to execute QEMU command 'migrate_set_speed' "
Summary: Migrate fail with error "internal error unable to execute QEMU command 'migra...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt   
(Show other bugs)
Version: 6.0
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
Keywords: Reopened
Depends On:
Blocks: 698812
TreeView+ depends on / blocked
Reported: 2010-08-19 04:08 UTC by wangyimiao
Modified: 2018-11-14 18:51 UTC (History)
17 users (show)

Fixed In Version: libvirt-0.8.6-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-05-19 13:20:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description wangyimiao 2010-08-19 04:08:27 UTC
Description of problem:
Migrate fail with error "internal error unable to execute QEMU command 'migrate_set_speed'".

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Run that commands on host'' and host ''.
# iptables -F
# setenforce 0
# mount /mnt

2.Use the same 'virt-manager'(virt-manager on host '') to managed host'' and ''.  
  a)File->Add Connection->QEMU/KVM->Remote tunnel over SSH->
  b)File->Add Connection->QEMU/KVM->Remote tunnel over SSH->

3.Select VM 'vm1' and migrate it to the othe host.
   a)Right click 'vm1' and select migrate.
   b)Select new hsot as the other host ''.
   c)Click the "Advance",check 'address' and input the valid ip "".
   d)Check 'Bandwidth' and input valid number "1000"
   e)Click migrate button to finish.

4.error message:
Unable to migrate guest:
 Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/migrate.py", line 457, in _async_migrate
    vm.migrate(dstconn, migrate_uri, rate, live, secure)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1387, in migrate
    self._backend.migrate(destconn.vmm, flags, newname, interface, rate)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 511, in migrate
    if ret is None:raise libvirtError('virDomainMigrate() failed', dom=self)
libvirtError: internal error unable to execute QEMU command 'migrate_set_speed': Invalid parameter type, expected: number

5.#cat /var/log/messages
Aug 18 23:22:27 dhcp-66-92-154 libvirtd: 23:22:27.236: error : qemuMonitorJSONCheckError:316 : internal error unable to execute QEMU command 'migrate_set_speed': Invalid parameter type, expected: number

6.#cat /var/log/libvirt/qemu/vm1.log 
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name vm1 -uuid 29909fa0-46cb-985e-c969-d31e12062739 -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/vm1.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/mnt/yimwang/RHEL-Server-6-64-virtio.qcow2,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:a1:9a:71,bus=pci.0,addr=0x3 -usb -vnc -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

Actual results:
Migrate fail with error "internal error unable to execute QEMU command 'migrate_set_speed': Invalid parameter type, expected: number".

Expected results:
Migrate successfully.

Comment 4 Jiri Denemark 2010-10-26 10:59:18 UTC

*** This bug has been marked as a duplicate of bug 561935 ***

Comment 6 Jiri Denemark 2010-12-01 08:25:29 UTC
Yeah sorry, this is my fault. I overlooked what migration parameter this is actually trying to set.

Anyway, this is already fixed upstream by v0.8.5-192-g4f7162d:

commit 4f7162d1066c15e21123ab7665c390007745328a
Author: Wen Congyang <wency@cn.fujitsu.com>
Date:   Thu Nov 25 16:38:32 2010 +0800

    correct the arguments of migrate_speed
    When we set migrate_speed by json, we receive the following
    error message:
    libvirtError: internal error unable to execute QEMU command
    'migrate_set_speed': Invalid parameter type, expected: number
    The reason is that: the arguments of migrate_set_speed
    by json is json number, not json string.
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>

Comment 7 Jiri Denemark 2010-12-23 23:48:34 UTC
Fixed by a rebase to libvirt-0.8.6

Comment 8 weizhang 2010-12-27 02:26:16 UTC
Verified PASS on 

on /var/log/libvirt/libvirtd.log (with setting log_filters="1:qemu_monitor_json" 
log_outputs="1:file:/var/log/libvirt/libvirtd.log" in the libvirtd.conf file)

10:24:16.915: 28315: debug : qemuMonitorJSONCommandWithFd:217 : Send command '{"execute":"migrate_set_speed","arguments":{"value":1048576000}}' for write with FD -1
10:24:16.916: 28310: debug : qemuMonitorJSONIOProcessLine:115 : Line [{"return": {}}]
10:24:16.916: 28310: debug : qemuMonitorJSONIOProcess:188 : Total used 16 bytes out of 16 available in buffer
10:24:16.916: 28315: debug : qemuMonitorJSONCommandWithFd:222 : Receive command reply ret=0 errno=0 14 bytes '{"return": {}}'

and no error occurs

Comment 11 Cui Chun 2011-02-16 08:23:04 UTC
Rechecked it on the following test environment according to the steps in description. It is passed.

Test environment:

Comment 14 Cui Chun 2011-03-17 05:25:30 UTC
Please make sure the host information for migration has been added into each /etc/hosts.

Comment 18 errata-xmlrpc 2011-05-19 13:20:27 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.