Ask Your Question
0

How can I delay the deletion of a vm until the snapshot has been completed

asked 2014-01-02 11:46:15 -0500

KeithJ gravatar image

Release: Folsom

I need to create a snapshot of a vm before deleting it. Currently I can create a snapshot via a script (however I can not see the created snapshot).

I must only delete the vm instance if the snapshot has been created

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-01-02 13:09:55 -0500

SamYaple gravatar image

I would suggest setting up triggers in your database to check those things and call your scripts appropriately. There is currently no built in mechanism to do what you are asking.

edit flag offensive delete link more
0

answered 2014-01-03 08:49:48 -0500

KeithJ gravatar image

Ok well what I did was this. I created the snapshots and at the same time wrote out a file containing the vm_id and snapshotname.

I then wrote another script which read in this file and if the snapshot progress is 100% complete I then delete the VM. All fiels which do not have snapshot complete get written out to another file. This way it can be used as an input file at a later date

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: 2014-01-02 11:46:15 -0500

Seen: 174 times

Last updated: Jan 03 '14