Bridged Network


- Public IP address required for each machine (including VMs)
- Offers the best performance
- The libvirt server must be connected to the LAN via Ethernet. If it is connected wirelessly, a Routed network or NAT-based network are the only options.


Defaults
name: virbr0
ip: 192.168.122.1/24
/etc/libvirt/qemu/networks/default.xml

# Show ip info
ifconfig virbr0
ip add s virbr0

• Virtual network switches can operate in 3 modes
◇ NAT mode (default)
◇ Routed mode
◇ Isolated mode

• The NAT is set up using iptables rules
• Libvirt uses dnsmasq as DNS & DHCP server using DHCP range 192.168.122.2 - 192.168.122.254


Location of XML files on the host


• XML definition files of presistent virtual networks are stored in the /etc/libvirt/<hypervisor>/networks/ directory (hypervisor = qemu)
• In addition, if the network is marked as autostart, the symbolic link to its XML file is created under the autostart/ subdirectory.

virsh edit <name-of-vm>

# Identify host's CPU model as well as compatible models
virsh domcapabilities

Index