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?
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?
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:
#!/bin/bash
#
# Init file for OpenFlow configuration
#
# chkconfig: 2345 21 78
# description: OpenFlow bridge configuration
#
# source function library
. /etc/rc.d/init.d/functions
VSCTL=/usr/bin/ovs-vsctl
controller_ip=192.168.0.200
start() {
$VSCTL set-controller xenbr0 tcp:$controller_ip:6633
}
stop() {
echo -n $"Action not supported"
failure $"Action not supported"
echo
return 1;
}
restart() {
echo -n $"Action not supported"
failure $"Action not supported"
echo
return 1;
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac