Losing data with persistent hard disks/images

Hello all,

I have a couple of questions regarding persistence in OpenNebula. Maybe I have understood it all wrong, I don’t know: So in order to launch a VM I first upload the desired image to my OpeNebula server and check the “This image is persistent” tick-box upon doing so. I create a template afterwards, I specify all the details and select the image I want to use. Finally, I launch the VM by selecting the template and wait for it to initiate.

The thing is that, even if it says all over the place that the image that I chose is persistent, whenever I “Terminate” the VM and relaunch it back, I lose all the data/changes/etc… that were there while it was up. When I click on “Terminate” I get a warning stating that whichever hard drive that is non-persistent will lose all changes, but my hard drives/images are all persistent.

So what’s going on here? Am I missing a step in the process? Is this the normal way OpenNebula should behave?

Thanks in advance and best regards,

hi, your assumption about persistance is correct, all changes should be there still if an image is used with persistance=YES.

When your VM’s are running, and you check your images in the datastore, they should show up as USED_PERS, and not: USED - what does it show on your running-VM-images ?

Also, what storage subsystem are you using; ceph / local disk / NFS ?

Hi VURoland,

Thanks for answering, so then if my assumptions are correct my instance must be misbehaving right?

To your questions: In the datastore I see USED_PERS in my running images. I’m using a local disk storage system.

I’ve also tried to “Use the image as persistent” and to " Instantiate as persistent " both for one VM, but besides cloning the base image and the template, everything works in the same way: Once I terminate the VM I lose all changes/data… (I relaunch a VM with the cloned image)