kernel_id property not found for image 8 (HTTP 500)

Asked by Juan Perez on 2011-01-27


OS: Ubuntu Server 10.04 64-bit
Hypervisor: XenServer 5.6 FP1
Glance: Branched 56 revision
Nova: Branched 631 revision

When I try to boot an image stored in Glance:
I receive the following error:
# cloudservers boot test --flavor=1 --image=8

cloudservers.exceptions.CloudServersException: kernel_id property not found for image 8 (HTTP 500)

Here is the code I used to upload the image to Glance:

import sys

from glance.client import Client

c = Client('ubxs03', 9292)

meta = {'name': 'MacAlpha',
        'type': 'machine',
        'is_public': True,
        'kernel_id': 3,
        'ramdisk-id': 2,
        'properties': {'distro': 'MacAlpha'}}

new_meta = c.add_image(meta, open('images/lucid/ubuntu-lucid.img'))

It seems like the kernel_id property is not part of the image meta data following the upload of the image to glance, but I'm not sure what I'm doing wrong?

Thank you for any help you can provide!

Question information

English Edit question
Glance Edit question
No assignee Edit question
Solved by:
Jay Pipes
Last query:
Last reply:
Best Jay Pipes (jaypipes) said : #1

Hi Juan!

To upload to Glance, please use the ./bin/glance-upload tool that ships with Glance.

For AMI-style images, you will need to store the kernel, ramdisk, and machine image separately, just just you operate on them separately with euca2ools...

Here is an example:

    glance-upload --type=kernel <filename> <name>

will return the image ID of the kernel image in Glance. Use this KERNEL_ID below...

    glance-upload --type=ramdisk <filename> <name>

Same for the ramdisk image...

    glance-upload --type=machine --kernel=KERNEL_ID --ramdisk=RAMDISK_ID \
                     <filename> <name>

Note that once the glance-admin tool is completed (see for progress in Cactus release series), all these steps won't be necessary. For now, they are though :)

Hope this helps!


Juan Perez (juanperez) said : #2

Thanks Jay Pipes, that solved my question.