Ask Your Question
0

nova.virt.disk.api error injecting data libguestfs permission denied

asked 2013-12-18 19:52:02 -0500

mulligan gravatar image

updated 2013-12-18 21:27:40 -0500

larsks gravatar image

On a new installation of Openstack Havana on CentOS 6.5 I receive the following error in compute.log upon launching a new instance of CirrOS 0.3.1:

2013-12-18 13:27:18.752 1878 WARNING nova.virt.disk.api [req-8a38306b-5392-4737-b47f-2ea2828da189 da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Ignoring error injecting data into image (Error mounting /var/lib/nova/instances/fb60303c-10e7-4a2c-b204-67e98990db91/disk with libguestfs (mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type))
edit retag flag offensive close merge delete

Comments

I don't see a "permission denied" error here.

larsks gravatar imagelarsks ( 2013-12-18 21:28:29 -0500 )edit

I have a similar issue, and I can reproduce the problem out of nova. Below is the question I posted to ask.openstack.org: https://ask.openstack.org/en/question/9289/fail-to-boot-vm-with-nova-compute-complain-unable-to-mount-image/

DennyZhang gravatar imageDennyZhang ( 2013-12-22 00:24:30 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-12-20 06:33:05 -0500

rwmjones gravatar image

updated 2013-12-22 05:00:31 -0500

There are two different errors in the discussion above. The first one is:

mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type

which means that libguestfs could not detect the filesystem in the disk image (and it's probably looking in the wrong place too).

My Cirros 0.3.0 disk image here has a partition containing an ext3 filesystem:

$ virt-filesystems -a cirros-0.3.0-x86_64-disk.img  --all --long -h
Name       Type        VFS   Label          MBR  Size  Parent
/dev/sda1  filesystem  ext3  cirros-rootfs  -    31M   -
/dev/sda1  partition   -     -              83   31M   /dev/sda
/dev/sda   device      -     -              -    39M   -

But for libguestfs in Nova to find this, it has to be able to inspect the image, which also works for 0.3.0:

$ virt-inspector -a cirros-0.3.0-x86_64-disk.img
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda1</root>
    <name>linux</name>
    <distro>cirros</distro>
    <product_name>2011.08</product_name>
    <major_version>2011</major_version>
    <minor_version>8</minor_version>

This didn't work properly with CirrOS 0.3.1, but https://github.com/libguestfs/libguestfs/commit/d20289186d257105f304a4fa0c3e6d26a5fb0807 (that bug has now been fixed upstream).

The second error is:

Error mounting /dev/cinder-volumes/instance-0000001d_disk with libguestfs (/dev/cinder-volumes/instance-0000001d_disk: Permission denied

which looks like a straight permissions error. libguestfs needs sufficient permissions to be able to read and write to the disk.

edit flag offensive delete link more
0

answered 2013-12-18 21:42:49 -0500

larsks gravatar image

This is a warning -- rather than an error -- and I think you can safely ignore it unless you are experiencing other problems with your installation.

If libvirt_inject_partition is set to -1 in /etc/nova/nova.conf, Nova uses libguestfs to inspect the image and attempt to inject configuration data into the filesystem. The warning above suggests that Nova failed to inject the configuration data, but this should not prevent the instance from booting.

Most cloud images (e.g., from Fedora and Ubuntu) obtain configuration information over the network from the metadata server, rather than using configuration information injected via the filesystem.

You can set libvirt_inject_partition to -2 to disable the inspection.

edit flag offensive delete link more

Comments

Actually, I meant to post this error:

2013-12-18 15:09:34.195 1954 WARNING nova.virt.disk.api [req-17a1a573-dee4-4642-9f26-8859e6e6a268 da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Ignoring error injecting data into image (Error mounting /dev/cinder-volumes/instance-0000001d_disk with libguestfs (/dev/cinder-volumes/instance-0000001d_disk: Permission denied))

I understand this is a warning and the instance creation process continues but it then goes into errors relating to NBD. If I can get libguestfs to work rather than NBD that would fix my deployment, I think. <\p>

mulligan gravatar imagemulligan ( 2013-12-19 11:26:27 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-12-18 19:52:02 -0500

Seen: 1,551 times

Last updated: Dec 22 '13