Is it possible to create a bridge with virt-manager?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • virt-manager

Issue

  • The functionality appears to be there for virt-manager to create a bridge device on the fly using the GUI. Is this possible?

Resolution

  • Creating a bridge using the virt-manager GUI tool works as expected. It creates regular interface configuration files which behave just like manually created ones:
  1. Launch Applications -> System Tools -> Virtual Machine Manager
    If prompted, enter root credentials
  2. Select the local KVM instance (probably named 'localhost (QEMU)'
  3. Select Edit -> Connection Details
    The 'Connection Details' dialog should appear
  4. Select the 'Network Interfaces' tab
  5. Click the 'plus' + button
    The 'Configure network interface' dialog should appear
  6. Set 'Interface Type' to 'Bridge'
  7. Click the Forward button
  8. Set the following values:
    Name:
    Start mode: onboot
    Activate now: Checked
    IP settings: Click the Configure button and set IP addressing as needed
    Bridge settings: Click the Configure button and set STP settings as needed
  9. Select the interface(s) you would like to be a member of the bridge
  10. Click the Finish button

Diagnostic Steps

  • To verify the configuration, use the brctl tool:
# brctl show
  • The new bridge should be listed with the interfaces configured in step 10 of the Resolution listed as members.
  • Verify the configuration in the interface configuration files for the bridge and the member interfaces:
$ cat /etc/sysconfig/network-scripts/ifcfg-<bridge name>
$ cat /etc/sysconfig/network-scripts/ifcfg-<interface name>
  • The bridge interface configuration file should have the TYPE=bridge and the ONBOOT=yes parameter values set. The interface configuration file should have the BRIDGE= parameter value set.
  • Assuming the 'Start mode' was set to 'onboot' in step 9 of the Resolution, the bridge device will be brought online when the system boots.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments