I conducted more tests on Jammy. I found that -boot strict=on might be
the culprit.

The man page defines it as follows:

"
https://www.qemu.org/docs/master/system/qemu-manpage.html

Do strict boot via strict=on as far as firmware/BIOS supports it. This only 
effects when boot priority is changed by bootindex options. The default is 
non-strict boot.
"

===================

If -boot strict=on is not used, and bootindex is specified, then grub
can detect vdb.

 sudo /usr/bin/qemu-system-x86_64 \
  -machine q35,accel=kvm,usb=off,vmport=off,dump-guest-core=off \
  -cpu host \
  -m 2048 \
  -smp 1   \
  -nodefaults \
 -blockdev 
'{"driver":"file","filename":"/var/lib/libvirt/images/focal.qcow2","node-name":"libvirt-1-storage"}'
 \
 -blockdev 
'{"node-name":"libvirt-1-format","driver":"qcow2","file":"libvirt-1-storage"}' \
 -device 
virtio-blk-pci,drive=libvirt-1-format,id=virtio-disk0,addr=0x2,bootindex=1 \
 -blockdev 
'{"driver":"file","filename":"/var/lib/libvirt/images/jammypart.qcow2","node-name":"libvirt-2-storage"}'
 \
 -blockdev 
'{"node-name":"libvirt-2-format","driver":"qcow2","file":"libvirt-2-storage"}' \
 -device virtio-blk-pci,drive=libvirt-2-format,id=virtio-disk1,addr=0x3 \
 -boot menu=on -nographic -serial mon:stdio


                             GNU GRUB  version 2.04

   Minimal BASH-like line editing is supported. For the first word, TAB   
   lists possible command completions. Anywhere else TAB lists possible   
   device or file completions. ESC at any time exits.                    grub> 


grub >lss
(hd0) 
(hd0)(hd0,gpt3)  (hd0,gpt3)(hd0,gpt2)  (hd0,gpt2)(hd0,gpt1)  (hd0,gpt1)(hd1)  
(hd1)(hd1,gpt2)  (hd1,gpt2)(hd1,gpt1)  (hd1,gpt1)


===================

If -boot strict=on is used, but bootindex is not specified, grub can
also detect vdb.

sudo /usr/bin/qemu-system-x86_64 \
  -machine q35,accel=kvm,usb=off,vmport=off,dump-guest-core=off \
  -cpu host \
  -m 2048 \
  -smp 1   \
  -nodefaults \
    -boot strict=on \
 -blockdev 
'{"driver":"file","filename":"/var/lib/libvirt/images/focal.qcow2","node-name":"libvirt-1-storage"}'
 \
 -blockdev 
'{"node-name":"libvirt-1-format","driver":"qcow2","file":"libvirt-1-storage"}' \
 -device virtio-blk-pci,drive=libvirt-1-format,id=virtio-disk0,addr=0x2 \
 -blockdev 
'{"driver":"file","filename":"/var/lib/libvirt/images/jammypart.qcow2","node-name":"libvirt-2-storage"}'
 \
 -blockdev 
'{"node-name":"libvirt-2-format","driver":"qcow2","file":"libvirt-2-storage"}' \
 -device virtio-blk-pci,drive=libvirt-2-format,id=virtio-disk1,addr=0x3 \
 -boot menu=on -nographic -serial mon:stdio

                             GNU GRUB  version 2.04

   Minimal BASH-like line editing is supported. For the first word, TAB   
   lists possible command completions. Anywhere else TAB lists possible   
   device or file completions. ESC at any time exits.                    grub> 


grub >lss
(hd0) 
(hd0)(hd0,gpt3)  (hd0,gpt3)(hd0,gpt2)  (hd0,gpt2)(hd0,gpt1)  (hd0,gpt1)(hd1)  
(hd1)(hd1,gpt2)  (hd1,gpt2)(hd1,gpt1)  (hd1,gpt1)
grub> 
grub > 

===================


If this is the expected behavior, it suggests that -boot strict=on does not 
work correctly on Focal.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2125827

Title:
  Jammy grub2 failed to detect 2nd virtio disk Edit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2125827/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to