vm-builder 0.12.3-0ubuntu1 crashes and causes loop devices to be stuck

Bug #583530 reported by Chris Cheney
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I am having problems getting vm-builder to build an image for me. I'm not sure if I am even using it correctly, but after the crashes it seems to eat a loop file for each run corresponding to the disk image file. I unmount the various dirs that are mounted and that frees up two of the loop files but the third doesn't appear to be mounted. Also, I can't delete it with losetup as it claims "Device or resource busy" and nothing shows up in mount as still being mounted.

Chris Cheney (ccheney)
description: updated
Revision history for this message
Yann Hamon (yannh) wrote :

Sorry if I cant add much infos, but I had the same issue on lucid a few days ago. Ps -ef would show all the loop devices (8 of them as far as I can remember).

If that helps chris, vmbuilder wont work as long as those loop devices are used - but if you reboot (I know...) it will clear the loop devices and vmbuilder will work. Just don't ctrl+c too much when running vmbuilder as long as this isnt solved...

Revision history for this message
Chris Cheney (ccheney) wrote :

I didn't use ctrl-c vm-builder just bombed out probably due to other bugs and didn't clean up the resulting mess, and I couldn't figure out how to clean it up later without rebooting.

Thierry Carrez (ttx)
Changed in vm-builder (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
GeekSmith (lixo-geeksmith) wrote :

I'm seeing this any time vmbuilder fails. If it fails more than a few times, I run out of loopback devices and can't build anything more. Here are the loopback devices it leaves for a VM with two hard disks:

I'm able to clean up the loopback devices manually, but it's quite a pain:
aaron.smith@asmith ~/dvp/vm % sudo losetup -a
/dev/loop0: [0801]:678634 (/tmp/tmpZjs7XP)
/dev/loop1: [0801]:678638 (/tmp/tmpFfS6q9)
aaron.smith@asmith ~/dvp/vm % sudo losetup -d /dev/loop0
loop: can't delete device /dev/loop0: Device or resource busy
aaron.smith@asmith ~/dvp/vm % sudo kpartx -d /dev/loop0
aaron.smith@asmith ~/dvp/vm % sudo losetup -d /dev/loop0
aaron.smith@asmith ~/dvp/vm % sudo losetup -a
/dev/loop1: [0801]:678638 (/tmp/tmpFfS6q9)

-- OK, one down. The last one is a litte more painful:
aaron.smith@asmith ~/dvp/vm % sudo dmsetup table
loop1p1: 0 15622984 linear 7:1 63
aaron.smith@asmith ~/dvp/vm % sudo kpartx -dv /dev/mapper/loop1p1
aaron.smith@asmith ~/dvp/vm % sudo losetup -d /dev/mapper/loop1p1
aaron.smith@asmith ~/dvp/vm % sudo losetup -a
aaron.smith@asmith ~/dvp/vm %

If a person is trying to automate creation of a VM in a build process, this becomes burdensome.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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