Nova has code to inject files into images before launching instances. The image is mapped either using nbd for qcow or loopback for raw, mounted and files copied in.
Of course, this doesn't work with LVM based images like you might build using a simple Oz template.
Enter stage left, libguestfs - this is a perfect use case for it.
It'd be really cool for upstream to use libguestfs where available to handle many more image and OS types.
We should have a clearer libguestfs-on-Ubuntu-10.4 story
before we launch into this further. At the moment I don't
even know if it compiles on that platform, and I suspect
the kernel will be too old (lacking support for virtio-serial).
(In reply to comment #1)
> We should have a clearer libguestfs-on-Ubuntu-10.4 story before we launch into this further.
Even without this, I'm sure upstream would take libguestfs if it was option - e.g. try it and fallback to loopback mounting, or even introduce the concept of a FileInjectionDriver and make a libguestfs based driver that can be enabled in nova.conf
- qemu-kvm is really old (0.12.3)
- kernel is also old (2.6.32)
- febootstrap is collecting its pension (2.1!)
- No hivex at all. hivex is not available until Ubuntu 11.04.
- 'apt depends --recurse' is buggy so apt needs upgrading or the
fix needs to be backported.
The apt update is where the real problems lie. A straight
backport of the oneiric package is not feasible because it
would pull other core dependencies. I need to isolate the
fix and backport just that.
So I think it'd be a lot of work to get libguestfs working
in Ubuntu 10.04, and therefore it must be an optional
dependency as you describe in comment 2. I also think this
will limit acceptance upstream, and testing, because it looks
like upstream have settled on Ubuntu 10.04.
(In reply to comment #3)
> it looks like upstream have settled on Ubuntu 10.04.
Upstream want to *support* Ubuntu 10.04 - and that's what the FileInjectionDriver based on the current code would be for. Doesn't exclude adding a libguestfs based implementation
Actually I got a bit further and managed to get libguestfs
The good news is that the workarounds required to install
this aren't too bad. All that is really missing is an
updated qemu-kvm, and we can easily supply that missing dependency
or persuade Ubuntu that they really should think about backporting
the newer qemu since it's generally [less] broken than the ancient
version they are shipping.
It turns out that Grid Dynamics have a patch to do this:
The patch needs a little bit of work, but it's generally on the
[Just some "notes to self" about this]
Currently the code in nova/virt/disk.py implements a lot
of things like resizing disks, injecting files etc which
would be better done using libguestfs.
We should make an abstract interface for the class (same
as driver.ComputeDriver which abstracts libvirt, XenAPI etc)
and then have implementations for the current impl and for
Pádraig's made great progress on this: https://review.openstack.org/1994
openstack-nova-2011.3-14.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openstack-nova-2011.3-14.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
openstack-nova-2011.3-14.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.