3

I am running lucid and want to build an oneiric vm using vmbuilder.

I run this command:

sudo vmbuilder kvm ubuntu --suite oneiric --flavour virtual \
    --arch i386 -o --libvirt qemu:///system --user user --name user \
    --pass user --addpkg imagemagick --mirror http://localhost:9999/ubuntu \
    --addpkg acpid

and get this error message:

VMBuilder.exception.VMBuilderUserError: Invalid suite: "oneiric". Valid suites are: dapper gutsy hardy intrepid jaunty karmic lucid

How can I add the ability to create VMs for newer releases?

2 Answers 2

4

I tried adding the vmbuilder team's PPA and pulling their "daily" build for lucid, but the build in the PPA appears to be several revisions behind bzr and only has support up to maverick.

Instead, I built the package directly from bzr. Living on the bleeding edge is not ideal for various reasons, but here's what I did:

sudo apt-get install bzr
sudo apt-get build-dep --no-install-recommends ubuntu-vm-builder
bzr branch lp:ubuntu/vm-builder ubzr-vm-builder
cd ubzr-vm-builder
fakeroot debian/rules binary
sudo dpkg -i ../*vm-builder*.deb

When I run the command in the question, I no longer get the error message about an invalid suite.

4
  • The Lucid series in the PPA hasn't been updated for almost 2 years (2010-07-10). I don't think that PPA is a good option anymore (trying to create Precise guest on Lucid host).
    – phunehehe
    Jun 27, 2012 at 3:25
  • The PPA wasn't a good option several months ago when I posted the answer. Instead, build directly from bzr as mentioned in the answer.
    – bstpierre
    Jun 27, 2012 at 11:45
  • Yeah, your answer worked for me. Just try to warn those who attempts to use the PPA, like me :)
    – phunehehe
    Jun 27, 2012 at 11:56
  • This works very well. You do need to install bzr, and run this: sudo apt-get build-dep --no-install-recommends ubuntu-vm-builder to install the minimum dependencies needed to build the package. This is on 10.04 building a 12.04 vm.
    – ssmy
    Aug 1, 2012 at 21:13
3

You must add the module for the Ubuntu version you want to build, editing:

/usr/share/pyshared/VMBuilder/plugins/ubuntu/distro.py and 
/usr/share/pyshared/VMBuilder/plugins/ubuntu/oneiric.py 

Will do it for you, however since last versions are made for the previous ones, you'll need to define natty and maverick before. You can learn more of the structure checking file:///usr/share/doc/python-vm-builder/html/VMBuilder.plugins.ubuntu-module.html out.

The easiest way to accomplish this is by copying the ubuntu plugins from the last version:

$ bzr branch lp:ubuntu/vm-builder ubzr-vm-builder
$ sudo cp ubzr-vm-builder/VMBuilder/plugins/ubuntu/* /usr/share/pyshared/VMBuilder/plugins/ubuntu/

Make sure to update the soft links living in:

/usr/lib/python2.6/dist-packages/VMBuilder/plugins/ubuntu/
1
  • +0: I would -1 because copying files as suggested breaks the packaging, and there's no guarantee that the scripts in those directories will be compatible with the rest of the package. But +1 because it pointed me in the right direction (see my answer), thanks.
    – bstpierre
    Nov 1, 2011 at 14:45

You must log in to answer this question.

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