Bug 971799 - qemu should not crash when if=scsi although it's unsupportable device
qemu should not crash when if=scsi although it's unsupportable device
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.0
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Markus Armbruster
Xueqiang Wei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-07 05:57 EDT by xu
Modified: 2017-08-01 23:22 EDT (History)
14 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.9.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 19:27:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backtrace (4.24 KB, text/x-log)
2013-06-07 05:57 EDT, xu
no flags Details

  None (edit)
Description xu 2013-06-07 05:57:49 EDT
Created attachment 758088 [details]
backtrace

Description of problem:

start a guest with command:
qemu-kvm -drive if=scsi,file=/root/test/autotest-devel/client/tests/virt/shared/data/images/rhel64-64.qcow2,format=qcow2,media=disk,id=disk0 -vnc :0 -enable-kvm  -smp 2 -m 4096
then, qemu crash with error that "qemu-kvm: Unknown device 'lsi53c895a' for bus 'PCI'"
When the image is connected as an ide disk(if=ide) the vm works fine;

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

qemu-kvm-1.5.0-2.el7.x86_64


How reproducible:

100%

Steps to Reproduce:
1. boot guest with command:
qemu-kvm -drive if=scsi,file=/root/test/autotest-devel/client/tests/virt/shared/data/images/rhel64-64.qcow2,format=qcow2,media=disk,id=disk0 -vnc :0 -enable-kvm  -smp 2 -m 4096


Actual results:

unexpectedly crashes

Expected results:


Additional info:
see backtrack in attachment
Comment 2 Markus Armbruster 2013-06-13 03:51:34 EDT
We don't support -drive if=scsi (see Virtualization Administration
Guide chapter 18.3 qemu-kvm Whitelist / Disk options).

Under the hood, -drive if=scsi creates a lsi53c895a SCSI HBA per bus.
This fails, because we don't ship the lsi53c895a device model.

We could make it fail more nicely, but I'm not sure it's worthwhile.
Comment 3 xu 2013-07-22 04:29:25 EDT
(In reply to Markus Armbruster from comment #2)
> We don't support -drive if=scsi (see Virtualization Administration
> Guide chapter 18.3 qemu-kvm Whitelist / Disk options).
> 
> Under the hood, -drive if=scsi creates a lsi53c895a SCSI HBA per bus.
> This fails, because we don't ship the lsi53c895a device model.
> 
> We could make it fail more nicely, but I'm not sure it's worthwhile.

Hi  Markus Armbruster,

yes, lsi53c895a isn't on rhel7.0  and I think it's worth to report fail more nicely not crash directly;

Thanks,
Xu
Comment 7 CongLi 2017-03-22 22:16:56 EDT
Hi Markus,

Will this bug be fixed in qemu-kvm or qemu-kvm-rhev?
If both, QE would clone this bug to qemu-kvm-rhev too.

Thanks.
Comment 8 Markus Armbruster 2017-03-23 02:09:26 EDT
Uh, I missed the component is qemu-kvm!  I intend to fix it in qemu-kvm-rhev, because the rebase to 2.9 makes the fix trivial.  I'm adjusting the component accordingly.  Feel free to clone if you want this bug tracked for qemu-kvm, too.  A fix seems unlikely unless we rebase, though, simply because non-trivial change just to fix how if=scsi fails is hard to justify.

Thanks for catching my mistake early!
Comment 9 CongLi 2017-03-23 02:20:07 EDT
(In reply to Markus Armbruster from comment #8)
> Uh, I missed the component is qemu-kvm!  I intend to fix it in
> qemu-kvm-rhev, because the rebase to 2.9 makes the fix trivial.  I'm
> adjusting the component accordingly.  Feel free to clone if you want this
> bug tracked for qemu-kvm, too.  A fix seems unlikely unless we rebase,
> though, simply because non-trivial change just to fix how if=scsi fails is
> hard to justify.

Thanks Markus!

QE also prefer to fix this issue in qemu-kvm-rhev.
Comment 12 Miroslav Rezanina 2017-05-23 04:17:10 EDT
Fix included in qemu-kvm-rhev-2.9.0-6.el7
Comment 14 Xueqiang Wei 2017-05-25 03:57:40 EDT
reproduced it on qemu-kvm-rhev-2.9.0-5.el7

the output like:
QEMU 2.9.0 monitor - type 'help' for more information
(qemu) qemu-kvm: Unknown device 'lsi53c895a' for bus 'PCI'
a.sh: line 34: 31854 Aborted                 /usr/libexec/qemu-kvm -S -name 'avocado-vt-vm1' -sandbox off -machine pc -nodefaults -vga cirrus -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/avocado_gIIpiH/monitor-qmpmonitor1-20170517-050538-MGAJgF33,server,nowait -mon chardev=qmp_id_qmpmonitor1,mode=control -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/avocado_gIIpiH/monitor-catch_monitor-20170517-050538-MGAJgF33,server,nowait -mon chardev=qmp_id_catch_monitor,mode=control -device pvpanic,ioport=0x505,id=idIdVKNW -chardev socket,id=serial_id_serial0,path=/var/tmp/avocado_gIIpiH/serial-serial0-20170517-050538-MGAJgF33,server,nowait -device isa-serial,chardev=serial_id_serial0 -chardev socket,id=seabioslog_id_20170517-050538-MGAJgF33,path=/var/tmp/avocado_gIIpiH/seabios-20170517-050538-MGAJgF33,server,nowait -device isa-debugcon,chardev=seabioslog_id_20170517-050538-MGAJgF33,iobase=0x402 -device ich9-usb-ehci1,id=usb1,addr=0x1d.7,multifunction=on,bus=pci.0 -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=0x1d.0,firstport=0,bus=pci.0 -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=0x1d.2,firstport=2,bus=pci.0 -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=0x1d.4,firstport=4,bus=pci.0 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x3 -drive id=drive_image1,if=scsi,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/rhel73-64-virtio-scsi.qcow2,media=disk -device scsi-hd,id=image1,drive=drive_image1,bootindex=0 -device virtio-net-pci,mac=9a:ae:af:b0:b1:b2,id=idosYv4r,vectors=4,netdev=idf8nwBs,bus=pci.0,addr=0x4 -netdev tap,id=idf8nwBs,vhost=on -m 2451 -smp 2,cores=1,threads=1,sockets=2 -cpu 'Opteron_G2',+kvm_pv_unhalt -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :0 -rtc base=utc,clock=host,driftfix=slew -boot order=cdn,once=c,menu=off,strict=off -monitor stdio


Tested on qemu-kvm-rhev-2.9.0-6.el7 not hit this issue. So verify it.

QEMU 2.9.0 monitor - type 'help' for more information
(qemu) c
Comment 16 errata-xmlrpc 2017-08-01 19:27:12 EDT
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://access.redhat.com/errata/RHSA-2017:2392
Comment 17 errata-xmlrpc 2017-08-01 21:04:50 EDT
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://access.redhat.com/errata/RHSA-2017:2392
Comment 18 errata-xmlrpc 2017-08-01 21:56:50 EDT
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://access.redhat.com/errata/RHSA-2017:2392
Comment 19 errata-xmlrpc 2017-08-01 22:37:35 EDT
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://access.redhat.com/errata/RHSA-2017:2392
Comment 20 errata-xmlrpc 2017-08-01 23:02:18 EDT
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://access.redhat.com/errata/RHSA-2017:2392
Comment 21 errata-xmlrpc 2017-08-01 23:22:27 EDT
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://access.redhat.com/errata/RHSA-2017:2392

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