XEN: Changing the network bridge for DomU's
This document (7000175) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Resolution
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
- Navigate to /etc/xen/vm in a console
- Locate the name of the configuration file for the DomU
- Backup the configuration file in case a mistake is made
- Open the file for editing
- Locate the line reading "vif", it may look like the following:
vif=[ 'mac=00:16:3e:5f:e7:f2', ]
- 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', ]
- Save and close the file
- 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
- Follow method 1, until you are satified that the changes work as desired
- Import the configuration file into the management database.
xm new -f SLES10
- 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
- Export the configuration from the management database
xm list -l SLES10 > SLES10.py
- Backup SLES10.py, in case it is needed again.
- Open the file for editing
- 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)))
- 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))) - Save and close the file
- Reimport the configuration into the management database
xm new -F SLES10.py
- Test the DomU
- 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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com