Ask Your Question

How to force nova to boot an updated glance image?

asked 2013-11-28 08:53:08 -0500

cyberang3l gravatar image

I have an image, on which I make some modifications and eventually I run the following command to update it:

glance image-update --size <the new size as taken from stat output> <UUID>

This will update the size and the updated_at properties of the image, but the next time I try to boot a VM based on the updated image, it will still boot from the base image cached in the common storage (the previous one which is not updated).

How can I force nova to re-download the latest image from the glance server?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-10 11:04:08 -0500

gmi gravatar image

How did you make modifications to the Glance image? Any changes would cause the md5sum to change, which will render the old image invalid. You should copy the Glance image from the "/var/lib/glance/images" somewhere else, change it and re-add it to Glance with a new name (and new UUID), then start instances using this new image.

edit flag offensive delete link more


I add the images in a web server and then I add them in glance using the --location http://xxx.img. So when I want to change the image, I simply change it in the web server. If I remove the cached base image, nova will re-download the image from the "location" and it works. No need to create a new

cyberang3l gravatar imagecyberang3l ( 2013-12-10 11:11:01 -0500 )edit

image. The problem comes when some virtual machines already use the base image so I cannot remove it in this case.

cyberang3l gravatar imagecyberang3l ( 2013-12-10 11:12:04 -0500 )edit

For all intents and purposes, you end up with two different images and Nova behavior is correct. You can use other means of updating the contents of the image instead of changing the image itself (e,g, use cloud-init: I don't think there is a solution for your issue in the existing Nova, other than running a script that ssh into each compute node and checks to see if there are no instances using the old image and then removing it. Another way would be, instead of updating the image, just create a new one pointing to that --location http://xxx.img and start instances based on it.

gmi gravatar imagegmi ( 2013-12-10 11:38:10 -0500 )edit

"Another way would be, instead of updating the image, just create a new one pointing to that --location http://xxx.img and start instances based on it." <- This is what I am actually doint at the moment, so I was just looking if there is any way to avoid creating a new image. Since there is not, thanks for the reply and suggestions!!

cyberang3l gravatar imagecyberang3l ( 2013-12-10 12:34:19 -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


Asked: 2013-11-28 08:53:08 -0500

Seen: 409 times

Last updated: Dec 10 '13