KVM Bridge Network Interface Setup

I am running a RHEL 7.4 Server that hosts a number of RHEL servers on KVM.  I wanted these virtual machines to be on the same network as all my other devices in the home, so setting up a KVM bridge network interface on my hyper-visor host was needed.  I already had KVM installed and the virtual machines running, so I just needed to make some adjustment to the network interfaces.

Network setup

From the command line, change directory to

You will want to edit the configuration file of your current interface.

Mine is ifcfg-enp2s0f0, so issue the command

then delete the unneeded lines leaving only what is in the after section.

Before

After

We then need to create the configuration file for our virbr0 interface.

 

Adjusting the VM side

Remove the default virtual network within KVM

Remove the default virtual network within KVM

After this is done, we can do some cleanup on the KVM side of things.  Run the command virt-manager, then from the menu choose, EDIT / CONNECTION DETAILS.  You will then go to virtual networks, and delete the default network.  You can verify your virtual bridge is in place under Network Interfaces.

If you have already built VMs as I have, you’ll need to change the network device on the VM.  Change the Network source to be Bridge virbr0: Host device enp2s0f0.

This should get you up and running.  You can then  either have your RHEL servers obtain IPs via DHCP from your main network, or set them up with static IPs.  My two VM’s were setup statically and given the IPs of 192.168.1.41, and 192.168.1.42.  I then added this information into the DNS server on the main RHEL IDM server.

If you run into any problems or have any questions, feel free to reach out and I’ll do what I can to help out.

Cheers,

Ivan Windon

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.