Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i need to create a bridge with public ip for assigning public ip to VM. But how can i create a Network bridge,as there is a default "xenbr0" bridge exists.

Editing Xenbr0 is not permanent,how can i make it persistent against service restarts?

share|improve this question
Are you using Citrix XenServer, XCP, or something you built yourself? – Nick Bastin Aug 6 '12 at 10:47
XCP Xen Cloud platform – Kevin Parker Aug 6 '12 at 12:58
up vote 1 down vote accepted

So, in XCP (and XenServer), bridges are made for each one of your physical NICs (pnic). These start at xenbr0 for the first NIC and are numbered upwards from there. In the current version of XCP modifications to OVS bridges are not persisted across restarts - you will have to make your own init script to apply your modifications that is run on each restart.

This can be very simple - you just need to implement start() - stop() and restart() can just report that they are unsupported, and then use chkconfig --add my_init_script to get it integrated into the boot process. I've pasted an example init script below (which sets an openflow controller, which is probably not what you want, but you can simply replace the start() method with the commands you need:

# Init file for OpenFlow configuration
# chkconfig: 2345 21 78
# description: OpenFlow bridge configuration

# source function library
. /etc/rc.d/init.d/functions



start() {
  $VSCTL set-controller xenbr0 tcp:$controller_ip:6633

stop() {
        echo -n $"Action not supported"
        failure $"Action not supported"
        return 1;

restart() {
        echo -n $"Action not supported"
        failure $"Action not supported"
        return 1;

case "$1" in
        echo $"Usage: $0 {start|stop|restart}"
        exit 1
share|improve this answer
I need to create virtual bridge with out connecting to the actual interface.Using this bridge i wish to create an internal ip for every VM. – Kevin Parker Aug 7 '12 at 4:33
@KevinParker: That is done in XenCenter (or XAPI) by creating a server-only private Network, and then attaching each VM to it. – Nick Bastin Aug 7 '12 at 13:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.