1. Using the same NetBSD installation virtualized and on hardware

These days I don't have old machines around anymore, so to fiddle with new OSs I use virtualization on my linux machine. I did have an old USB3 to SATA-interface, so I bought the cheapest SSD i could get, which is a 128GB one for about 10€. Using the external SSD I can boot my image in qemu as well as boot my whole machine from it, which I find really neat :)

Virtual boot

To boot qemu I run this command:

qemu-system-x86_64 \
-m 3G \
-enable-kvm \
-cpu host \
-usbdevice tablet \
-soundhw all \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid=0x152d,productid=0x0578 \
-netdev user,id=mynet0,net=,dhcpstart= -device virtio-net-pci,netdev=mynet0

which boots the VM with hardware acceleration, passes the USB device for it's disk, and uses userspace networking. The later not needing privileges or network setup on the host makes it really easy. If you want to copy this you'll have to adapt the USB devices vendor and product ids. Using nested kvm I can even run machines in netbsds nvmm.

Picture of the adapter + SSD

hardware boot

Well, just select the USB device to boot from during the machines start. :)

Using a 2,5" SSD has the added advantage that I could just bolt it into my Thinkpad, once I'm satisfied enough with the installation.


you can reply to my post on the fediverse or shoot me a mail

$Id: 1_image_for_vm_and_hardware.gmi,v 1.2 2021/12/12 15:18:27 pickles Exp $