libdevmapper does not load its kernel modules upon install

Bug #277648 reported by Jared Bunting
58
This bug affects 5 people
Affects Status Importance Assigned to Milestone
VMBuilder
Invalid
Undecided
Unassigned
lvm2 (Ubuntu)
Expired
Undecided
Unassigned
vm-builder (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

libdevmapper needs a reboot after being installed for its modules to get loaded, causing the following problem until a reboot does occur. Would it be possible to have it insmod its module in postinst?

2008-10-03 10:30:35,387 INFO Creating disk image: /tmp/vmbuilderLcJmhr/disk0.img
2008-10-03 10:30:35,418 INFO Adding partition table to disk image: /tmp/vmbuilderLcJmhr/disk0.img
2008-10-03 10:30:35,463 INFO Adding type 1 partition to disk image: /tmp/vmbuilderLcJmhr/disk0.img
2008-10-03 10:30:35,469 INFO Adding type 3 partition to disk image: /tmp/vmbuilderLcJmhr/disk0.img
2008-10-03 10:30:35,475 INFO Creating loop devices corresponding to the created partitions
2008-10-03 10:30:35,480 INFO /proc/misc: No entry for device-mapper found
2008-10-03 10:30:35,481 INFO Is device-mapper driver missing from kernel?
2008-10-03 10:30:35,481 INFO Failure to communicate with kernel device-mapper driver.
2008-10-03 10:30:35,481 INFO /proc/misc: No entry for device-mapper found
2008-10-03 10:30:35,481 INFO Is device-mapper driver missing from kernel?
2008-10-03 10:30:35,481 INFO Failure to communicate with kernel device-mapper driver.
2008-10-03 10:30:35,481 INFO Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver
2008-10-03 10:30:35,481 INFO device mapper prerequisites not met
2008-10-03 10:30:35,482 CRITICAL Oh, dear, an exception occurred
2008-10-03 10:30:35,482 INFO Cleaning up
Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 29, in <module>
    VMBuilder.run()
  File "/usr/lib/python2.5/site-packages/VMBuilder/__init__.py", line 66, in run
    frontend.run()
  File "/usr/lib/python2.5/site-packages/VMBuilder/plugins/cli/__init__.py", line 52, in run
    vm.create()
  File "/usr/lib/python2.5/site-packages/VMBuilder/vm.py", line 419, in create
    raise e
VMBuilder.exception.VMBuilderException: Process (['kpartx', '-av', '/tmp/vmbuilderLcJmhr/disk0.img']) returned 1. stdout: , stderr: /proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver
device mapper prerequisites not met

ProblemType: Crash
Architecture: amd64
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/bin/vmbuilder
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: python-vm-builder 0.9-0ubuntu1
PackageArchitecture: all
ProcAttrCurrent: unconfined
ProcCmdline: /usr/bin/python /usr/bin/vmbuilder vmw6 ubuntu --suite intrepid --flavour virtual --arch i386 -o --libvirt qemu:///system --part vmbuilder.partition --user jbunting --name Jared\ Bunting --pass password --addpkg build-essential --addpkg openssh-server --mirror http://hostname:9999/ubuntu --tmpfs --firstboot boot.sh --addpkg acpid --addpkg man
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/vmbuilder', 'vmw6', 'ubuntu', '--suite', 'intrepid', '--flavour', 'virtual', '--arch', 'i386', '-o', '--libvirt', 'qemu:///system', '--part', 'vmbuilder.partition', '--user', 'jbunting', '--name', 'Jared Bunting', '--pass', 'password', '--addpkg', 'build-essential', '--addpkg', 'openssh-server', '--mirror', 'http://hostname:9999/ubuntu', '--tmpfs', '--firstboot', 'boot.sh', '--addpkg', 'acpid', '--addpkg', 'man']
SourcePackage: vm-builder
Title: vmbuilder crashed with device mapper prerequisites not met in create()
Uname: Linux 2.6.27-4-generic x86_64
UserGroups:

Tags: apport-crash
Revision history for this message
Jared Bunting (jared-bunting) wrote :
Revision history for this message
Nick Barcet (nijaba) wrote :

It sound like the device mapper module is not loaded. Did you reboot your system after installing python-vm-builder? if not, does the error disappear after rebooting?

Changed in vm-builder:
status: New → Incomplete
Changed in vmbuilder:
status: New → Incomplete
Nick Barcet (nijaba)
description: updated
Changed in vmbuilder:
status: Incomplete → Confirmed
Changed in vm-builder:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Nick Barcet (nijaba) wrote :

Troubleshooting the same issue with a user on #ubuntu-virt indicates that the problem does disappear after a reboot. This seems to confirm my suspicion that libdevmapper does not load its module when installed.

Revision history for this message
Hendry Lee (golb) wrote :

I'm on 32-bit machine. I can reproduce the error with the following installation:

- Intrepid beta dated 09-30-2008
- F4 -> minimum install
- No server, no nothing

Reboot.. sudo apt-get install python-vm-builder

and run the command

sudo vmbuilder vmw6 ubuntu --suite intrepid --flavour virtual --arch i386 --user user --name user --pass = user

Revision history for this message
Hendry Lee (golb) wrote :

It did create .vmx and .vmdk successfully after reboot as nijaba said.

Revision history for this message
Jared Bunting (jared-bunting) wrote :

Yes, after a reboot it is no longer crashing. I don't recall if I rebooted or not after installing it, but if it didn't ask me to, most likely I didn't.

Revision history for this message
Nick Barcet (nijaba) wrote :

according to https://bugs.launchpad.net/ubuntu/+source/ubuntu-vm-builder/+bug/278221/comments/2
modprobing dm-loop fixes this. Maybe devmapper should do this?

Revision history for this message
John Pugh (jpugh) wrote :

While I do not have access to the bug Nick mentions previously a simple "modprobe dm-loop" does indeed fix the issue.

Revision history for this message
Arie Skliarouk (skliarie) wrote :

From:
http://ubuntuforums.org/showthread.php?t=608369

...
This all should just happen automatically, so I guess there's something wrong with your install. Try to re-create your initrd image by doing
Code:
sudo update-initramfs -u -k 2.6.22-14-generic
and make sure the parameter after -k matches your current kernel, which you can check by using 'uname -r'
...

Revision history for this message
FredN (fred-nijdam) wrote :

Well, I happend to hit something like this. With synaptic/GUI I installed lvm2 and I think ds-mod as req..

After the install lvs a.s.o worked nice but ..... Incompatible libdevmapper 1.02.20 (2007-06-15)(compat) and kernel driver . Also after a reboot.
The mentioned bypass modprobe dm-mod solved the message.
Here some info:
Ubuntu 8.04 uptodate
Linux version 2.6.24-21-generic (buildd@crested) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Tue Oct 21 23:09:30 UTC 2008

Seems something is just missing.

Revision history for this message
Gianmarco De Francisci Morales (gianmarco-dfm) wrote :
Download full text (4.4 KiB)

I can report the same bug:

root@hal9000:~# ubuntu-vm-builder kvm intrepid --arch 'amd64' --mem '512' --rootsize '4096' --swapsize '1024' --kernel-flavour 'virtual' --hostname 'ubuntu' --mirror 'http://archive.ubuntu.com/ubuntu' --components 'main,universe'
2009-02-24 13:08:24,030 INFO Creating disk image: /tmp/vmbuilderhUXKaQ/disk0.img
2009-02-24 13:08:24,049 INFO Adding partition table to disk image: /tmp/vmbuilderhUXKaQ/disk0.img
2009-02-24 13:08:24,110 INFO Adding type 1 partition to disk image: /tmp/vmbuilderhUXKaQ/disk0.img
2009-02-24 13:08:24,123 INFO Adding type 3 partition to disk image: /tmp/vmbuilderhUXKaQ/disk0.img
2009-02-24 13:08:24,131 INFO Creating loop devices corresponding to the created partitions
2009-02-24 13:08:24,139 INFO /proc/misc: No entry for device-mapper found
2009-02-24 13:08:24,139 INFO Is device-mapper driver missing from kernel?
2009-02-24 13:08:24,140 INFO Failure to communicate with kernel device-mapper driver.
2009-02-24 13:08:24,140 INFO /proc/misc: No entry for device-mapper found
2009-02-24 13:08:24,140 INFO Is device-mapper driver missing from kernel?
2009-02-24 13:08:24,141 INFO Failure to communicate with kernel device-mapper driver.
2009-02-24 13:08:24,141 INFO Incompatible libdevmapper 1.02.20 (2007-06-15)(compat) and kernel driver
2009-02-24 13:08:24,141 INFO device mapper prerequisites not met
2009-02-24 13:08:24,141 INFO Cleaning up
Traceback (most recent call last):
  File "/usr/bin/ubuntu-vm-builder", line 29, in <module>
    VMBuilder.run()
  File "/usr/lib/python2.5/site-packages/VMBuilder/__init__.py", line 66, in run
    frontend.run()
  File "/usr/lib/python2.5/site-packages/VMBuilder/plugins/cli/__init__.py", line 67, in run
    vm.create()
  File "/usr/lib/python2.5/site-packages/VMBuilder/vm.py", line 453, in create
    raise e
VMBuilder.exception.VMBuilderException: Process (['kpartx', '-av', '/tmp/vmbuilderhUXKaQ/disk0.img']) returned 1. stdout: , stderr: /proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.20 (2007-06-15)(compat) and kernel driver
device mapper prerequisites not met

And after probing the device mapper module:

root@hal9000:~# modprobe dm_mod
root@hal9000:~# ubuntu-vm-builder kvm intrepid --arch 'amd64' --mem '512' --rootsize '4096' --swapsize '1024' --kernel-flavour 'virtual' --hostname 'ubuntu' --mirror 'http://archive.ubuntu.com/ubuntu' --components 'main,universe'
2009-02-24 13:12:14,170 INFO Creating disk image: /tmp/vmbuilder-_1bVM/disk0.img
2009-02-24 13:12:14,174 INFO Adding partition table to disk image: /tmp/vmbuilder-_1bVM/disk0.img
2009-02-24 13:12:14,222 INFO Adding type 1 partition to disk image: /tmp/vmbuilder-_1bVM/disk0.img
2009-02-24 13:12:14,230 INFO Adding type 3 partition to disk image: /tmp/vmbuilder-_1bVM/disk0.img
2009-02-24 13:12:14,238 INFO Creating loop devices corresponding to the created partition...

Read more...

Revision history for this message
Soren Hansen (soren) wrote :

This is not a VMBuilder problem. Rejecting those bug tasks.

Changed in vm-builder (Ubuntu):
status: Confirmed → Invalid
Changed in vmbuilder:
status: Confirmed → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Revision history for this message
Phillip Susi (psusi) wrote :

I believe the modules are now auto loaded on demand. Is this still an issue for you?

affects: devmapper (Ubuntu) → lvm2 (Ubuntu)
Changed in lvm2 (Ubuntu):
status: New → Incomplete
Changed in lvm2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for lvm2 (Ubuntu) because there has been no activity for 60 days.]

Changed in lvm2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.