Bug 1022392 - Disable live-storage-migration in qemu-kvm (migrate -b/-i)
Disable live-storage-migration in qemu-kvm (migrate -b/-i)
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jeff Cody
Virtualization Bugs
:
Depends On: 1020493
Blocks: 987165 1020495 1022393
  Show dependency treegraph
 
Reported: 2013-10-23 04:16 EDT by Ademar Reis
Modified: 2017-03-16 12:14 EDT (History)
13 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-15.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1020493
Environment:
Last Closed: 2014-06-13 08:33:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ademar Reis 2013-10-23 04:16:29 EDT
cloning for RHEL7.

+++ This bug was initially created as a clone of Bug #1020493 +++

Via QMP, migrate -b (and -i) is available in our RHEL-6.x packages, but this option is not supported and was introduced by accident. The proper way to migrate a VM without shared storage is using drive_mirror and NBD, as supported in the -rhev flavor of QEMU.

virsh migrate --live --copy-storage-{all,inc} currently calls migrate -b in RHEL6.x and apparently it automatically calls block_stream if it's available (for example, in RHEV). This BZ will be cloned against libvirt to make sure these options are properly handled after the removal of migrate -b.

--- Additional comment from Jiri Denemark on 2013-10-18 10:40:03 BRST ---

Please note, that blindly removing blk and inc arguments of migrate QMP command is not going to work well with libvirt. Libvirt always sets these arguments (to either false or true). If you really have to remove this functionality, reporting a suitable error when any of those arguments are true would be the best solution from libvirt's point of view.
Comment 1 Miroslav Rezanina 2013-11-07 03:24:09 EST
Fix included in qemu-kvm-1.5.3-15.el7
Comment 3 huiqingding 2013-12-19 04:45:05 EST
Reproduce this bug using the following version:
host kernel: kernel-3.10.0-63.el7.x86_64
qemu-kvm-1.5.3-14.el7.x86_64

Reproduce steps:
1. On the src host, boot a guest
# /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp tcp:0:4445,server,nowait -netdev tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test

2. On the dst host, boot a guest with listenning mode "-incoming tcp:0:5800"
# /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp tcp:0:4445,server,nowait -netdev tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -incoming tcp:0:5800

3. Do migration using "migrate -b"
 {"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":false,"uri":"tcp:$dst_host_ip:5800"}}

4. Do migration using "migrate -i"
{"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":false,"uri":"tcp:$dst_host_ip:5800"}}

Actual results:
After step3, return the following information in qmp
{"return": {}}
{"timestamp": {"seconds": 1387445702, "microseconds": 921878}, "event": "SPICE_MIGRATE_COMPLETED"}
check migration status:
{"execute":"query-migrate"}
{"return": {"status": "failed"}}

After step4, return the following information in qmp
{"timestamp": {"seconds": 1387446033, "microseconds": 832221}, "event": "SPICE_MIGRATE_COMPLETED"}
{"error": {"class": "GenericError", "desc": "address resolution failed for 0::5800: Servname not supported for ai_socktype"}}
check migration status:
{"execute":"query-migrate"}
{"return": {"status": "failed"}}
Comment 4 huiqingding 2013-12-19 04:52:22 EST
Verify this bug using the following version:
host kernel: kernel-3.10.0-63.el7.x86_64
qemu-kvm-1.5.3-24.el7.x86_64

Reproduce steps:
1. On the src host, boot a guest
# /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp tcp:0:4445,server,nowait -netdev tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test

2. On the dst host, boot a guest with listenning mode "-incoming tcp:0:5800"
# /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp tcp:0:4445,server,nowait -netdev tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -incoming tcp:0:5800

3. Do migration using "migrate -b"
{"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":false,"uri":"tcp:$dst_host_ip:5800"}}

4. Do migration using "migrate -i"
{"execute":"migrate","arguments":{"detach":true,"blk":false,"inc":true,"uri":"tcp:$dst_host_ip:5800"}}


Actual results:
After step3, return the following information in qmp
{"error": {"class": "GenericError", "desc": "this feature or command is not currently supported"}}

After step4, return the following information in qmp
{"error": {"class": "GenericError", "desc": "this feature or command is not currently supported"}}

Based on the above result, I think this bug is fixed.
Comment 5 huiqingding 2013-12-19 05:01:35 EST
(In reply to huiqingding from comment #3)

The commands of step3 and step4 are not correct comment #3. 
Use the correct command to reproduce this bug.

 
Verify this bug using the following version:
host kernel: kernel-3.10.0-63.el7.x86_64
qemu-kvm-1.5.3-14.el7.x86_64

Reproduce steps:
1. On the src host, boot a guest
# /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp tcp:0:4445,server,nowait -netdev tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test

2. On the dst host, boot a guest with listenning mode "-incoming tcp:0:5800"
# /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp tcp:0:4445,server,nowait -netdev tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -incoming tcp:0:5800

3. Do migration using "migrate -b"
{"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":false,"uri":"tcp:$dst_host_ip:5800"}}

4. Do migration using "migrate -i"
{"execute":"migrate","arguments":{"detach":true,"blk":false,"inc":true,"uri":"tcp:$dst_host_ip:5800"}}


Actual results:
After step3, return the following information in qmp
{"return": {}}
{"timestamp": {"seconds": 1387447137, "microseconds": 976324}, "event": "SPICE_MIGRATE_COMPLETED"}
check migration status
{"execute":"query-migrate"}
{"return": {"status": "failed"}}

After step4, return the following information in qmp
{"return": {}}
{"timestamp": {"seconds": 1387447210, "microseconds": 486529}, "event": "SPICE_MIGRATE_COMPLETED"}
check migration status
{"execute":"query-migrate"}
{"return": {"status": "failed"}}
Comment 6 huiqingding 2013-12-19 21:53:28 EST
(In reply to huiqingding from comment #4)
> Verify this bug using the following version:
> host kernel: kernel-3.10.0-63.el7.x86_64
> qemu-kvm-1.5.3-24.el7.x86_64
> 
> Reproduce steps:
> 1. On the src host, boot a guest
> # /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G
> -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid
> 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive
> file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,
> format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,
> rerror=stop,aio=threads -device
> virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std
> -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp
> tcp:0:4445,server,nowait -netdev
> tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-
> ifdown,vhost=on -device
> virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test
> 
> 2. On the dst host, boot a guest with listenning mode "-incoming tcp:0:5800"
> # /usr/libexec/qemu-kvm -M pc -nodefaults -cpu SandyBridge -enable-kvm -m 4G
> -smp 8,sockets=2,cores=2,threads=2 -name rhel7 -uuid
> 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive
> file=/home/RHEL-7.0-20131127.1.qcow2_v3-bak,if=none,id=drive-virtio-disk0,
> format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,
> rerror=stop,aio=threads -device
> virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0  -vga std
> -vnc :1 -monitor stdio -spice port=5900,disable-ticketing  -qmp
> tcp:0:4445,server,nowait -netdev
> tap,id=hostnet0,ifname=guest17,script=/etc/ovs-ifup,downscript=/etc/ovs-
> ifdown,vhost=on -device
> virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -incoming tcp:0:5800
> 
> 3. Do migration using "migrate -b"
> {"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":false,"uri":
> "tcp:$dst_host_ip:5800"}}
> 
> 4. Do migration using "migrate -i"
> {"execute":"migrate","arguments":{"detach":true,"blk":false,"inc":true,"uri":
> "tcp:$dst_host_ip:5800"}}
> 
> 
> Actual results:
> After step3, return the following information in qmp
> {"error": {"class": "GenericError", "desc": "this feature or command is not
> currently supported"}}
> 
> After step4, return the following information in qmp
> {"error": {"class": "GenericError", "desc": "this feature or command is not
> currently supported"}}
> 
> Based on the above result, I think this bug is fixed.

I also test migration using "migrate -b -i"
{"execute":"migrate","arguments":{"detach":true,"blk":true,"inc":ture,"uri":
"tcp:$dst_host_ip:5800"}}

The return information of the above command is:
{"error": {"class": "GenericError", "desc": "this feature or command is not currently supported"}}

Above the result and comment #4, I think this bug is fixed.
Comment 8 Ludek Smid 2014-06-13 08:33:43 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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