Fixed host only network creation

This commit is contained in:
2025-09-04 12:35:36 +02:00
parent 9748468415
commit b4afbc05d0
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<network>
<name>YOURNAME</name>
<bridge name='YOURNAME' stp='on' delay='0'/>
<name>YOURNETWORK</name>
<bridge name='YOURNETWORK' stp='on' delay='0'/>
<!-- <domain name='hostonly.local'/> -->
</network>

View File

@ -31,7 +31,7 @@ sudo systemctl start libvirtd
mkdir -p "${VM_BASE_DIR}"/{images,xml,init,base,ssh}
#Isolated network
cp files/network-host-only.xml ${VM_BASE_DIR}/xml/network-host-only.xml
sed -i "s/YOURNETWORK/${VM_NETWORK_NAT}/g" ${VM_BASE_DIR}/xml/network-host-only.xml
sed -i "s/YOURNETWORK/${VM_NETWORK_HOSTONLY}/g" ${VM_BASE_DIR}/xml/network-host-only.xml
virsh net-define ${VM_BASE_DIR}/xml/network-host-only.xml
virsh net-autostart ${VM_NETWORK_HOSTONLY}
virsh net-start ${VM_NETWORK_HOSTONLY}