Ask Your Question

Glance image to base image mapping ?

asked 2015-07-28 01:15:35 -0500

Vinu gravatar image

Would like to know where exactly is the mapping done between the images uploaded to Glance and the corresponding image file that is downloaded to compute nodes under "/var/lib/nova/images/_base" when nova boot <> is used to instantiate a VM. I could see that under _base dir, there is a raw disk file getting created with HEX # as file names. And this image is used as base line image for all the new VM instances.

The info that I'm looking for is, how the the glance uploaded image and this _base image's are mapped when ever a new nova VM in launched so that only the first time the _base/ image is downloaded and later on its reused.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-09-18 01:14:16 -0500

according to the source code, base image name is the sha1 of its image_id:


def get_cache_fname(images, key):
    image_id = str(images[key])
    if ((not CONF.libvirt.remove_unused_kernels and
         key in ['kernel_id', 'ramdisk_id'])):
        return image_id
        return hashlib.sha1(image_id).hexdigest()
edit flag offensive delete link more

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



Asked: 2015-07-28 01:15:35 -0500

Seen: 181 times

Last updated: Jul 28 '15