openstack how to prevent losing vms

460 views Asked by At

I am using "devstack" to play with the openstack in my desktop.

I had configured several vms in my instance. What happened was couple of days ago there was a power failure which caused my desktop to power down(I didnt have a UPS) attached to it. This resulted in my losing all the vms since i didnt unstack.

One of the solution to prevent this from happening next time is using a UPS. Are there any other solutions that I can use to back the vms so that even if there is a power loss the vms will run if i just restart and do ./stack.sh

2

There are 2 answers

3
Harikrishnan On

Create snapshot of VM

enter image description here

Instance snapshots are uploaded to Glance which will store them in /var/lib/glance/images on the controller node.

Backup this folder.

When there is a data lose occurs , just restore this folder and Launch new instance by boot from image. select the snapshot and click launch.

0
Barak On

Devstack is a developer environment, it is not meant to recover from power losses.

You should consider using another all-in-one openstack installer which should support restarting the openstack services without losing state. For instance, you can use Redhat's packstack - https://openstack.redhat.com/Quickstart