nettester Not sure why you want to attach sd
to virtio
when
$ fgrep 'Virtio disk device' /usr/src/sys/arch/amd64/conf/GENERIC
ld* at virtio? # Virtio disk device
$
works fine:
$ fgrep ld0 /var/run/dmesg.boot
ld0 at virtio0: features: 0x10000a54<INDIRECT_DESC,CONFIG_WCE,FLUSH,BLK_SIZE,GEOMETRY,SEG_MAX>
ld0: 476 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 1000215216 sectors
ld0: GPT GUID: ee308ad1-5648-4402-91ce-3d85c5620a65
dk0 at ld0: "EFI system part", 204800 blocks at 2048, type: msdos
dk1 at ld0: "Microsoft reserved partition", 32768 blocks at 206848, type: <unknown>
dk2 at ld0: "Basic data partition", 2048000 blocks at 239616, type: <unknown>
dk3 at ld0: "ebc11ed5-5bac-46c8-a102-885285e6d3a1", 195407872 blocks at 2287616, type: ntfs
autoconfiguration error: ld0: wedge named 'Basic data partition' already existed, using 'ebc11ed5-5bac-46c8-a102-885285e6d3a1'
dk4 at ld0: "Ubuntu", 102400000 blocks at 197697536, type: ext2fs
dk5 at ld0: "FreeBSD-EFI", 20480 blocks at 300097536, type: msdos
dk6 at ld0: "FreeBSD-14.0", 104857600 blocks at 300118016, type: ffs
dk7 at ld0: "FreeBSD-swap", 16777216 blocks at 404975616, type: swap
dk8 at ld0: "NetBSD-EFI", 20480 blocks at 421754880, type: msdos
dk9 at ld0: "NetBSD-Main", 102400000 blocks at 421777408, type: ffs
dk10 at ld0: "NetBSD-swap", 16384000 blocks at 524179456, type: swap
dk11 at ld0: "Linux filesystem", 20971520 blocks at 540563456, type: ext2fs
dk12 at ld0: "OpenBSD-EFI", 20480 blocks at 561534976, type: msdos
dk13 at ld0: "OpenBSD-7.4", 104857600 blocks at 561555456, type: <unknown>
boot device: ld0
$
I'm running Qemu (dangerously ie. using the same NVME drive for Qemu and bare-metal) like this on Linux:
CoreBook# cat /root/bin/qemu.sh
#!/bin/sh
exec kvm -enable-kvm -machine q35 \
-device intel-iommu -m 4g -cpu host -bios /usr/share/ovmf/OVMF.fd \
-drive file=/dev/nvme0n1,format=raw,if=none,id=hd0 -device virtio-blk-pci,drive=hd0 \
-object rng-random,filename=/dev/urandom,id=viornd0 -device virtio-rng-pci,rng=viornd0 \
-device virtio-net-pci,netdev=net0 -netdev user,id=net0,hostfwd=tcp::5555-:22 \
"$@"
CoreBook#