How to create and configure private virtual networks
In this step-by-step guide you’ll create three types of virtual networks managed by libvirt and learn simple ways to verify them:
NAT (Network Address Translation) Isolated Very isolated (L2 only) We’ll use virsh and XML definitions (you can do the same with virt-manager, but we’ll focus on the CLI). After each creation, there’s a quick check to confirm everything looks good.
Before you start: quick requirements Packages: libvirt-daemon and libvirt-daemon-system (or your distro equivalents). Optional: virt-manager. Run commands as root or with sudo. Service: systemctl status libvirtd should be active. See current networks: virsh net-list --all Persistent config paths: /etc/libvirt/qemu/networks/ Tip: avoid subnet conflicts; choose ranges that don’t collide with your physical LAN or other libvirt networks.