Configure bridged networking for KVM on Ubuntu 16.04 / Ubuntu 14.10
Bridged networking or network is a dedicated network card to a virtual machine which provides communication path to outside network, this must be setup before creating a virtual machine using Virtual Manager.
Edit interface file to create bridge “br1“, this should be executed on KVM host. My machine has two network cards eth0 and eth1, so I have created a bridge using both network card.
sudo nano /etc/network/interfaces ##Bridge Name ### auto br1 ### Bridge Information iface br1 inet static bridge_ports eth1 eth0 bridge_stp on bridge_fd 0.0 ### Bride IP ### address 192.168.12.7 netmask 255.255.255.0 network 192.168.12.0 broadcast 192.168.12.255 gateway 192.168.12.1 dns-nameservers 184.108.40.206
Bring up the bridge.
sudo ifup br1
Make sure you have graphical mode installed, click on the dash and search for Virtual Machine Manager.
Edit –> Connection details –> Click on Plus sign.
Choose bridge as an interface type and then click on forward.
Set a Name, start mode as on boot and choose to activate now.
You can configure ip address by clicking on Configure right to IP settings. Once IP is configured, click OK.
Clik on finish, Virtual Machine Manager will create a bridge called “br1”.
Verify ip address by using the following command.