Ask Your Question
0

Libvirt image cache

asked 2011-06-23 16:51:58 -0500

ethuleau gravatar image

How works the VM image cache with libvirt driver ?

I saw a directory '$instances_path/_base' where a copy of a new VM image are store. So when we start a new instance, if it's the first time its image is instantiated on this host, the image is copied and if it's not, nova-compute find a old copy and use it.

When the instance is destroy, the image copy isn't delete. So which process purge this directory ? When and why a local image copy is deleted on a host ?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2011-06-23 17:46:51 -0500

vishvananda gravatar image

The cached images are never purged. If space is a concern and lots of different images are being used, you will need to find images that aren't in use on the host and delete them via a cron script or some such.

Vish

On Jun 23, 2011, at 9:55 AM, Edouard Thuleau wrote:

New question #162498 on OpenStack Compute (nova): https://answers.launchpad.net/nova/+q...

How works the VM image cache with libvirt driver ?

I saw a directory '$instances_path/_base' where a copy of a new VM image are store. So when we start a new instance, if it's the first time its image is instantiated on this host, the image is copied and if it's not, nova-compute find a old copy and use it.

When the instance is destroy, the image copy isn't delete. So which process purge this directory ? When and why a local image copy is deleted on a host ?


You received this question notification because you are a member of Nova Core, which is an answer contact for OpenStack Compute (nova).

edit flag offensive delete link more
0

answered 2011-07-08 09:43:35 -0500

ethuleau gravatar image

Thanks Vish Ishaya, that solved my question.

edit flag offensive delete link more
0

answered 2011-09-14 09:28:41 -0500

Hi guys, "you will need to find images that aren't in use"

how could we figure which images could be safely deleted ? Thanks

edit flag offensive delete link more
0

answered 2011-09-14 15:00:41 -0500

I've made a small bash script to list images that could be removed : https://github.com/Razique/Bash-stuff/blob/master/SCR_5008_V00_NUAC-OPENSTACK-Nova-compute-images-prunning.sh (https://github.com/Razique/Bash-stuff...)

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

1 follower

Stats

Asked: 2011-06-23 16:51:58 -0500

Seen: 64 times

Last updated: Sep 14 '11