Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Blockcopy for lun device changes disk type=block to file, however,
it's unsupported configuration, disk device='lun' is only valid for
block type disk source. It's better provide error message when issuing
blockcopy, OR specify that when doing blockcopy with lun device,
must specify --blockdev in manual page
Version-Release number of selected component (if applicable):
libvirt-1.2.14-1.el7.x86_64
qemu-kvm-rhev-2.2.0-8.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Prepare a transient domain specifying block as disk type, lun as device type
<disk type='block' device='lun'>
<driver name='qemu' type='qcow2'/>
<source dev='/dev/HostVG/vol1'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
2. blockcopy and pivot
# virsh blockcopy vm3 vda /tmp/vm3.copy --wait --verbose
Block Copy: [100 %]
Now in mirroring phase
# virsh blockjob vm3 vda --pivot
3. check domain xml
# virsh dumpxml vm3 | grep disk -a6
<disk type='file' device='lun'>
<driver name='qemu' type='qcow2'/>
<source file='/tmp/vm3.copy'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
4. edit domain xml to make it persistent and destroy/start domain
# virsh edit vm3
Domain vm3 XML configuration edited.
# virsh destroy vm3; virsh start vm3
Domain vm3 destroyed
error: Failed to start domain vm3
error: unsupported configuration: disk device='lun' is only valid for block type disk source
Actual results:
Expected results:
It's better provide error message when issuing blockcopy, OR specify that when doing blockcopy with lun device, must specify --blockdev in manual page
Additional info:
We could also be nice and automatically imply the --blockdev flag when copying a lun source (that is, you are correct that the destination of a block copy of a lun device must be another block device, and we should error out if the destination is a regular file; and this behavior is what you would get if supplying the --blockdev flag)
Fixed upstream:
commit bd9d7078949ab19fd844926a20196d5533cfdf89
Author: Peter Krempa <pkrempa>
Date: Mon May 2 15:26:51 2016 +0200
qemu: Reject invalid block copy targets for <disk device='lun'>
Extract the relevant parts of the existing checker and reuse them for
blockcopy since copying to a non-block device creates an invalid
configuration.
Verified with libvirt-2.0.0-10.el7.x86_64 and qemu-kvm-rhev-2.6.0-26.el7.x86_64
As virtio lun does not work currently, test it using lun device + raw format + scsi bus. Libvirt provides proper error message
Steps:
1. create a vm with scsi-block
<disk type='block' device='lun'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdl'/>
<target dev='sda' bus='scsi'/>
</disk>
2. blockcopy to a file
# virsh blockcopy vm1 sda /tmp/vm1.copy --wait --verbose
error: unsupported configuration: disk device='lun' is only valid for block type disk source
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/RHSA-2016-2577.html
Description of problem: Blockcopy for lun device changes disk type=block to file, however, it's unsupported configuration, disk device='lun' is only valid for block type disk source. It's better provide error message when issuing blockcopy, OR specify that when doing blockcopy with lun device, must specify --blockdev in manual page Version-Release number of selected component (if applicable): libvirt-1.2.14-1.el7.x86_64 qemu-kvm-rhev-2.2.0-8.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a transient domain specifying block as disk type, lun as device type <disk type='block' device='lun'> <driver name='qemu' type='qcow2'/> <source dev='/dev/HostVG/vol1'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> 2. blockcopy and pivot # virsh blockcopy vm3 vda /tmp/vm3.copy --wait --verbose Block Copy: [100 %] Now in mirroring phase # virsh blockjob vm3 vda --pivot 3. check domain xml # virsh dumpxml vm3 | grep disk -a6 <disk type='file' device='lun'> <driver name='qemu' type='qcow2'/> <source file='/tmp/vm3.copy'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> 4. edit domain xml to make it persistent and destroy/start domain # virsh edit vm3 Domain vm3 XML configuration edited. # virsh destroy vm3; virsh start vm3 Domain vm3 destroyed error: Failed to start domain vm3 error: unsupported configuration: disk device='lun' is only valid for block type disk source Actual results: Expected results: It's better provide error message when issuing blockcopy, OR specify that when doing blockcopy with lun device, must specify --blockdev in manual page Additional info: