You are not logged in.

#1 2012-03-11 05:47:38

jps
Member
Registered: 2012-03-11
Posts: 3

[SOLVED] Xen "Hotplug scripts not working" Error

I've been at this one for two days and hopefully someone can help out. I am trying to get a Xen vm setup (I would use kvm, but this machine doesn't have the vmx extensions), but it is fighting me.

I am using LVM for my vm filesystem:

  --- Logical volume ---
  LV Path                /dev/XenGroup00/lvol-jps-server
  LV Name                lvol-jps-server
  VG Name                XenGroup00
  LV UUID                gfgYTq-WvIb-OANl-EZwm-zzc0-vfmL-aN3oAn
  LV Write Access        read/write
  LV Creation host, time jps, 2012-03-09 11:35:54 -0600
  LV Status              available
  LV Size                8.00 GiB
  Current LE             2048
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto

My DomU config looks like this:

#  -*- mode: python; -*-
kernel = "/boot/vmlinuz-linux"
ramdisk = "/boot/initramfs-linux.img"
memory = 2048
name = "jps-server"
vif = [ 'mac=00:16:3e:60:36:ba' ]
disk = [ 'phy:/dev/XenGroup00/lvol-jps-server,xvda,w' ]
dhcp="dhcp"
hostname = "jps.server"
root = "/dev/xvda ro"
extra = "console=hvc0"

When I run

 xm create -c dom01 

I get the following error:

Error: Device 51712 (vbd) could not be connected. Hotplug scripts not working.

The xend.log outputs:

[2012-03-10 23:05:10 790] DEBUG (XendDomainInfo:1881) XendDomainInfo.handleShutdownWatch
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices vif.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices vkbd.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices ioports.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices tap.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices vif2.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices console.
[2012-03-10 23:05:10 790] DEBUG (DevController:144) Waiting for 0.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices vscsi.
[2012-03-10 23:05:10 790] DEBUG (DevController:139) Waiting for devices vbd.
[2012-03-10 23:05:10 790] DEBUG (DevController:144) Waiting for 51712.
[2012-03-10 23:05:10 790] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/51712/hotplug-status.

and hangs there before giving me the error and then breaking down the vm.

I can use

 xl create /etc/xen/dom01 -c 

and it gives me this output:

Parsing config file /etc/xen/dom01
Unable to attach console
Daemon running with PID 921

Trying to get a console with `xl` errors:

# xl console jps-server
Unable to attach console

BUT, using `xm console` drops me into a recovery shell with this output:

[    0.141322] i8042: No controller found
[    0.183642] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
:: Starting udevd...
done.
:: Running Hook [udev]
:: Triggering uevents...done.
Waiting 10 seconds for device /dev/xvda ...
ERROR: Unable to find root device '/dev/xvda'.
You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
sh: can't access tty; job control turned off

This leads me to believe there may be something incorrect about my disk setup, but after consulting many howtos that detail a xen LVM setup, I believe my setup is correct.
Here are the modules loaded on my Dom0:

# lsmod | grep xen*
xen_netback            21731  0 
xen_blkback            17039  0 
xen_evtchn              4958  1 
xen_netfront           17418  0 
xenfs                  10118  1 
xen_blkfront           13405  0 
xenbus_probe_frontend     4138  2 xen_blkfront,xen_netfront

I have combed through the wiki and nearly every google/stackoverflow/arch bbs result I can find. Any and all leads will be appreciated. The "Hotplug scripts not working" error is generally associated with a missing driver, but I believe all required drivers are loaded.

Another possibility has something to do with udev, but the post I read (sorry, can't seem to find it now) was from 2010, so I assume any udev related issues would have been worked out in 2+ years.

Sorry for the long post, but I wanted to make sure I didn't leave anything out that may lead to a successful bugfix. I'm really banging my head on this one.

Last edited by jps (2012-03-12 03:51:26)

Offline

#2 2012-03-11 16:17:42

citral
Member
Registered: 2005-05-07
Posts: 87

Re: [SOLVED] Xen "Hotplug scripts not working" Error

Hi,

I also had hotplug related problem with Xen on Arch.

You should verify that there are two Xen scripts in /etc/udev/rules.d as opposed to a script in /etc/hotplug.

When compiling Xen from source, a check is done for udev, and if it fails, it is assumed that hotplug is used instead. On Arch this check can fail even though udev is installed.

If there are no Xen scripts in /etc/udev/rules.d, you can copy these manually from the Xen source directory from tools/hotplug/Linux/*.rules. Alternatively, you can symlink /usr/bin/udevadm /sbin/udevadm, and then create a script `udevinfo' which does

exec udevadm info $@

If you then recompile, Xen should correctly detect udev and install the scripts in the udev folder and not in the hotplug folder.

Hope that helps.


One of the main causes of the fall of the Roman Empire was that, lacking zero,
they had no way to indicate successful termination of their C programs.

Offline

#3 2012-03-12 00:37:01

jps
Member
Registered: 2012-03-11
Posts: 3

Re: [SOLVED] Xen "Hotplug scripts not working" Error

Thanks for the reply citral.

That seemed to fix the issue with not being able to connect to the DomU via console!

But, after the console is connected, I only get these errors:

[    0.141318] i8042: No controller found
[    0.183647] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
:: Starting udevd...
done.
:: Running Hook [udev]
:: Triggering uevents...done.
Waiting 10 seconds for device /dev/xvda ...
ERROR: Unable to find root device '/dev/xvda'.
You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
sh: can't access tty; job control turned off

I am using LVM volumes to back my xen VMs, do you have any ideas on why xen would be failing to mount? Possibly something w/ ext4?

Offline

#4 2012-03-12 03:49:54

jps
Member
Registered: 2012-03-11
Posts: 3

Re: [SOLVED] Xen "Hotplug scripts not working" Error

I managed to get this one figured out:

The Arch Wiki on Xen is borderline unreadable - and switches from talking about DomU and Dom0 without regard to what the section title is (e.g. The section titled "On Arch guest (DomU)" talks about commands that need to be run on the Dom0).

I fixed my issue by adding:

xen-blkfront xen-fbfront xenfs xen-netfront xen-kbdfront

to MODULES in mkinitcpio.conf and rebuilding my initramfs on the Dom0.

I have been keeping track of what I needed to do to get a working system and I am now doing my instructions again with only what I had written down, in hopes of writing an article / wiki entry to help others out.

Last edited by jps (2012-03-12 14:48:27)

Offline

Board footer

Powered by FluxBB