To configure a KVM guest to use a shared physical network device (i.e. bridge) with the host on a Linux system, you can follow these steps:
bridge-utils
package to create and configure the bridge, and the libvirt-bin
package to manage virtual machines with libvirt. You can install these packages by running the following command:sudo apt-get install bridge-utils libvirt-bin
brctl
utility. For example, to create a bridge interface called br0
that uses the physical Ethernet interface eth0
, you can run the following command:sudo brctl addbr br0 sudo brctl addif br0 eth0
ip
command. For example, to set the IP address to 192.168.1.1
and the netmask to 255.255.255.0
, you can run the following commands:sudo ip addr add 192.168.1.1/24 dev br0 sudo ip link set br0 up