KVM is a linux system or tool that is used to host VPS (Virtual Private Servers), its a very light tool, fast and reliable in terms of stability.

I have been using this tool on my servers and client computer, but recently Ubuntu 18.04 changed the way to manage network setup

Rather than configuring the file

/etc/network/interfaces

where you put all the configurations for static, dhcp and bridging of networks. They came up with a new configuration where the NIC (Network Interface Card) settings are configured on

/etc/netplan/01-network-manager-all.yaml

 

So i tried to configure static ip on this file, but with a very hard struggling to success

network:
  version: 2
  ethernets:
    enp2s0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.30/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [192.168.0.1, 192.168.0.2]

the above configurations worked fine, but if you try to add settings for bridged network, it fails.

I removed all the setings on the /etc/netplan/01-network-manager-all.yaml and left it with its default configurations as below

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer:  NetworkManager

After all, i went back to edit the old configuation file vim /etc/network/interfaces and added the below settings, which led to a success of installing VPS and enablled me to route packets from both the host computer and the vps, ping each other without no any problem

Default configurations

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Added configurations

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback


auto br1
iface br1 inet dhcp
        bridge_ports enp2s0

This lead to the client and host to aquire ip address automatically and get connected to the internet without no any problem, Before this configurations i was getting the below error when i try to bridge the client with the host network on the libvirt-manager

After successfull bridging i dint get the error anymore

Thanks for visiting our site and use our tutorials, if it was of any help please drop us a comment for others to have a try with more confident.

Good day