[Bug 531599] [NEW] tricky leftovers when using a too small --raw device
Simon Huerlimann
simon at huerlisi.ch
Wed Mar 3 21:06:21 GMT 2010
Public bug reported:
I've tried to install a vm using an LVM logical volume with --raw. The
problem was that I used a too small logical volume.
vmbuilder told me:
2010-03-03 21:33:59,923 INFO : Adding partition table to disk image: /dev/mapper/leo01-test--disk
2010-03-03 21:34:00,007 INFO : Adding type 1 partition to disk image: /dev/mapper/leo01-test--disk
2010-03-03 21:34:00,879 INFO : Adding type 3 partition to disk image: /dev/mapper/leo01-test--disk
2010-03-03 21:34:00,890 INFO : [0] ../../libparted/filesys.c:147 (ped_file_system_type_get): File system alias linux-swap(new) is deprecated
2010-03-03 21:34:00,892 INFO : Cleaning up
Traceback (most recent call last):
File "/usr/bin/vmbuilder", line 29, in <module>
VMBuilder.run()
File "/usr/lib/python2.6/dist-packages/VMBuilder/__init__.py", line 65, in run
frontend.run()
File "/usr/lib/python2.6/dist-packages/VMBuilder/plugins/cli/__init__.py", line 68, in run
vm.create()
File "/usr/lib/python2.6/dist-packages/VMBuilder/vm.py", line 480, in create
disk.create_partitions(self)
File "/usr/lib/python2.6/dist-packages/VMBuilder/disk.py", line 416, in create_partitions
disk.create(vm.workdir)
File "/usr/lib/python2.6/dist-packages/VMBuilder/disk.py", line 100, in create
part.create(self)
File "/usr/lib/python2.6/dist-packages/VMBuilder/disk.py", line 244, in create
run_cmd('parted', '--script', '--', disk.filename, 'mkpart', 'primary', self.parted_fstype(), self.begin, self.end)
File "/usr/lib/python2.6/dist-packages/VMBuilder/util.py", line 135, in run_cmd
raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, stdout, stderr)
VMBuilder.exception.VMBuilderException: Process (['parted', '--script', '--', '/dev/mapper/leo01-test--disk', 'mkpart', 'primary', 'linux-swap(new)', '9', '1032']) returned 1. stdout: Error: The location 1032 is outside of the device /dev/mapper/leo01-test--disk.
, stderr: [0] ../../libparted/filesys.c:147 (ped_file_system_type_get): File system alias linux-swap(new) is deprecated
While this is a lot of noise, telling me 'location 1032 is outside of
the device...' made me recognize my mistake.
The problem is that I wasn't able to just remove the logical volume, create a bigger one and start again:
sudo lvremove /dev/mapper/leo01-test--disk
Can't remove open logical volume "test-disk"
The reason is that there's another device map set up by vmbuilder:
/dev/mapper/leo01-test--diskp1
This is because the first (root) partition did fit on the logical
volume, but only the second (swap) one not.
I had to drop the device mapping using
sudo dmsetup remove /dev/mapper/leo01-test--diskp1
This would allow me to lvremove the logical volume now.
I would expect that vmbuilder cleans up on exceptions like this and
remove the device mappings for the inner partitions.
** Affects: vm-builder (Ubuntu)
Importance: Undecided
Status: New
--
tricky leftovers when using a too small --raw device
https://bugs.launchpad.net/bugs/531599
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to vm-builder in ubuntu.
More information about the Ubuntu-server-bugs
mailing list