[nova] Can OpenStack support snapshot rollback (not creating a new instance)?

Gilles Mocellin gilles.mocellin at nuagelibre.org
Mon Mar 27 18:01:00 UTC 2023


Le dimanche 26 mars 2023, 20:50:22 CEST 韩光宇 a écrit :
> Hello,

Hello,
 
> I use Ceph as the storage backend for Nova, Glance, and Cinder.
> 
> If I create a snapshot for a instance, It create a new image in
> glance. And I can use the image to create a new instance.
> 
> This feels to me more like creating an image based on the current
> state of the VM rather than creating a VM snapshot.

The term "snapshot" is not ideal, as it miss-leads every virtualization 
platform users (VMware, Hyper-V...).

> I want to ask:
> 1、Can I create and revert a VM snapshot like I would in virtual
> machine software?

In fact, if you don't user boot from volume instances, you could have 
something similar of snapshots by rebuilding your VM with the image create by 
the snapshot.

> 2、When a VM uses multiple disks/volumes, does OpenStack support taking
> a snapshot of all disks/volumes of the VM as a whole?

No, but you can take snapshot of the volumes. It won't be coherent, in a 
single transaction.

> 3、Can OpenStack snapshot and save the memory state of a VM?

I think not. When the instance is suspended, it's done, but even if you 
snapshot it, it would not take that memory state with the image.
 
> If it is not currently supported, are there any simple customization
> implementation ideas that can be recommended?

You really need to think differently.
OpenStack is a Cloud platform, made to consume Infrastructure as a Service, 
with Infra as code tools (like Terraform).

You should have disposable instances, that could be destroyed and rebuild when 
you want easily.
Use clusters for your middlwares (mariadb, redis...), use load balancer : 
Octavia our you own HAproxy, in front of your several web frontends / 
backends...
Keep your data on additional volumes, and also do backups in object storage 
(Swift/S3, handled by Ceph).
Make restoration easy and test it.

Deploy different environments of your projects in different OpenStack projects, 
to test changes.

That way of thinking will make it easier for you when you will begin to think 
about containers and Kubernetes.

> Thank you for any help and suggestions.
> Best wishes.
> 
> Han







More information about the openstack-discuss mailing list