QEMU not honouring bootorder
Dear list,
I've encountered the following problem. I have two disks:
/var/lib/libvirt/images/fedora.qcow2 (which contains OS) /dev/sde (iSCSI dummy disk just for testing)
Now, when I configure QEMU to start with both of them, QEMU/Seabios tries to boot from /dev/sde which fails obviously. Even setting bootorder does not help. Here's my command line:
qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \ -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,bootindex=1 \ -drive file=/dev/sde,format=raw,if=none,id=drive-scsi1 \ -device scsi-block,bus=scsi0.0,drive=drive-scsi1,bootindex=2
It was found that if 'drive-scsi1' is scsi-hd instead of scsi-block everything works as expected and I can boot my guest successfully.
Michal
Quoted 2 lines · Michal Privoznik
Dear list,
Ping. Is there anything I can help you with to have this sorted out?
Michal
Quoted 19 lines · Michal Privoznik
Dear list,
I've encountered the following problem. I have two disks:
/var/lib/libvirt/images/fedora.qcow2(which contains OS)/dev/sde(iSCSI dummy disk just for testing)Now, when I configure QEMU to start with both of them, QEMU/Seabios tries to boot from
/dev/sdewhich fails obviously. Even setting bootorder does not help. Here's my command line:qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \ -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,bootindex=1 \ -drive file=/dev/sde,format=raw,if=none,id=drive-scsi1 \ -device scsi-block,bus=scsi0.0,drive=drive-scsi1,bootindex=2
Quoted 2 lines
It was found that if 'drive-scsi1' is scsi-hd instead of scsi-block everything works as expected and I can boot my guest successfully.
Does it help if you add SCSI level ordering with "lun={0,1},channel=0,scsi-id=0" for both devices?
Fam
Quoted 20 lines · Fam Zheng
Quoted 19 lines · Michal Privoznik
Dear list,
I've encountered the following problem. I have two disks:
/var/lib/libvirt/images/fedora.qcow2(which contains OS)/dev/sde(iSCSI dummy disk just for testing)Now, when I configure QEMU to start with both of them, QEMU/Seabios tries to boot from
/dev/sdewhich fails obviously. Even setting bootorder does not help. Here's my command line:qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \ -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,bootindex=1 \ -drive file=/dev/sde,format=raw,if=none,id=drive-scsi1 \ -device scsi-block,bus=scsi0.0,drive=drive-scsi1,bootindex=2
Quoted 5 lines
Quoted 2 lines
It was found that if 'drive-scsi1' is scsi-hd instead of scsi-block everything works as expected and I can boot my guest successfully.
Does it help if you add SCSI level ordering with "lun={0,1},channel=0,scsi-id=0" for both devices?
Setting lun helps. On the other hand, I had to change from LSI controller to virtio-scsi as LSI doesn't support more than 1 LUNs.
Michal
Quoted 8 lines · Michal Privoznik
Quoted 8 lines
Quoted 8 lines
qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \ -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,bootindex=1 \ -drive file=/dev/sde,format=raw,if=none,id=drive-scsi1 \ -device scsi-block,bus=scsi0.0,drive=drive-scsi1,bootindex=2
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
It was found that if 'drive-scsi1' is scsi-hd instead of scsi-block everything works as expected and I can boot my guest successfully.
Does it help if you add SCSI level ordering with "lun={0,1},channel=0,scsi-id=0" for both devices?
Setting lun helps. On the other hand, I had to change from LSI controller to virtio-scsi as LSI doesn't support more than 1 LUNs.
Does it help to use virtio-scsi and keep the default assignment?
Thanks,
Paolo
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Michal Privoznik
Quoted 8 lines
Quoted 8 lines
qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \ -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,bootindex=1 \ -drive file=/dev/sde,format=raw,if=none,id=drive-scsi1 \ -device scsi-block,bus=scsi0.0,drive=drive-scsi1,bootindex=2
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
It was found that if 'drive-scsi1' is scsi-hd instead of scsi-block everything works as expected and I can boot my guest successfully.
Does it help if you add SCSI level ordering with "lun={0,1},channel=0,scsi-id=0" for both devices?
Setting lun helps. On the other hand, I had to change from LSI controller to virtio-scsi as LSI doesn't support more than 1 LUNs.
Does it help to use virtio-scsi and keep the default assignment?
Yes. If I s/lsi/virtio-scsi-pci/ on the cmd line it does help too.
Michal
Quoted 12 lines · Michal Privoznik
Quoted 11 lines · Paolo Bonzini
Quoted 10 lines · Michal Privoznik
Quoted 10 lines
Quoted 10 lines
qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \ -device scsi-hd,bus=scsi0.0,drive=drive-scsi0,bootindex=1 \ -drive file=/dev/sde,format=raw,if=none,id=drive-scsi1 \ -device scsi-block,bus=scsi0.0,drive=drive-scsi1,bootindex=2It was found that if 'drive-scsi1' is scsi-hd instead of scsi-block everything works as expected and I can boot my guest successfully.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Does it help if you add SCSI level ordering with "lun={0,1},channel=0,scsi-id=0" for both devices?
Setting lun helps. On the other hand, I had to change from LSI controller to virtio-scsi as LSI doesn't support more than 1 LUNs.
Does it help to use virtio-scsi and keep the default assignment?
Yes. If I s/lsi/virtio-scsi-pci/ on the cmd line it does help too.
Cool, then it's an lsi bug. :)
Paolo