Ask Your Question

What's the difference between shelving vs shutting down an instance?

asked 2014-06-11 10:45:08 -0500

Cristi Falcas gravatar image

updated 2016-12-22 23:23:29 -0500

fifieldt gravatar image

What is the difference between shelving an instance and shutting down?

From the blueprint ( I don't see any difference:

"Users would like the ability to stop servers when they don't need them, but retain it in their list of servers and keep all associated data and resources with it."

An instance doesn't release its resource(vcpu, rom, etc.) unless it is terminated. What's the reason? Could somebody tell me?

Is it designed on some purpose or maybe for some other reason?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-06-14 07:47:23 -0500

mriedem gravatar image

Yay code:

Shelving stops the instance and takes a snapshot of it. Then depending on the value of the shelved_offload_time config option, the instance is deleted from the hypervisor (0), never deleted (-1), or deleted after some period of time (> 0). Note that it's just destroying the backing instance on the hypervisor, the actual instance in the nova database is not deleted. Then you can later unshelve the instance:

edit flag offensive delete link more

answered 2014-06-13 17:10:27 -0500

smaffulli gravatar image

Taken from OpenStack User Guide:

Shelving is useful if you have an instance that you are not using, but would like retain in your list of servers. For example, you can stop an instance at the end of a work week, and resume work again at the start of the next week. All associated data and resources are kept; however, anything still in memory is not retained. If a shelved instance is no longer needed, it can also be entirely removed.

edit flag offensive delete link more



And is not everything from above valid for shutdown also? From what I could see, the VM is also consuming resources when shelved, just as a shutdown machine.

Cristi Falcas gravatar imageCristi Falcas ( 2014-06-14 00:52:44 -0500 )edit

answered 2016-10-03 20:48:09 -0500

med gravatar image

The hypervisor (say libvirt for example) will still be aware of a VM in shutdown state. You can see this for yourself by doing a shutdown on an instance and then doing "virsh list --all" on the nova-compute (libvirt) node. You will see that there is a virsh domain defined for the shutdown instance. For a shelved instance, the instance is completely disconnected from the hypervisor so libvirt is no longer aware of the instance. Also there is no "contract" that the VM will restart when unshelved on the same hypervisor. (That's a good thing and one of the purposes of shelving.)

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-11 10:45:08 -0500

Seen: 22,555 times

Last updated: Dec 22 '16