In Virtual Box there is a network type "Internal Network", which is where two or more VMs can communicate with each other only. No network connection to the host or other machines. This is the kind of network I need. Using libvirt I was able to set up an "Isolated Network". According to the libvirt docs "In this mode, guests connected to the virtual switch can communicate with each other, and with the host". This doesn't quite work for me as I need network isolation from the host. Does anyone know how to accomplish this using libvirt? I tried following along with this link and creating a virtual private bridge but couldn't get it to work. https://www.linux-kvm.org/page/Networking
1 Answer
The simplest configuration that should work would be to define the bridge and nothing else.
Based on libvirt network XML format (but removing the IPv6 setup)
<network>
<name>private</name>
<uuid>7a3b7497-1ec7-8aef-6d5c-38dff9109e93</uuid>
<bridge name="virbr2" stp="on" delay="0"/>
<mac address='00:16:3E:5D:C7:9E'/>
</network>
Because this is totally isolated there's no DHCP service available from the host, so each machine on this network will need a static IP address (or you'll need to run a DHCP server on a VM in that network) and you'll only be able to reach the machines via their consoles.