SUSE Support

Here When You Need Us

XEN: Changing the network bridge for DomU's

This document (7000175) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10 Service Pack 1

Situation

An existing Xen DomU needs to change the network bridge it is attached to.

Resolution

There are three methods to change the network bridge. Please select the method that is appropriate for your configuration.

method 1: for unamanged domains
This method is used for unmanaged domains; that is, DomU's that have not been managed by "virt-manager", "xm" commands or "YaST" to make hardware configuration changes
Replace SLES10 with the name of your DomU
  1. Navigate to /etc/xen/vm in a console
  2. Locate the name of the configuration file for the DomU
  3. Backup the configuration file in case a mistake is made
  4. Open the file for editing
  5. Locate the line reading "vif", it may look like the following:
    vif=[ 'mac=00:16:3e:5f:e7:f2', ]
  6. Add "bridge=BRIDGE_NAME" to the line. For example, to have the virtual interface attached to "xenbr2":
    vif=[ 'mac=00:16:3e:5f:e7:f2,bridge=xenbr2', ]
  7. Save and close the file
  8. Test the configuration file
    xm create -c SLES10

method 2: managed domains configured through legacy files
This method uses method 2, but imports the configuration file. This method is acceptable as long as configuration changes for the virtual hardware have only been done through the configuration files and is recommended for most use cases.
Replace SLES10 with the name of your DomU
  1. Follow method 1, until you are satified that the changes work as desired
  2. Import the configuration file into the management database.
    xm new -f SLES10
  3. Start your DomU as normal

method 3: use managed configuration
This method is more advanced and is only useful in situtations where the virtual hardware has been modified through "xm" commands, "virt-manager" or YaST.
Replace SLES10 with the name of your DomU
  1. Export the configuration from the management database
    xm list -l SLES10 > SLES10.py
  2. Backup SLES10.py, in case it is needed again.
  3. Open the file for editing
  4. Locate the following (or something similar)
    (device
    (vif
    (uuid fae123bf-d267-c396-a2b5-b3488b82d5e7)
    (script vif-bridge)
    (mac 00:16:3e:1a:e5:1d)
    (model rtl8139)
    (type ioemu)
    (backend 0)
    )
    )
  5. Add (bridge BRIDGE_NAME) after the (vif declaration. For example:
    (device
    (vif
    (uuid fae123bf-d267-c396-a2b5-b3488b82d5e7)
    (script vif-bridge)
    (bridge br1)
    (mac 00:16:3e:1a:e5:1d)
    (model rtl8139)
    (type ioemu)
    (backend 0)
    )
    )
  6. Save and close the file
  7. Reimport the configuration into the management database
    xm new -F SLES10.py
  8. Test the DomU
  9. Repeat steps 3 through 7 until satisfied that the configuration changes worked

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7000175
  • Creation Date: 22-Apr-2008
  • Modified Date:14-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.