Installing KVM on Debian: Simple and easy – First, install the required packages
apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
Bridge interfaces allow the guest VMs to communicate through the HOST., and connect to the real network. You will first need to allow IP forwarding in the kernel params. Edit /etc/sysctl.conf and uncomment the following configuration
Add the following to /etc/sysctl.conf
net.bridge.bridge-nf-call-arptables = 0 net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0
Configure the bridge interfaces. In my case, I have four servers and all have 4 x 1 G NICs plus 2 x 10G NICs.
On all the servers the first 1G NIC will not be bridged and used for server management. All other 3 1G NICs would be bridged, for use by VMs hosted on the server. All VMs will be configured with a minimum of 1 bridged 1G NIC for management of the VM.
# 1G NIC - Primary / Management interface - No bridging auto eth1 iface eth1 inet static address 10.0.0.8/24 gateway 10.0.0.1 dns-nameservers 10.0.0.1 126.96.36.199 dns-search <<domain>>.net # 3 x 1G NICs - Bridged - VMs on this server auto eth2 iface eth2 inet manual auto br0 iface br0 inet manual bridge_ports eth2 bridge_stp off bridge_waitport 0 bridge_fd 0 auto eth3 iface eth3 inet manual auto br1 iface br1 inet manual bridge_ports eth3 bridge_stp off bridge_waitport 0 bridge_fd 0 auto eth4 iface eth4 inet manual auto br2 iface br2 inet manual bridge_ports eth4 bridge_stp off bridge_waitport 0 bridge_fd 0
On the primary server, two 10G NICs would be bonded as a single interface with an IP on the 10.0.1.0/24 network – primarily for NFS access.
On all other servers, one 10G NIC would be bridged for access to the NFS server, and the other 10G NIC would be bridged and used for configuring a cluster of 3 nodes of MariaDB / ArangoDB (GraphDB).
Note: apt install libguestfs-tools additionally done (virt-spartsify purpose)