1

System: RHEL 7.5 with gnome

I've googled for days on this topic, and I can't seem to find a decent answer.

When using Virtualbox, there is a one click "Bridge to ENO1" option that allows seamless passthrough for VM networking. It puts the virtual machines on the local network and they can be accessed from the host machine as well as other devices on the network. (192.168.0.XXX)

In virt-manager, the options are NAT networking (accessible from the host machine, but not the local network) or macvtap (Accessible from the local network, but not the host).

Am I missing something here, or is there something special I have to do to add my machines to the local (192.168.0.XXX) network?

Cory Future
  • 13
  • 1
  • 3

1 Answers1

1

No, VirtManager doesn't make this as easy as VirtualBox. What you described is how I setup my workstation at home for VM networking. This is how I do it:

  1. Create a bridge interface
  2. Re-configure the physical (eth0?) interface as a bridge member/slave
  3. Create a libvirt network definition which attaches VMs to the bridge

In RHEL 7 I accomplish those steps like this:

# CREATE A BRIDGE THAT GETS IT'S IP VIA DHCP
# nmcli connection add type bridge \
    connection.id br0 \
    connection.interface-name br0 \
    ipv4.method auto \
    connection.autoconnect no

# MY NIC IS CALLED "enp4s0" -- CHANGE ACCORDINGLY
# nmcli connection add type bridge-slave
   connection.id br0-enp4s0 \
   connection.interface-name enp4s0 \
   connection.autoconnect no \
   master br0

# STARTUP AND TEST THE NEW BRIDGE
# nmcli connection up br0

# IF ALL GOES WELL, MODIFY THE PROFILES TO START ON BOOT/REBOOT
# nmcli connection modify br0 connection.autoconnect yes
# nmcli connection modify <OLD_PROFILE> connection.autoconnect no
# or just delete it 
# nmcli connection delete <OLD_PROFILE>


CREATE A NEW LIBVIRT BRIDGE DEFINITION, LOAD IT, AND SET IT TO AUTO-START

# cat ./bridge-network.xml
<network>
  <name>host-bridge</name>
  <forward mode="bridge"/>
  <bridge name="br0"/>
</network>

# virsh net-define ./bridge-network.xml

# virsh net-autostart host-bridge
John Call
  • 166
  • 6