When trying to boot install73.img using virtio-scsi in qemu the kernel
panics. Disabling the vioscsi driver lets the installer boot but then
there is no disk to install to. This happens as long as any disks are
attached using virtio-scsi but I am specifically trying to boot the
install image itself because it's my only option for trying to install
OpenBSD on Oracle Cloud Always Free tier.

I was able to reproduce this problem locally using the following qemu
parameters:
-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd -drive
if=none,id=hd,file=install73.img (or disk.qcow2)

Using a virtio-blk device works just fine, using:
-drive if=virtio,file=install73.img

Refer to my post on the misc mailing list for the Oracle Cloud output:
https://marc.info/?l=openbsd-misc&m=168077863011110&w=2

Here is the full output of my local attempt to reproduce the issue,
the kernel panic is identical on Oracle Cloud:
C:\Users\matan\qemu\OpenBSD>qemu-system-x86_64 -accel
whpx,kernel-irqchip=off -machine q35 -cpu EPYC-Rome,-monitor -m 8g
-smp 6,sockets=1,cores=6 -nic
user,model=virtio-net-pci,hostfwd=tcp::10022-:22 -vga virtio -drive
if=virtio,file=disk.qcow2 -nographic -bios ..\OVMF_CODE.fd -device
virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd -drive
if=none,id=hd,file=install73.img -boot menu=on
WARNING: Image format was not specified for 'install73.img' and
probing guessed raw.
         Automatically detecting the format is dangerous for raw
images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Windows Hypervisor Platform accelerator is operational
BdsDxe: loading Boot0001 "UEFI QEMU QEMU HARDDISK " from
PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU HARDDISK " from
PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x0,0x0)
probing: pc0 com0 mem[640K 7M 16K 2031M 3M 6144M]
disk: hd0 hd1*
>> OpenBSD/amd64 BOOTX64 3.63
boot> set tty com0
switching console to com0
>> OpenBSD/amd64 BOOTX64 3.63
boot> boot
cannot open hd0a:/etc/random.seed: No such file or directory
booting hd0a:/7.3/amd64/bsd.rd: 3924676+1647616+3886216+0+704512
[109+440424+293778]=0xa667f0
entry point at 0x1001000
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.3 (RAMDISK_CD) #1063: Sat Mar 25 10:41:49 MDT 2023
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 8565739520 (8168MB)
avail mem = 8302120960 (7917MB)
random: good seed from bootblocks
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7f8f8000 (10 entries)
bios0:
bios0: QEMU Standard PC (Q35 + ICH9, 2009)
acpi0 at bios0: ACPI 3.0
acpi0: tables DSDT FACP APIC HPET MCFG WAET BGRT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 5 3600 6-Core Processor, 3601.29 MHz, 17-31-00
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,AMCR8,ABM,SSE4A,MASSE,3DNOWP,TOPEXT,CPCTR,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA,UMIP,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 512KB
64b/line 8-way L2 cache, 16MB 64b/line 16-way L3 cache
cpu0: apic clock running at 1000MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 100000000 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
"ACPI0006" at acpi0 not configured
acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
com0: console
acpicmos0 at acpi0
"ACPI0010" at acpi0 not configured
acpicpu at acpi0 not configured
pci0 at mainbus0 bus 0
0:1:0: mem address conflict 0x700000000000/0x4000
0:2:0: mem address conflict 0x700000004000/0x4000
0:2:0: rom address conflict 0xfffc0000/0x40000
0:3:0: mem address conflict 0x700000008000/0x4000
0:4:0: mem address conflict 0x70000000c000/0x4000
pchb0 at pci0 dev 0 function 0 "Intel 82G33 Host" rev 0x00
virtio0 at pci0 dev 1 function 0 "Qumranet Virtio 1.x GPU" rev 0x01
virtio0: no matching child driver; not configured
virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio1: address 52:54:00:12:34:56
virtio1: apic 0 int 22
virtio2 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
vioscsi0 at virtio2: qsize 256
scsibus0 at vioscsi0: 255 targets
uvm_fault(0xffffffff8190e4c8, 0x8, 0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff81237353 cs 8 rflags 10282 cr2 8 cpl e
rsp ffffffff81a06670
gsbase 0xffffffff818fbff0  kgsbase 0x0
panic: trap type 6, code=0, pc=ffffffff81237353

The operating system has halted.
Please press any key to reboot.

Reply via email to