8

Problem using blktap with xen-4.1 running Ubuntu Precise stock kernel with dom0 xen-4.1.

I get:

[    5.580106] XENBUS: Waiting for devices to initialise: 295s...290s.
...
[  300.580288] XENBUS: Timeout connecting to device: device/vbd/51713 (local state 3, remote state 1)

And some syslog lines:

May 17 13:07:30 localhost logger: /etc/xen/scripts/blktap: add XENBUS_PATH=backend/tap/10/51713
May 17 13:07:31 localhost logger: /etc/xen/scripts/blktap: Writing backend/tap/10/51713/hotplug-status connected to xenstore.

with tap:aio: disk lines. file:/ works.

disk = [
    'tap:aio:/data/root.img,xvda1,w',
]

Problem exists with lucid and precises domU kernels and both guests work in Ubuntu hardy dom0 Host 64bit 2.6.24-28-xen xen-3.3

 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description:    Ubuntu 12.04 LTS
Release:        12.04
Codename:       precise

1 Answer 1

7

As with all things problematic. Asking for help usually solves it. Even when no-one answers the question.

So the answers two fold. Apparently installing xen* stuff is not enough in Ubuntu. Blktap and stuff is separately packages and tapdisk userspace programs and blktap module is needed.

Install blktap-utils and dependencies... You'll get tapdisk and with dkms package the kernel module blktap.

That was not enough. Apparently Blktap got changed to blktap2 at some point between Ubuntu Hardy and Precise XEN versions (xen-3.3 -> xen-4.1). So the disks are included with 'tap2:tapdisk:aio:' not 'tap:aio:'

# Use this to convert existing files
perl -i.backup -pe 's/tap:aio:/tap2:tapdisk:aio:/g' *.cfg

See Xen blktap2 for tap2 disk options.


If you're still having problems with blktap, these next commands might help to diagnose what is missing.

ls /lib/modules/$(uname -r)/updates/dkms/blktap.ko && echo run: modprobe blktap || echo Missing module 
ls /usr/src/linux-headers-$(uname -r ) || echo MISSING kernel headers
ls /usr/src/blktap-2* || echo MISSING blktap-dkms
ls /var/lib/dkms/blktap/kernel-$(uname -r)* || echo dkms compilation failed

And to activate compile manually for all dkms modules:

sudo dkms autoinstall -k $(uname -r)
6
  • We should document this on help.ubuntu.com/community/XenProposed May 19, 2012 at 22:52
  • @Manwe i also have similar problem,in my case dom0 and domu are ubuntu 12.04,i tried as mentioned in ur post,but for me its still showing (55808 blktap kernel module not installed) i have installed blktap-dkms blktap-utils in dom0 but still its not working.this is the output of kernel module xen_netback,xen_blkback Can u please help me on this. Oct 4, 2012 at 4:41
  • Do you have kernel headers and dkms packages installed? blktap-dkms dkms linux-headers-generic, linux-headers-3.2.0-31-generic linux-headers-3.2.0-31-generic and also compile environment for the dkms to work. (kernel version are the latest I've compiled the module with)
    – Manwe
    Oct 4, 2012 at 7:30
  • Hey @Manwe i installed blktap and dkms using apt-get and using 3.2.0-23-generic kernel.GCC and other simmilar packages got installed as a dependency when i installed dkms.What am i missing.Can u please guide me. Oct 5, 2012 at 10:57
  • @KevinParker I've added some diagnose code to the answer, try those. I would guess that you don't have headers installed for your kernel (nothing here brings them as a dependency) or you have to modprobe blktap
    – Manwe
    Oct 8, 2012 at 7:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .