rossbcan
(Rossbcan)
December 5, 2022, 10:08pm
1
Hi;
I have haos_generic-aarch64-9.3.qcow2 on ubuntu-aarch64 running under virt-manager. It works well, but requires desktop, xorg bloat. Now, I want to run headless for a leaner system.
system (host) services: postgresql, mosquitto
I used new generic-aarch64
as a starting point: Building HAOS for qemuarm-64 · Issue #1549 · home-assistant/operating-system · GitHub
I can run the VM with this command:
qemu-system-aarch64 -vga std -machine virt-6.2,gic-version=2 -m 2048 -cpu max -smp 4 -accel kvm -cpu host \
-netdev user,id=vnet,net=192.168.76.0/24,dhcpstart=192.168.76.9,hostfwd=tcp::8123-:8123,hostfwd=tcp::22222-:22222 \
-device virtio-net-pci,netdev=vnet -drive file=haos_generic-aarch64-9.3.qcow2,format=qcow2,if=none,id=drive0,cache=writeback \
-device virtio-blk,drive=drive0,bootindex=0 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash \
-device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,vendorid=0x10c4,productid=0x8a2a
I want to (and have been very unsuccessful) to change:
networking to use existing host bridge “br0”, maintaining forwarded ports
any other suggestions regarding qemu-system-aarch64 parameters
Also; is “tcp::22222” a typo in original link, should be 2222? Cannot ssh in at port 22222
Thanks;
Bill
rossbcan
(Rossbcan)
December 6, 2022, 3:39pm
2
OK; got this working:
qemu-system-aarch64 -nographic -machine virt,gic-version=max -m 2048 -cpu max -smp 4 -accel kvm -cpu host \
-drive file=haos_generic-aarch64-9.3.qcow2,format=qcow2,if=none,id=drive0,cache=writeback \
-device virtio-blk,drive=drive0,bootindex=0 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash \
-device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,vendorid=0x10c4,productid=0x8a2a \
-netdev user,id=vnet,hostfwd=tcp::8123-:8123 -device virtio-net-pci,netdev=vnet \
-netdev bridge,id=hn0,br=br0 -device virtio-net-pci,netdev=hn0,id=nic1
the vendorid, productid correspond to my host HUSB-1 zigbee, zwave interface. Change if using a different interface.
JoergP
January 24, 2024, 2:57pm
3
I have tried this command with some adjustments for my debian based host system, as follows:
qemu-system-x86_64 -nographic -m 2048 -cpu max -smp 4 -cpu host -drive file=haos_ova-11.4.qcow2,format=qcow2,if=none,id=drive0,cache=writeback -device virtio-blk,drive=drive0,bootindex=0 -device qemu-xhci,id=xhci -netdev user,id=vnet,hostfwd=tcp::8123-:8123 -device virtio-net-pci,netdev=vnet -netdev bridge,id=hn0,br=br0 -device virtio-net-pci,netdev=hn0,id=nic1
and get this message:
failed to parse default acl file `/etc/qemu/bridge.conf'
qemu-system-x86_64: -netdev bridge,id=hn0,br=br0: bridge helper failed
Could you please enlighten me with the content of `/etc/qemu/bridge.conf’ in your environment?
EDIT: I’m trying to set this up in user space.
rossbcan
(Rossbcan)
January 24, 2024, 3:17pm
4
root@TX9Pro:/home/data/vmachines/hassos# cat /etc/qemu/bridge.conf
allow br0
where br0 is name of your bridge