qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Errors with multiple VMPVSCSI devices


From: John Call
Subject: Errors with multiple VMPVSCSI devices
Date: Wed, 12 May 2021 10:14:23 -0600

Hi qemu-discuss,

I recently needed to boot a VM with many disks attached to a VMPVSCSI
controller. I had a lot of trouble with this. My biggest issue is the
"bad scsi device lun: 1" error, which I think is a qemu thing. Is this
the right place to ask if this can be fixed, or do I need to approach
the `virt-install` or `libvirt` groups?

I use `virt-install` like this[1] to create my VM, but it refuses to
start with this error:
ERROR    internal error: qemu unexpectedly closed the monitor:
2021-05-12T15:49:51.310324Z qemu-system-x86_64: -device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,device_id=00000003,drive=libvirt-20-format,id=scsi0-0-0-1,serial=00000003:
bad scsi device lun: 1

I can fix this by grabbing the `/usr/bin/qemu-system-x86_64`
command-line and changing the incrementing LUN IDs to instead become
incrementing TARGET IDs like this...
[jcall@jcall-laptop tmp]$ diff -U0 a-pvscsi.sh b-pvscsi.sh
--- a-pvscsi.sh 2021-05-12 09:10:55.427049902 -0600
+++ b-pvscsi.sh 2021-05-12 09:10:59.715114940 -0600
@@ -41 +17 @@
--device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,device_id=00000003,drive=libvirt-20-format,id=scsi0-0-0-1,serial=00000003
\
+-device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,device_id=00000003,drive=libvirt-20-format,id=scsi0-0-1-0,serial=00000003
\
@@ -44 +20 @@
--device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=2,lun=0,device_id=00000004,drive=libvirt-19-format,id=scsi0-0-0-2,serial=00000004
\
+-device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=2,lun=0,device_id=00000004,drive=libvirt-19-format,id=scsi0-0-2-0,serial=00000004
\

Now my VM boots! I'd love it if this could "just work" in the future.
Thanks for all your help!
John

[1] ## virt-install command ##
sudo virt-install --name pvscsi-test-sh \
  --memory $((1024*6)) --vcpus 2 --cpu host \
  --controller scsi,model=vmpvscsi \
  --import \
  --disk vol=default/8.2.2.0-disk1.qcow2,bus=ide,serial=00000001,boot.order=1 \
  --disk vol=default/8.2.2.0-disk2.qcow2,bus=scsi,serial=00000002 \
  --disk vol=default/8.2.2.0-disk3.qcow2,bus=scsi,serial=00000003 \
  --disk vol=default/8.2.2.0-disk4.qcow2,bus=scsi,serial=00000004 \
  --network model=e1000,network=default
## end virt-install command ##



reply via email to

[Prev in Thread] Current Thread [Next in Thread]