Update rc.libvirt

This commit is contained in:
bergware
2023-08-10 03:45:36 +02:00
parent 0adf1daa26
commit b9c74a8ea4
+1 -1
View File
@@ -172,7 +172,7 @@ start_libvirtd() {
# remove <locked/> from xml because libvirt + virlogd + virlockd has an issue with locked
sed -ri "s/<locked\/>//g" /etc/libvirt/qemu/*.xml &> /dev/null
# update interface section of VM configuration files
if [[ -f /sys/class/net/br0 ]]; then
if [[ -e /sys/class/net/br0 ]]; then
# bridge interface to macvtap interface
sed -ri "s/<interface type='bridge'>/<interface type='direct'>/;s/<source bridge='br([0-9]+(\.[0-9]+)?)'\/>/<source dev='vhost\1' mode='bridge'\/>/" /etc/libvirt/qemu/*.xml &> /dev/null
else