KVM host / VM's simple way to create a Bridged network (Host Guest communication)


jimbo45

Well-known member
Pro User
VIP
Local time
1:11 PM
Posts
4,034
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks

This won''t (AFAIK) work for wireless networks but if you have a LAN connector or even a USB_>LAN then this is really simple to create a bridged network giving your guest and host two way communication as well as with other machines on the LAN. It's a lot easier than the other way I used in the past via MACTAP devices and a "dummy" isolated network.

Bog standard default NAT won't allow Host / Guest communication.

This is a much better way : (I assume you've already got KVM installed and can create VM's without a problem and have installed the bridge-utils package on your system).

So create a bridge br0 as follows :

simply : sudo nano /etc/network/interfaces and add the following lines


## DHCP ip config file for br0 ##
auto br0

# Bridge setup
iface br0 inet dhcp
bridge_ports <your active physical lan connection) -you can use ip -c a to get the details/

Screenshot_20230811_134909.png



in my case :you can see that br0 is up and has an address of 192.168.1.52 as well as the physical LAN device.

simply using file explorer on the guest I now have access to the host (refur) without any problems. (works the other way round too).


Screenshot_20230811_131948.png

in the VM's config :

Screenshot_20230811_135533.png


added -- from HOST to VM

Screenshot_20230811_153213.png


"Seemples"

cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Back
Top Bottom