mirror of
https://github.com/unraid/webgui.git
synced 2026-01-16 06:30:19 -06:00
Update rc.libvirt
This commit is contained in:
@@ -173,10 +173,10 @@ start_libvirtd() {
|
||||
sed -ri "s/<locked\/>//g" /etc/libvirt/qemu/*.xml &> /dev/null
|
||||
# update interface section of VM configuration files
|
||||
if [[ -e /sys/class/net/br0 ]]; then
|
||||
# bridge interface to macvtap interface
|
||||
# link VM to bridge 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
|
||||
# macvtap interface to bridge interface
|
||||
# link VM to macvtap interface
|
||||
sed -ri "s/<interface type='direct'>/<interface type='bridge'>/;s/<source dev='vhost([0-9]+(\.[0-9]+)?)' mode='bridge'\/>/<source bridge='br\1'\/>/" /etc/libvirt/qemu/*.xml &> /dev/null
|
||||
fi
|
||||
# copy any new conf files we dont currently have
|
||||
|
||||
Reference in New Issue
Block a user