Tuesday, March 10, 2009

Xen: Error: Device creation failed for domain

On CentOS 5.2 I had few paravirtualized domU's running. Everything went fine, but one day my Xen could not start any domU. The errors were:xm create /etc/xen/testPV
Using config file "/etc/xen/testPV ".
Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
The above error was shown about 1-2 min after xm create command was issued. However, when I hit Ctrl+c during this time I got xm create /etc/xen/testPV
Using config file "/etc/xen/testPV".
Error: Device creation failed for domain testPV
I found that these erros were caused by the fact that udevd was not workig. To check if it is working I usedps aux | grep udevdudevd is (from man)
udevd allows the serialization of hotplug(8) events. The events generated by the kernel may arrive in random order in userspace, that makes it necessary to reorder them. udevd takes care of the kernel supplied sequence number and arranges the events for execution in the correct order. Missing sequences delay the execution of the following events until a timeout is reached.
So I started it as a root using:udevd --daemonOnce it was working I could start my domU's with xm create command. So it appears that in my case udevd was not working. Most likely I killed it by accident.

2 comments:

  1. Anonymous6:45 AM

    Thank you for this post! We were having the exact same problems and were searching for hours.

    Your description of the problem and solution really saved us some trouble, because our system administrator was on holiday and we had to get some VMs running again ;)

    ReplyDelete