When will a non persistent image be removed?

Hello,
I am still trying to get my head around the way KVM and Open Nebula works so my apologies for a beginner question.

In reference to the non persistent lifecycle chart located here: http://docs.opennebula.org/5.0/_images/image-nonpersistent.png

Am I correct that a VM will keep it’s own copy of a non-persistent image until such time as I delete the VM? Is there any circumstance, beyond a delete, where the image will revert back to the template?

For example I have two VMS both using the same template image. I’ve booted them up and I’ve add /host-1.txt and /host-2.txt to each server. How long will those files be there for?

Thank you in advance.

Chris opennebula@discoursemail.com writes:

Hello,

Hello,

[…]

In reference to the non persistent lifecycle chart located here:
http://docs.opennebula.org/5.0/_images/image-nonpersistent.png

This is the lifecycle of the image in the datastore, not the lifecycle
of the VM image[1].

Am I correct that a VM will keep it’s own copy of a non-persistent image until such time as I delete the VM? Is there any circumstance, beyond a delete, where the image will revert back to the template?

For example I have two VMS both using the same template image. I’ve booted them up and I’ve add /host-1.txt and /host-2.txt to each server. How long will those files be there for?

The VM data, i.e. the data written since the VM was first poweron,
remain until the VM goes in DONE state after a “terminate”.

Another way to loose data is to use “onevm recover --recreate”[2].

Regards.

Footnotes:
[1] Managing Virtual Machines Instances — OpenNebula 5.0.2 documentation

[2] Managing Virtual Machines Instances — OpenNebula 5.0.2 documentation

Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF

Hi Daniel, thank you for the reply. Can a terminate operation happen automatically or is it something I must manually do?

Chris opennebula@discoursemail.com writes:

Hi Daniel, thank you for the reply. Can a terminate operation happen
automatically or is it something I must manually do?

OpenNebula team can confirm but that’s not the purpose of OpenNebula to
run action automatically without user consent.

The most automated you can do for this is scheduling actions[1] or
having any 3party software/cron/scheduler tasks running commands/API
call.

Regards.

Footnotes:
[1] Managing Virtual Machines Instances — OpenNebula 5.0.2 documentation

Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF

Confirmed. What could happen is that the VM is moved from RUNNING to POWEROFF if the VM is shutdown from the guest. But never DONE (final state after a terminate action).

Thank you guys - appreciate the clarification.