Bug 953062 - RFE: AHCI live migration
Summary: RFE: AHCI live migration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: John Snow
QA Contact: jingzhao
URL:
Whiteboard:
Depends On:
Blocks: 1305606 1313485 887844 922007 1227278 1288337 1375520
TreeView+ depends on / blocked
 
Reported: 2013-04-17 09:29 UTC by Sibiao Luo
Modified: 2016-11-07 20:09 UTC (History)
24 users (show)

Fixed In Version: qemu-kvm-rhev-2.5.0-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 20:09:33 UTC
Target Upstream Version:
jsnow: needinfo-


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2673 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2016-11-08 01:06:13 UTC

Description Sibiao Luo 2013-04-17 09:29:09 UTC
Description of problem:
boot up a guest, then save a VM snapsho, it will fail with 'Error -22 while writing VM' error.

Version-Release number of selected component (if applicable):
host info:
kernel-3.9.0-0.rc6.51.el7.x86_64
qemu-kvm-1.4.0-2.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
guest info:
kernel-3.9.0-0.rc6.51.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot up a guest.
e.g:# /usr/libexec/qemu-kvm -S -M q35 -cpu Opteron_G2 -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid 389d06a7-ed31-4fae-baf4-87bdb9b5594e -rtc base=localtime,clock=host,driftfix=slew -readconfig /home/ich9-ehci-uhci.cfg -device usb-tablet,id=tablet0 -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x3 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=bridge1,addr=0x4,ioeventfd=off -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,id=port2 -drive file=/home/rhel7u64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=threads,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-blk-pci,scsi=on,bus=bridge1,addr=0x5,drive=drive-system-disk,id=system-disk,bootindex=1,ioeventfd=off -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=e1000-net-pci0,mac=00:22:19:27:54:3a,bus=bridge1,addr=0x6,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=bridge1,addr=0x7 -drive file=/home/usb-storage.qcow2,if=none,id=drive-storage,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage,id=usb-storage -drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,cache=none,aio=threads,werror=stop,rerror=stop,serial=QEMU-DISK2 -device virtio-blk-pci,scsi=on,bus=bridge1,addr=0x9,drive=drive-data-disk,id=data-disk,physical_block_size=4096,logical_block_size=512 -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -vga cirrus -monitor stdio -serial unix:/tmp/ttyS0,server,nowait -drive file=/home/floppy1.vfd,if=none,id=drive-fdc0-0-0,format=qcow2 -global isa-fdc.driveA=drive-fdc0-0-0 -drive file=/home/floppy2.vfd,if=none,id=drive-fdc0-1-0,format=qcow2 -global isa-fdc.driveB=drive-fdc0-1-0
2.save a VM snapshop.

Actual results:
after step 2, it fail with 'Error -22 while writing VM'.
(qemu) savevm
Error -22 while writing VM

Expected results:
can do snapshot for all the qcow2 device correctly.

Additional info:

Comment 1 Suqin Huang 2013-04-17 09:48:28 UTC
does internal snapshot supported?

Comment 2 juzhang 2013-04-17 09:54:02 UTC
(In reply to comment #1)
> does internal snapshot supported?

Hi Kevin,

As far as I know, we do not officially support internal snapshot right since we have support the external snapshot, right?

Comment 3 Kevin Wolf 2013-04-17 12:54:12 UTC
Correct, we don't support it officially. However, if we find an obvious bug,
that shouldn't stop us from fixing it.

I don't get the error with a command line as simple as "qemu-kvm -hda
/tmp/test.qcow2". Can you try and simplify the command line? Maybe you'll
already see which option causes it to fail.

Comment 4 Sibiao Luo 2013-04-18 02:23:07 UTC
(In reply to comment #3)
> Correct, we don't support it officially. However, if we find an obvious bug,
> that shouldn't stop us from fixing it.
> 
> I don't get the error with a command line as simple as "qemu-kvm -hda
> /tmp/test.qcow2". Can you try and simplify the command line? Maybe you'll
> already see which option causes it to fail.

ok, thanks for your kindly reminds, this issue is caused by the Q35 machine type, the pc-i440fx-1.4 machine type have no such issue, I simple the command line to test as following.
# /usr/libexec/qemu-kvm -S -M pc-i440fx-1.4 -cpu Opteron_G2 -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid 389d06a7-ed31-4fae-baf4-87bdb9b5594e -rtc base=localtime,clock=host,driftfix=slew -usb -device usb-tablet,id=tablet0 -drive file=/home/rhel7u64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=threads,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x3,drive=drive-system-disk,id=system-disk,bootindex=1,ioeventfd=off -net none -balloon none -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -vga cirrus -monitor stdio -serial unix:/tmp/ttyS0,server,nowait
(qemu) savevm 
(qemu) info snapshots 
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         vm-20130418101446      9.2M 2013-04-18 10:14:46   00:00:00.000

# /usr/libexec/qemu-kvm -S -M q35 -cpu Opteron_G2 -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid 389d06a7-ed31-4fae-baf4-87bdb9b5594e -rtc base=localtime,clock=host,driftfix=slew -usb -device usb-tablet,id=tablet0 -drive file=/home/rhel7u64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=threads,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-blk-pci,scsi=on,bus=pcie.0,addr=0x3,drive=drive-system-disk,id=system-disk,bootindex=1,ioeventfd=off -net none -balloon none -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -vga cirrus -monitor stdio -serial unix:/tmp/ttyS0,server,nowait 
(qemu) savevm 
Error -22 while writing VM

Comment 5 Kevin Wolf 2013-04-18 08:34:04 UTC
Thanks for finding this out. It seems to be caused by the fact that AHCI isn't
migratable. We should improve the error handling for savevm so that you get a
meaningful message.

Comment 7 John Snow 2014-07-18 16:34:53 UTC
Pushing back to 7.2 at least to match https://bugzilla.redhat.com/show_bug.cgi?id=901631 -- It's not likely that we will be able to enable this feature prior to QEMU 2.2, which puts us more in the 7.2 time-frame.

However, if a better error message is still required for 7.1, please let me know.

Comment 15 jingzhao 2016-08-15 10:01:54 UTC
Reproduced it on qemu-kvm-rhev-2.3.0-31.el7_2.21.x86_64
1.Boot guest
2.(qemu) savevm 
State blocked by non-migratable device '0000:00:1f.2/ich9_ahci'

Verified it on qemu-img-rhev-2.6.0-20.el7.x86_64 and kernel-3.10.0-492.el7.x86_64
1. Boot guest
2. (qemu) savevm 
(qemu) info snapshots 
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         vm-20160815164223      959M 2016-08-15 16:42:23   00:01:13.456
2         vm-20160815171403      683M 2016-08-15 17:14:03   00:00:39.251


Following is the command line
/usr/libexec/qemu-kvm \
-S -M q35 \
-cpu SandyBridge \
-enable-kvm \
-m 4096 -smp 4,sockets=2,cores=2,threads=1 \
-no-kvm-pit-reinjection \
-name test \
-uuid 389d06a7-ed31-4fae-baf4-87bdb9b5594e \
-rtc base=localtime,clock=host,driftfix=slew \
-usb -device usb-tablet,id=tablet0 \
-drive file=/home/bug/big.img,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=threads,werror=stop,rerror=stop,serial=QEMU-DISK1 \
-device virtio-blk-pci,scsi=off,bus=pcie.0,addr=0x3,drive=drive-system-disk,id=system-disk,bootindex=1,ioeventfd=off \
-net none \
-balloon none \
-qmp tcp:0:4444,server,nowait \
-k en-us -boot menu=on \
-vnc :1 -spice disable-ticketing,port=5931 \
-vga cirrus \
-monitor stdio \
-serial unix:/tmp/ttyS0,server,nowait \

Thanks
Jing Zhao

Comment 20 errata-xmlrpc 2016-11-07 20:09:33 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.

https://rhn.redhat.com/errata/RHBA-2016-2673.html


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