i need help about one issue that i cannot understand. I have some virtual machines that runs on an embedded device, i create dynamically one vm and after i start this one for load some parameters inside that. The network take an ip from dhcp server without problem, you can see the qemu command that i use:
qemu-system-aarch64 \
-cpu host \
-machine type=virt \
-enable-kvm \
-nographic \
-smp 1 \
-m 64 \
-serial stdio \
-monitor telnet:127.0.0.1:4448,server,nowait \
-kernel ./Image \
-append 'console=ttyAMA0 earlyprintk=pl011,0x1c090000 loglevel=9 root=/dev/vda rw rootwait' \
-drive file=./rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 \
-netdev tap,id=eth0,script=no,ifname=tap0 \
-device virtio-net-pci,netdev=eth0,mac=00:16:35:AF:94:00
Before to start the vm i create one tap interface connected to a bridge, where the phisical interface eth0 is also connected to bridge. Everything is working with qemu, but i need to use libvirt to manage the vms and i don't understand how can i use my tap interface with libvirt. I try to use the default bridge which is generated from virtual manager, it's working but libvirt generate a random mac address for the internal interface of vm. And I need to set manually the mac address like qemu command.