Finally, I managed to solve the problem. The problem was rather strange -
after configuring bridges I added new ifaces to the VM. For some
reason, during boot process of the VM's, wrong interface was started (VM
tried to bring up eth2 instead eth1?).
After adding the new
ifaces through virt-manager, the VM started regulary and created a new
network script for eth2 (/etc/sysconfig/network-scripts/ifcfg-eth2). I
think that the problem was this - when the VM is restarted it tried to
bring up eth2 while vif-script tried to propagate second bridge via eth1
iface. I resolved this simply by replacing ifcfg-eth2 script with
ifcfg-eth1. Now, VM starts/restarts regulary ;)
So, the process for creating and configuring new bridges that I follow is (tried on multiple servers):
- create new script that sets up multiple bridges in /etc/xen/scripts/
example: network-xen-multi-bridge
#!/bin/sh
# network-xen-multi-bridge
# Exit if anything goes wrong.
set -e
# First arg is the operation.
OP=$1
shift
script=/etc/xen/scripts/network-bridge.xen
case ${OP} in
start)
$script start vifnum=3 bridge=xenbr3 netdev=eth3
$script start vifnum=0 bridge=xenbr0 netdev=eth0
;;
stop)
$script stop vifnum=3 bridge=xenbr3 netdev=eth3
$script stop vifnum=0 bridge=xenbr0 netdev=eth0
;;
status)
$script status vifnum=3 bridge=xenbr3 netdev=eth3
$script status vifnum=0 bridge=xenbr0 netdev=eth0
;;
*)
echo 'Unknown command: ' ${OP}
echo 'Valid commands are: start, stop, status'
exit 1
esac
# It is possible to use the network-bridge script in more complicated
# scenarios, such as having two outgoing interfaces, with two bridges, and
# two fake interfaces per guest domain. To do things like this, write
# yourself a wrapper script, and call network-bridge from it, as appropriate.
#
#(network-script network-bridge)
(network-script network-xen-multi-bridge)