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:
I export a nbd device disk via nbd-server in my rhel7 host, then launch a KVM guest in rhel6.5 host to connect the nbd service disk, but qemu fail to open it.
btw, rhel7 host did not meet it.
Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-448.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.424.el6.x86_64
guest info:
# uname -r
2.6.32-448.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1.export a nbd device disk via nbd-server in my rhel7 host.
# qemu-img create -f qcow2 -o compat=0.10,preallocation=metadata my-data-disk.qcow2 10G
Formatting 'my-data-disk.qcow2', fmt=qcow2 size=10737418240 compat='0.10' encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off
# rpm -q nbd
nbd-2.9.20-3.el7.x86_64
# nbd-server 1234 /home/my-data-disk.qcow2
2.launch a KVM guest in rhel6.5 host to connect the nbd service disk.
# qemu-img info nbd:10.66.104.53:1234
image: nbd:10.66.104.53:1234
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: unavailable
cluster_size: 65536
e.g:...-drive file=nbd:10.66.104.53:12345,format=qcow2,if=none,id=drive-scsi-disk -device virtio-scsi-pci,id=scsi0,addr=0x8 -device scsi-hd,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=data-disk1
qemu-kvm: -drive file=nbd:10.66.104.53:12345,format=qcow2,if=none,id=drive-scsi-disk: could not open disk image nbd:10.66.104.53:12345: Operation not supported
Actual results:
qemu fail to open it.
Expected results:
qemu should launch the kvm guest with the ndb server disk image.
Additional info:
Unlike RHEL7, QEMU's NBD driver is not whitelisted in RHEL6. So it works with qemu-img, but not with qemu-kvm.
It probably should have been compiled out altogether.
(In reply to Paolo Bonzini from comment #2)
> Unlike RHEL7, QEMU's NBD driver is not whitelisted in RHEL6. So it works
> with qemu-img, but not with qemu-kvm.
>
> It probably should have been compiled out altogether.
Got it, thanks Paolo Bonzini.
(In reply to Sibiao Luo from comment #3)
> (In reply to Paolo Bonzini from comment #2)
> > Unlike RHEL7, QEMU's NBD driver is not whitelisted in RHEL6. So it works
> > with qemu-img, but not with qemu-kvm.
> >
> > It probably should have been compiled out altogether.
>
> Got it, thanks Paolo Bonzini.
Although QEMU's NBD driver is not whitelisted in RHEL6, but from KVM QE's POV we could add a friendly warning message prompt for KVM user? As the behaviour for rhel6 is too different from rhel7's QEMU. like:
e.g:...-drive file=nbd:10.66.104.53:12345,format=qcow2,if=none,id=drive-scsi-disk -device virtio-scsi-pci,id=scsi0,addr=0x8 -device scsi-hd,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=data-disk1
qemu-kvm: -drive file=nbd:10.66.104.53:12345,format=qcow2,if=none,id=drive-scsi-disk: could not open disk image nbd:10.66.104.53:12345: NBD driver is not whitelisted in RHEL6.
Please correct me if any mistake, thanks in advance.
Best Regards,
sluo
This is just that RHEL6 QEMU sometimes has bad quality error messages.
You can get the same error if you use some of the other unsupported file formats and protocols.
Unfortunately, RHEL6 is not able to use good error messages because it only uses errno to generate errors. The RHEL7 changes to improve the error messages were huge and cannot be backported.
(In reply to Paolo Bonzini from comment #5)
> This is just that RHEL6 QEMU sometimes has bad quality error messages.
>
> You can get the same error if you use some of the other unsupported file
> formats and protocols.
>
> Unfortunately, RHEL6 is not able to use good error messages because it only
> uses errno to generate errors. The RHEL7 changes to improve the error
> messages were huge and cannot be backported.
Ok, got it, thanks for Paolo Bonzini.