Bug 1032369 - can create live snapshot of passthrough device (iSCSI LUN or block device)
can create live snapshot of passthrough device (iSCSI LUN or block device)
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jeff Cody
Virtualization Bugs
Depends On:
Blocks: 1032393 1034993 1073368 1131974
  Show dependency treegraph
Reported: 2013-11-19 22:55 EST by Sibiao Luo
Modified: 2014-08-20 08:49 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1032393 1034993 (view as bug list)
Last Closed: 2014-06-11 14:43:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-11-19 22:55:37 EST
Description of problem:
fail to boot guest with pass-through iSCSI LUN specified '-snapshot/snapshot=on'.
But we can create snapshot from a pass-through iSCSI LUN to local file successfully.

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

How reproducible:

Steps to Reproduce:
1.boot guest with pass-through iSCSI LUN specified '-snapshot/snapshot=on'. 
e.g:/usr/libexec/qemu-kvm -M q35 -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection...-drive file=/dev/disk/by-path/ip-,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,snapshot=on -device virtio-scsi-pci,bus=pcie.0,addr=0x7,id=scsi0 -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0

Actual results:
after step 1, QEMU will quit with wrong warning message.
(qemu) qemu-kvm: -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0: scsi-block: scsi generic interface too old
qemu-kvm: -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0: Device initialization failed.
qemu-kvm: -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0: Device 'scsi-block' could not be initialized

Expected results:
It should boot up guest successfully with pass-through iSCSI LUN specified '-snapshot/snapshot=on'. 

Additional info:
# /usr/libexec/qemu-kvm -M q35 -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d10 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pcie.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL6.5-20131019.1_Server_x86_64.qcow2bk,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pcie.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=virtio-net-pci0,mac=00:01:02:03:04:05,bus=pcie.0,addr=0x5 -device virtio-balloon-pci,id=ballooning,bus=pcie.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -drive file=/dev/disk/by-path/ip-,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,snapshot=on -device virtio-scsi-pci,bus=pcie.0,addr=0x7,id=scsi0 -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio
Comment 1 Paolo Bonzini 2013-11-20 07:35:12 EST
"-snapshot/snapshot=on" are not supposed to work with iSCSI LUNs or scsi-block.

The bug is actually that we can create a live snapshot of a passthrough device.
Comment 2 Sibiao Luo 2013-12-02 01:11:05 EST
If use libiscsi has not reproduced this issue.
e.g:...-drive file=iscsi://,if=none,id=drive-data-disk,readonly=on,snapshot=on,serial=sluo-disk -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk -iscsi id=iqn-sluo
(qemu) info block
drive-data-disk: removable=0 io-status=ok file=/tmp/vl.9W69qb backing_file=iscsi:// backing_file_depth=1 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

Best Regards,
Comment 3 Paolo Bonzini 2013-12-02 05:30:15 EST
You're not using a passthrough device (virtio-blk-pci).  snapshot=on + libiscsi is a valid combination in general.  It is snapshot=on + scsi-block that is invalid.
Comment 5 Ademar Reis 2014-06-11 14:43:56 EDT
From https://bugzilla.redhat.com/show_bug.cgi?id=1032393#c4 (RHEL6 clone):

"Libvirt doesn't use -snapshot (or snapshot=on), so refusing to support it in qemu should have no impact on libvirt."

Closing as WONTFIX in RHEL7 because we don't support direct usage of qemu-kvm

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