What is the meaning of teminating machine in openstack docs?

We say ephemeral image is a VM image that does not save changes made to its volumes and reverts them to their original state after the instance is terminated.Ok, Now I wanna know what is the meaning of terminate in OpenStack dictionary? shutdown or restart a vm means terminate it or Deleting means terminate? If shutdown machine means terminate, It is difficult for me to understand what happen for my instance, I boot my machine from ephemeral image and make some changes for example I copy a file in Drive C or I install IIS and … so after shutdown machine, all the changes will purge? If yes, what should I do for having the changes?
I know I have problem in understanding base concept, may be thankful if guide me.

1 answer

Hi p.bagherpour.
When you create an instance, really you are creating a VM in an hypervisor (KVM as example). That VM have a .img file associated with it, with all data on it (operating system, files created, applications installed, etc).
Types of storage in OpenStack:

Ephemeral: data will remain in the instance until is terminated saved in the local nova storage.

Persistent: data will be copied to a persistent hard drive through a connection to libvirt (ISCSi, rbd, etc).

Instance Status Actions:

Terminate / Delete: Terminate eliminates the instance completely. Ephemeral storage is lost, persistent storage is not lost because is not stored in the instance itself.

Shut down: Shut down just power off the instance, data still present when the instance is resumed.

Restart: Shutdown + Start, data remain.

In the hypervisor means:

terminate == delete all the data

shutdown == stop the libvirt domain

restart == stop and start libvirt domain

To add a little more information:

Ephemeral storage is often located locally in compute node at /var/lib/nova/instances.

Persistent storage is a connection to an external storage backend (cinder) which creates a ISCSi or rbd connection to the storage (Ceph in the case of rdb).

So, removing an instance with ephemeral storage for the OS in /dev/vda and a Cinder volume in /dev/vdb.
Nova will delete ephemeral data in /var/lib/nova/instances/instance_UUID and also remove the connection present in the instance's xml to the block storage, but the data will remain in the storage backend.