Openstack and file injection

Pádraig Brady P at draigBrady.com
Mon Nov 12 09:57:41 UTC 2012


On 11/12/2012 08:04 AM, Belmiro Moreira wrote:
> Hi,
> I'm using openstack packages available on EPEL (Essex) to deploy openstack on CERN Scientific Linux 6.
> Openstack is failing to mount images to inject data because "nbd" module is not available in RHEL.
>
> Stderr: 'libguestfs: error: guestfs_launch failed, see earlier error messages\n' from (pid=26216) mount /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:205
> 2012-11-12 08:44:35 WARNING nova.virt.libvirt.connection [req-651b1576-15a3-46b5-ba85-a5651d4719b7 b7aa0805440f41bfa69b000bb475a0eb 237745f6e81d4a8494eea1b168d73610] [in
> stance: 6045ff89-b323-448b-9001-3232e4c42e83] Ignoring error injecting data into image e7aa813f-a6b8-4fbd-b960-f6f5009cc33d (
> --
> nbd unavailable: module not loaded
> --
>
> qemu-nbd is also not available.
> Should I grab this from Fedora and rebuild it or I'm missing some configuration in my system to be able to inject data in VMs.
>
> thanks for any help,
> Belmiro

So there are 3 methods tried to inject data into a system image.
   loop, nbd and libguestfs.

loop suffices for raw images, nbd handles qcow2 format but
is not supported by RHEL based kernels as you've seen.
You might be able to compile separately, but I'd suggest
that you try to get libguestfs working, which is the most functional/flexible.

So things to try:

1. Ensure libvirt_inject_partition = -1 in /etc/nova/nova.conf
This will ensure that libvirt will go looking for the partition to
inject to, rather than requiring a specific partition.
Do you have a partitioned or flat guest image BTW?
What is the guest image?

2. Try the command that nova runs to mount the image:
   guestmount --rw -a file.img -i /tmp/mount_test
Note also the --verbose and --trace options.
If the problem is still not apparent from the console or logs,
you can enable extra debugging to see what's happening exactly with:
export LIBGUESTFS_DEBUG=1

thanks,
Pádraig.


More information about the cloud mailing list