Ask Your Question
1

How to gracefully terminate instance in Openstack?

asked 2015-09-10 02:27:38 -0500

eupub gravatar image

Hi Experts,

Is it possible to gracefully terminate instances in Openstack(Juno)? I need the instance to gracefully shutdown in OS (to run some shutdown scripts) before being finally deleted. Currently the behavior is that the instance being abruptly deleted. Or are there ways to workaround this?

Please advise!

Regards, Boon Lee

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
3

answered 2015-09-10 10:19:39 -0500

I'll agree with Eduardo Gonzalez. On a host that has the openstack command line utilitities communicating with your openstack for a Linux instance

echo sudo shutdown now |ssh -i yourkey.pem cloud-user@yourinstance
sleep 60
nova delete  yourinstance
edit flag offensive delete link more
2

answered 2015-09-10 02:45:35 -0500

You can make a poweroff inside the vm and then terminate the instance.

edit flag offensive delete link more
0

answered 2015-09-11 01:19:46 -0500

ritesh.singh.aricent@gmail.com gravatar image

updated 2015-09-11 11:21:30 -0500

edit flag offensive delete link more

Comments

excellent. Now we need access to a fact that tells us that the instance actually gets terminated. Maybe provided as metadata?

hanno gravatar imagehanno ( 2015-09-16 13:56:23 -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

Stats

Asked: 2015-09-10 02:27:38 -0500

Seen: 6,017 times

Last updated: Sep 11 '15