Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Playing around with xen 4.0.1, trying to setup a simple domU.

When I put the parameter in vif like :

vif = [ 'ip=,mac=00:16:3E:2F:F4:78,bridge=xenbr0,vifname=domu1' ]

It fails

error: Device 0 (vif) could not be connected. 
ip link set vif5.0 name domu1 failed

Also, running the command from dom0:

ip link set vif5.0 name domu1


RTNETLINK answers: Device or resource busy

Any idea ?

share|improve this question

From what I can tell the vifname= command isn't properly supported in many versions of Xen.

My guess is that you can only rename the device before certain usage and the Xen vif scripts are doing it too late.

Looking at the source in

vifname=$(xenstore_read_default "$XENBUS_PATH/vifname" "")
if [ "$vifname" ]
  if [ "$command" == "online" ] && ! ip link show "$vifname" >&/dev/null
    do_or_die ip link set "$vif" name "$vifname"

I don't see any obvious bugs. You should look at your and confirm that it is the same as this.

Edit: I think maybe the vifX.Y interface may not be up at this point. Try commenting out the do_or_die line. That should set vif="$vifname" and if the device is then created later there is no reason to rename it.

share|improve this answer
Yes, the same; it's the 'ip link set vif5.0 name domu1' which fails. Any guess on a 'bug' of ip command ? – Disco Jan 25 '11 at 14:52

Your link vif5.0 is used...

This solution function very well. Every time I suggest you do not use it on a production server ...

*** scripts/   2012-03-28 16:00:50.555630500 +0200
--- scripts/       2012-03-28 15:59:58.775633091 +0200
*** 70,88 ****
--- 70,90 ----
      # Check presence of compulsory args.

      vifname=$(xenstore_read_default "$XENBUS_PATH/vifname" "")
      if [ "$vifname" ]
          if [ "$command" == "online" ] && ! ip link show "$vifname" >&/dev/null
+             ip link set "$dev" down
              do_or_die ip link set "$dev" name "$vifname"
+             ip link set "$vifname" up
  elif [ "$type_if" = tap ]; then
      # Check presence of compulsory args.
      : ${INTERFACE:?}

      # Get xenbus_path from device name.
      # The name is built like that: "tap${domid}.${devid}".
share|improve this answer

Here's one reason why this problem occurs:

ps auxw | grep -v grep | grep NetworkManager && service network-manager stop

xm create ... and good luck!

Solutions 1, 2 or 3:

  1. dpkg - purge network-manager
  2. service network-manager stop
  3. man NetworkManager.conf and search 'unmanaged-devices ...


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.