I’m setting up a network bridge so Libvirt/qemu guest VMs can be on the same subnet as my LAN. This is required for the VMs to get to some networked tuners that it can only do on the same subnet. I can do this with the follow script:
#!/bin/bash
sudo nmcli con add ifname br0 type bridge con-name br0
sudo nmcli con add type bridge-slave ifname eno1 master br0
#
sudo nmcli con modify br0 bridge.stp no
#
sudo nmcli con down "Wired connection 1"
sudo nmcli con up br0
I would like to autostart a VM so that when I reboot that VM gets started. This is normally done with:
virsh autostart ‘vm-name’
However, currently if I reboot the PC, the vm is not started. If I change the VM to use the default network “NAT”, then the VM will autostart.
I’m suspecting that there maybe a race condition between when the PC’s bridge gets setup and when virsh wants to start the VM that is marked for autostart.
Any Ideas?