OpenBSD on QEMU-aarch64
OpenBSD Apple ARM64 systems
Startup Script
qemu-system-aarch64 \ -M virt \ -accel hvf \ -m 2048 \ -cpu cortex-a57 \ -bios /opt/homebrew/Cellar/qemu/10.0.2_2/share/qemu/edk2-aarch64-code.fd \ -drive file=miniroot78.img,format=raw,if=virtio \ -drive file=openbsd.qcow2,format=qcow2,if=virtio \ -nic vmnet-bridged,ifname=en0 \ -nographic \ -serial tcp::4444,server,telnet "$@"
Networking
Supported options are shown by
-help
% qemu-system-aarch64 -help | grep vmnet
-netdev vmnet-host,id=str[,isolated=on|off][,net-uuid=uuid]
configure a vmnet network backend in host mode with ID 'str',
vmnet-host interfaces within this isolated network
-netdev vmnet-shared,id=str[,isolated=on|off][,nat66-prefix=addr]
configure a vmnet network backend in shared mode with ID 'str',
-netdev vmnet-bridged,id=str,ifname=name[,isolated=on|off]
configure a vmnet network backend in bridged mode with ID 'str',
-nic [tap|bridge|user|vde|vhost-user|vmnet-host|vmnet-shared|vmnet-bridged|socket][,option][,...][mac=macaddr]
-net [user|tap|bridge|vde|vmnet-host|vmnet-shared|vmnet-bridged|socket][,option][,option][,...]
vmnet-shared
will provide an address on a private subnet.
vmnet-bridge
allows a virtual machine to get an address
on the local area network, but must be run as root.
ifconfig
on my M1 Mac
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=3<RXCSUM,TXCSUM>
ether 4e:20:b8:1e:da:64
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en0 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
member: vmenet0 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 21 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active