Bug 1034993

Summary: [libvirt] can create live snapshot of passthrough device (iSCSI LUN or block device)
Product: Red Hat Enterprise Linux 7 Reporter: Ademar Reis <areis>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, bili, chayang, chhu, dallan, dyuan, juzhang, michen, mzhan, pbonzini, pkrempa, qzhang, shyu, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-25.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1032369
: 1073368 (view as bug list) Environment:
Last Closed: 2014-06-13 09:23:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1032369, 1032393    
Bug Blocks: 1073368, 1131974    

Description Ademar Reis 2013-11-26 20:08:38 UTC
Cloning for libvirt to make sure there are no surprises, feel free to mark it TestOnly/ON_QA if you're sure no changes are needed.

In summary: when using pass-through iSCSI, live-snapshots should not be allowed. Neither should booting a VM with -snapshot=on (already fails, so this is correct).

We plan to fix it in both RHEL7 and RHEL6.6.

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

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:
3.10.0-50.el7.x86_64
qemu-kvm-rhev-1.5.3-19.el7.x86_64
seabios-1.7.2.2-4.el7.x86_64
guest info:
2.6.32-425.el6.x86_64

How reproducible:
100%

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-10.66.90.100:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-0971f7d03-1dff49b26885073d-s2-sluo-172259-lun-0,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
2.
3.

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-10.66.90.100:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-0971f7d03-1dff49b26885073d-s2-sluo-172259-lun-0,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

--- Additional comment from Paolo Bonzini on 2013-11-20 10:35:12 BRST ---

"-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 Peter Krempa 2014-01-21 15:59:57 UTC
I've posted a patch to provide an error message before even attempting to reach qemu with flawed snapshot attempts:

http://www.redhat.com/archives/libvir-list/2014-January/msg00956.html

Comment 3 Peter Krempa 2014-01-21 16:14:34 UTC
Libvirt isn't using -snapshot=on. For external snapshots while the VM is running I've pushed the following patch:

commit 3d1e9e47794f95b9862a3f75d268380b7b700687
Author: Peter Krempa <pkrempa>
Date:   Tue Jan 21 15:34:39 2014 +0100

    qemu: snapshot: Forbid snapshots when backing is a scsi passthrough disk
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1034993
    
    SCSI passthrough disks (<disk .. device="lun">) can't be used as backing
    for snapshots. Currently with upstream qemu the vm crashes on such
    attempt.
    
    This patch adds a early check to catch an attempt to do such a snapshot
    and rejects it right away. qemu will fix the issue but this will let us
    control the error message.

Comment 8 chhu 2014-03-04 08:09:17 UTC
Reproduced with packages:
libvirt-1.1.1-23.el7.x86_64
qemu-kvm-rhev-1.5.3-47.el7.x86_64

Try to verified with packages:
libvirt-1.1.1-25.el7.x86_64
qemu-kvm-rhev-1.5.3-50.el7.x86_64

Test steps:
1. start a guest with xml below:

#virsh define r7-iscsi.xml
Domain r7 defined from r7-iscsi.xml

#virsh start r7
Domain r7 started

#virsh dumpxml r7|grep disk -A 8
<disk type='block' device='lun'>
<driver name='qemu' type='raw'/>
<source dev='/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1'/>
<target dev='sda' bus='scsi'/>
<alias name='scsi0-0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>

#ps -ef|grep r7| grep iscsi
.......
-drive file=/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1,if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
......

2. Try to do live snapshots
#virsh snapshot-create-as r7 s1
error: unsupported configuration: internal snapshot for disk sda unsupported for storage type raw

#virsh snapshot-create-as r7 snap1 --disk-only --diskspec sda,file=/tmp/r7-snap1
error: unsupported configuration: external active snapshots are not supported on scsi passthrough devices

#virsh snapshot-create-as r7 snap2 --memspec file=snap2,snapshot=external --diskspec sda,file=/tmp/r7-snap2
error: unsupported configuration: external active snapshots are not supported on scsi passthrough devices

Test results:
external active snapshots are not supported.

Comment 9 chhu 2014-03-04 08:51:16 UTC
Hi, Peter

I covered below xmls as well. Not sure if they are needed. Will you please help to check if we need to cover these tests? Many thanks!

Try to verified with packages:
libvirt-1.1.1-25.el7.x86_64
qemu-kvm-rhev-1.5.3-50.el7.x86_64

Test steps:
1. start a guest with iscsi lun with disk type='network'.

#virsh dumpxml r7|grep disk
<disk type='network' device='lun'>
<driver name='qemu' type='raw'/>
<source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>
<host name='10.66.7.108' port='3260'/>
</source>
<target dev='sda' bus='scsi'/>
<alias name='scsi0-0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>

#virsh list --all
Id Name State
----------------------------------------------------
26 r7 running

#ps -ef|grep qemu| grep r7
qemu 18795 1 1 17:17 ? 00:00:00 /usr/libexec/qemu-kvm -name r7
......
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
......

#virsh snapshot-create-as r7 s1
error: unsupported configuration: internal snapshot for disk sda unsupported for storage type raw

#virsh snapshot-create-as r7 snap1 --disk-only --diskspec sda,file=/tmp/r7-snap1
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

#virsh snapshot-create-as r7 snap2 --memspec file=snpa2,snapshot=external --diskspec sda,file=/tmp/r7-snap2
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

2. start a gust with xml below:

<disk type='volume' device='disk'>
<driver name='qemu'/>
<source pool='pool-iscsi' volume='unit:0:0:1' mode='host'/>
<target dev='sda' bus='scsi'/>
<alias name='scsi0-0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
<alias name='scsi0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>

#ps -ef|grep qemu-kvm| grep iscsi
qemu 12673 1 4 16:27 ? 00:00:26 /usr/libexec/qemu-kvm -name r7
.......
-drive file=/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1,if=none,id=drive-scsi0-0-0-0 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
......

#virsh snapshot-create-as r7 s1
Domain snapshot s1 created

#virsh snapshot-create-as r7 snap1 --disk-only --diskspec vda,file=/tmp/r7-snap1
Domain snapshot snap1 created

#virsh snapshot-create-as r7 snap2 --memspec file=snap2,snapshot=external --diskspec vda,file=/tmp/r7-snap2
Domain snapshot snap2 created

#virsh snapshot-list r7
Name Creation Time State
------------------------------------------------------------
s1 2014-03-04 16:38:33 +0800 running
snap1 2014-03-04 16:33:40 +0800 disk-snapshot
snap2 2014-03-04 16:34:31 +0800 running

Comment 10 Peter Krempa 2014-03-04 17:20:21 UTC
(In reply to chhu from comment #9)

> -drive
> file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,
> id=drive-scsi0-0-0-0,format=raw -device
> scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,
> id=scsi0-0-0-0,bootindex=1
> ......

Paolo, is this combination invalid similar to using the initiator in the host?

> 
> #virsh snapshot-create-as r7 s1
> error: unsupported configuration: internal snapshot for disk sda unsupported
> for storage type raw
> 
> #virsh snapshot-create-as r7 snap1 --disk-only --diskspec
> sda,file=/tmp/r7-snap1
> error: internal error: unable to execute QEMU command 'transaction': Could
> not create file: Permission denied
> 
> #virsh snapshot-create-as r7 snap2 --memspec file=snpa2,snapshot=external
> --diskspec sda,file=/tmp/r7-snap2
> error: internal error: unable to execute QEMU command 'transaction': Could
> not create file: Permission denied
> 

Thanks,

Peter

Comment 11 Paolo Bonzini 2014-03-04 17:28:46 UTC
Yes, it is.  It's just an ugly error message though, right?

Comment 12 chhu 2014-03-05 10:00:35 UTC
Try to verified with packages:
libvirt-1.1.1-25.el7.x86_64
qemu-kvm-rhev-1.5.3-50.el7.x86_64

Test steps:
1. Try to start a guest with a scsi passthrough qcow2 disk, met the same error as qemu-kvm bug1032369

# qemu-img create -f qcow2 /dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1 20G
Formatting '/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1', fmt=qcow2 size=21474836480 encryption=off cluster_size=65536 lazy_refcounts=off

# virsh define r7-iscsi.xml 
Domain r7 defined from r7-iscsi.xml

# virsh dumpxml r7| grep disk -A 6
    <disk type='block' device='lun'>
      <driver name='qemu' type='qcow2'/>
      <source dev='/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

# virsh start r7
error: Failed to start domain r7
error: internal error: early end of file from monitor: possible problem:
qemu-kvm: -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1: scsi-block: scsi generic interface too old
qemu-kvm: -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1: Device initialization failed.
qemu-kvm: -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1: Device 'scsi-block' could not be initialized

Comment 13 chhu 2014-03-06 02:35:51 UTC
Test with packages:
libvirt-1.1.1-25.el7.x86_64
qemu-kvm-rhev-1.5.3-50.el7.x86_64

Test steps:
1. start a guest with iscsi qcow2 disk: <disk type='network' device='disk'>

# virsh dumpxml r7|grep disk -A 7
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>
        <host name='10.66.7.108' port='3260'/>
      </source>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

# ps -ef| grep iscsi
qemu     10414     1  1 10:12 ?        00:00:00 /usr/libexec/qemu-kvm -name r7
......
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0,format=qcow2 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
......

# virsh snapshot-create-as r7 s1
Domain snapshot s1 created

# virsh snapshot-create-as r7 snap1 --disk-only --diskspec sda,file=/tmp/r7-snap1
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

# virsh snapshot-create-as r7 snap2 --memspec file=snap2,snapshot=external --diskspec sda,file=/tmp/r7-snap2
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

2. start a guest with iscsi qcow2 disk: <disk type='volume' device='disk'>

# virsh dumpxml r7|grep disk -A 7
    <disk type='volume' device='disk'>
      <driver name='qemu'/>
      <source pool='pool-iscsi' volume='unit:0:0:1' mode='direct'/>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

# ps -ef|grep r7| grep iscsi
qemu     11074     1  1 10:22 ?        00:00:00 /usr/libexec/qemu-kvm -name r7
.......
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 
......

# virsh snapshot-create-as r7 s1
Domain snapshot s1 created

# virsh snapshot-create-as r7 snap1 --disk-only --diskspec sda,file=/tmp/r7-snap1
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

# virsh snapshot-create-as r7 snap2 --memspec file=snap2,snapshot=external --diskspec sda,file=/tmp/r7-snap2
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

Test results:
Can create internal live snapshot. Can't create external snapshot, output error:
"unable to execute QEMU command 'transaction': Could not create file: Permission denied"

Comment 14 chhu 2014-03-06 02:47:08 UTC
(In reply to chhu from comment #12)
> Try to verified with packages:
> libvirt-1.1.1-25.el7.x86_64
> qemu-kvm-rhev-1.5.3-50.el7.x86_64
> 
> Test steps:
> 1. Try to start a guest with a scsi passthrough qcow2 disk, met the same
> error as qemu-kvm bug1032369
> 
> # qemu-img create -f qcow2
> /dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-
> lun-1 20G
> Formatting
> '/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-
> lun-1', fmt=qcow2 size=21474836480 encryption=off cluster_size=65536
> lazy_refcounts=off
> 
> # virsh define r7-iscsi.xml 
> Domain r7 defined from r7-iscsi.xml
> 
> # virsh dumpxml r7| grep disk -A 6
>     <disk type='block' device='lun'>
>       <driver name='qemu' type='qcow2'/>
>       <source
> dev='/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:
> iscsi-lun-1'/>
>       <target dev='sda' bus='scsi'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
> 
> # virsh start r7
> error: Failed to start domain r7
> error: internal error: early end of file from monitor: possible problem:
> qemu-kvm: -device
> scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,
> id=scsi0-0-0-0,bootindex=1: scsi-block: scsi generic interface too old
> qemu-kvm: -device
> scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,
> id=scsi0-0-0-0,bootindex=1: Device initialization failed.
> qemu-kvm: -device
> scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,
> id=scsi0-0-0-0,bootindex=1: Device 'scsi-block' could not be initialized

Met the same error, when using xml with: <disk type='network' device='lun'>, type='qcow2'

# virsh dumpxml r7| grep disk -A 7
    <disk type='network' device='lun'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>
        <host name='10.66.7.108' port='3260'/>
      </source>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

# virsh start r7
error: Failed to start domain r7
error: internal error: early end of file from monitor: possible problem:
qemu-kvm: -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1: scsi-block: scsi generic interface too old
qemu-kvm: -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1: Device initialization failed.
qemu-kvm: -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1: Device 'scsi-block' could not be initialized

Comment 15 chhu 2014-03-06 03:24:55 UTC
Summary the test results of comment 8,9,12,13,14 as below:

1. test with xml below: 
<disk type='block' device='lun'> 
  <driver name='qemu' type='raw'/>
  <source dev='/dev/disk/by-path/ip-10.66.7.108:3260-iscsi- iqn.2013-10.com.example:iscsi-lun-1'/>
.......

qemu-kvm command line: scsi-block
-drive file=/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1,if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1

==Result: external active snapshots are not supported. PASS

2. test with xml below: 
<disk type='block' device='lun'>
  <driver name='qemu' type='qcow2'/>
  <source dev='/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1'/>
......

==Result: start the guest met the same error as qemu-kvm bug1032369

3. test with xml below:
<disk type='network' device='lun'>
  <driver name='qemu' type='raw'/>
  <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>
......

qemu-kvm command line: scsi-block
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1

==Results: external active snapshot failed with error:
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

4. test with xml below:    
<disk type='network' device='lun'>
  <driver name='qemu' type='qcow2'/>
  <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>

==Result: start the guest met the same error as qemu-kvm bug1032369

5. test with xml below:    
<disk type='network' device='disk'>
  <driver name='qemu' type='qcow2'/>
  <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>

qemu-kvm command line: scsi-hd
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0,format=qcow2 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1

==Result: 
1) internal active snapshot succeeded 
2) external active snapshot failed with error:
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

6. test with xml below:
<disk type='network' device='disk'>
  <driver name='qemu' type='raw'/>
  <source protocol='iscsi' name='iqn.2013-10.com.example:iscsi/1'>

qemu-kvm command line:
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1

==Result:
1) internal active snapshot not support: PASS
2) external active snapshot failed with error:
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

7. test with xml below: 
<disk type='volume' device='disk'>
  <driver name='qemu'/>
  <source pool='pool-iscsi' volume='unit:0:0:1' mode='direct'/>

qemu-kvm command line: scsi-hd
-drive file=iscsi://10.66.7.108:3260/iqn.2013-10.com.example%3Aiscsi/1,if=none,id=drive-scsi0-0-0-0 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 

==Result:
1) internal active snapshot succeeded 
2) external active snapshot failed with error:
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied

8. test with xml below:
<disk type='volume' device='disk'>
<driver name='qemu'/>
<source pool='pool-iscsi' volume='unit:0:0:1' mode='host'/>

qemu-kvm command line: scsi-hd
-drive file=/dev/disk/by-path/ip-10.66.7.108:3260-iscsi-iqn.2013-10.com.example:iscsi-lun-1,if=none,id=drive-scsi0-0-0-0 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1

==Result:
1) internal active snapshot succeeded 
2) external active snapshot succeeded

Comment 16 chhu 2014-03-06 09:08:10 UTC
Hi, Peter

As the test according to the xml listed in the patch in comment 2 is PASS, according to the comment 15, step1 (or comment 8). And the related qemu-kvm bug is set on rhel-7.1.0. How about set this bug verified and clone it to 7.1 for the left issues?

Comment 17 Peter Krempa 2014-03-06 09:28:18 UTC
(In reply to chhu from comment #16)
> Hi, Peter
> 
> As the test according to the xml listed in the patch in comment 2 is PASS,
> according to the comment 15, step1 (or comment 8). And the related qemu-kvm
> bug is set on rhel-7.1.0. How about set this bug verified and clone it to
> 7.1 for the left issues?

I agree, we can figure out the rest in the next release as it's just improvement of error reporting.

Comment 18 chhu 2014-03-06 10:02:24 UTC
1. The test according to the xml listed in the patch in comment 2 is PASS, according to the comment 15, step1 (or comment 8)

2. Do related test listed in comment 15, on libvirt-1.1.1-23.el7.x86_64, qemu-kvm-rhev-1.5.3-47.el7.x86_64, step2-step8 got the same results, no regression.

Set this bug verified and will clone it to 7.1 for left issues.

Comment 20 Ludek Smid 2014-06-13 09:23:42 UTC
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.