qemu Qemu VM bridge network

I am running FreeBSD 14.1:

joseccz@tigerbsd:~ $ cat /etc/os-release
NAME=FreeBSD
VERSION="14.1-RELEASE-p6"
VERSION_ID="14.1"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 14.1-RELEASE-p6"
CPE_NAME="cpe:/o:freebsd:freebsd:14.1"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"
joseccz@tigerbsd:~ $

My Computer has a wireless network wlan0 and for my Qemu Ubuntu server VM I created the next tap0 and bridge0

root@tigerbsd:/home/joseccz # sysctl net.link.tap.up_on_open=1
net.link.tap.up_on_open: 0 -> 1
root@tigerbsd:/home/joseccz # ifconfig bridge0 create
root@tigerbsd:/home/joseccz # ifconfig bridge0 addm wlan0 addm tap0
root@tigerbsd:/home/joseccz # ifconfig bridge0 up
root@tigerbsd:/home/joseccz # ifconfig

I also added ip address to the bridge:

root@tigerbsd:/home/joseccz/qemu_vms/ubuntu_server # ifconfig bridge0 inet 192.168.0.41/24

Yet, when I run:

qemu-system-x86_64 \
-m 16384 \
-netdev tap,id=nd0,ifname=tap0,script=no -device virtio-net,netdev=nd0 \
-drive file=ubuserver.qcow2,media=disk,if=virtio

my VM starts but I get no network. Any suggestions?
 
Back
Top