linux-jxf2:/home/haha # /etc/xen/scripts/network-bridge status
============================================================
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 20:6a:8a:7e:62:81 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 20:6a:8a:7e:62:81 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
bridge name bridge id STP enabled interfaces
eth0 can't get info Operation not supported
default via 192.168.1.1 dev eth0
169.254.0.0/16 dev eth0 scope link
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.4
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.6
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
============================================================
linux-jxf2:/home/haha # /etc/xen/scripts/network-bridge start
eth0 device: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe (rev 10)
/etc/xen/scripts/xen-network-common.sh: line 90: : -ne: unary operator expected
Waiting for peth0 to negotiate link...........(link isnt in running state)
eth0 name: Broadcom Ethernet controller
eth0 Warning: Bridge eth0 already exists!
eth0 Ports: <peth0>
eth0 forwarddelay (see man ifcfg-bridge) not ready. Proceeding in background.
Starting DHCP4 client on eth0. . . . . . . .
eth0 DHCP4 continues in background
linux-jxf2:/home/haha # /etc/xen/scripts/network-bridge status
============================================================
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT qlen 1000
link/ether c0:18:85:08:95:99 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.6/24 brd 192.168.1.255 scope global eth1
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT qlen 1000
link/ether c0:18:85:08:95:99 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.6/24 brd 192.168.1.255 scope global eth1
bridge name bridge id STP enabled interfaces
eth1 can't get info Invalid argument
default via 192.168.1.1 dev eth1
169.254.0.0/16 dev eth0 scope link
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.6
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.4
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
============================================================
Virt-manager shows error
linux-jxf2:/home/haha # virt-manager
(virt-manager:10066): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
So every time I need to start Virtual Machine Manager in Yast, and before that I need to execute /etc/xen/scripts/network-bridge. Or it would be wrong as follows.
Error starting domain: POST operation failed: xend_post: error from xen daemon: (xend.err 'Device 0 (vif) could not be connected. Hotplug scripts not working.')
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1098, in startup
self._backend.create()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 554, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err 'Device 0 (vif) could not be connected. Hotplug scripts not working.')
And one more question, how did xen choose the interface to be used as bridge ? It’s confusing since network-bridge choose different in sometimes. For example, if I use the wireless card eth1 to surf the Internet in dom0, the network-bridge command will use eth1 as the bridge while I use the wired card eth0 to connect the Internet, it will choose the eth0. So it’s it the mechanism of xen to choose the connected interface as the bridge automatically?
Besides, if I want to run network-bridge command correctly, I need to stop NetworkManager. I don’t know why since I need NetworkManager to get my wifi connected. It’s very controversal.