I have 10 domU's on my CentOS 5.6 server running Xen kernel. All 10 are set to start on system boot; however, for just 1 of the machines, I get this error:
Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
All 10 domU's have three configured network interfaces, all bridged to a physical interface on the host. All three work great - eth's 1, 2, and 3 are bridged to each VM's eth0,eth1, and eth2.
I can start this VM by hand and it starts without issue. I've tried via command line:
xm create /path/to/vm-config.cfg
And also in virt-manager.
What is causing this issue, and how can I get this one VM to start on host bootup just like the other 9 do?
I have this problem after create and destroy vm some time. It is udev problem. As i can understand, udev do not handle new vif devices after DOMID greater than 10. I fix it after adding next strings to udev rules: SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="online", RUN+="$env{script} online" SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="offline", RUN+="$env{script} offline"
Also i am restart udev (may be it is reason why xm create start to work?).
Apparently, this is a problem related to the
network-bridge
script in Xen < 4.1. Those shell scripts seem to be rather unreliable, and the Xen best practices documentation now recommends using the OS's network scripts instead of those. So if you are running Debian, for example, this means configuring the bridges in/etc/network/interfaces
instead of relying on the Xen scripts.An example configuration:
... and so on. You then refer to
br0
in your domU.cfg
file and comment out the(network-script network-bridge)
line in/etc/xen/xend-config.sxp
.