# Disk snapshots in OpenNebula

**URL:** <https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017>\
**Category:** Operations\
**Created:** [October 10, 2021, 6:13pm UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017 "2021-10-10T18:13:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christoph](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@Christoph](https://forum.opennebula.io/u/Christoph)\
**Post date:** [October 10, 2021, 6:13pm UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/1 "2021-10-10T18:13:33Z")

</div>

Hello,

I have two questions about disk snapshots in OpenNebula:

1. Why can the “active snapshot” not be deleted? As far as I understand, the snapshot is just a copy of the virtual disk image with the latter being the version the VM is working on; why then is the snapshot file still needed if the user decides that he or she does not want to go back to that snapshot?

2. When doing a snap\_flatten, the file of the selected snapshot is moved to where the virtual disk image was before. But afterwards, the snapshot is still visible in “onevm show ”, though nothing can be done now with it because it was moved away. Is that how it is supposed to be?

Regards  
Christoph

---

<div class="post-metadata">

**Author:** ![Christoph](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@Christoph](https://forum.opennebula.io/u/Christoph)\
**Post date:** [October 12, 2021, 7:20am UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/2 "2021-10-12T07:20:35Z")

</div>

Honestly, I do not understand much about disk snapshots in opennebula. What is this whole parent-children hierarchy used for? I added some debug output in /var/lib/one/remotes/tm/shared/snap\_create and found out that the only parent of a snapshot is the VM virtual disk image, never another snapshot. And I cannot delete any of the snapshots, I either get “Cannot delete the active snapshot” or “Cannot delete snapshot with children”, even after adding ALLOW\_ORPHANS to the shared TM\_MAD definition in oned.conf, restarting OpenNebula, deleting the VM and the image, and then recreating recreating the disk image and the VM.

---

<div class="post-metadata">

**Author:** ![Christoph](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@Christoph](https://forum.opennebula.io/u/Christoph)\
**Post date:** [October 12, 2021, 8:51am UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/3 "2021-10-12T08:51:11Z")

</div>

And, when I do a snapshot from a persistent image, I can revert to it from Instances-\>VMs-\>${VMID}-\>Storage afterwards, but I cannot from Storage-\>Images-\>${IMAGE\_ID}-\>Snapshots, with error message “Snapshot is already the active one”. Why is this? It makes the snapshot completely useless if it is impossible to revert to it.

---

<div class="post-metadata">

**Author:** ![Githopp192](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/githopp192/32/7488_2.png) [@Githopp192](https://forum.opennebula.io/u/Githopp192)\
**Post date:** [October 19, 2021, 7:36am UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/4 "2021-10-19T07:36:17Z")

</div>

Hey Christoph … may be this is useful for you regarding question 1.

 ![ScreenShot207](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/2/27412616c063562132c0cf2ec7ca71b470ecddbe.jpeg)

---

<div class="post-metadata">

**Author:** ![Githopp192](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/githopp192/32/7488_2.png) [@Githopp192](https://forum.opennebula.io/u/Githopp192)\
**Post date:** [October 19, 2021, 7:36am UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/5 "2021-10-19T07:36:18Z")

</div>

& be careful when mixing **VM SNAPSHOT TOGETHER WITH DISK SNAPSHOTS**

---

<div class="post-metadata">

**Author:** ![JoanDellinger](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/joandellinger/32/7187_2.png) [@JoanDellinger](https://forum.opennebula.io/u/JoanDellinger)\
**Post date:** [October 21, 2021, 4:32pm UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/6 "2021-10-21T16:32:25Z")

</div>

What exactly could go wrong?

---

<div class="post-metadata">

**Author:** ![Githopp192](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/githopp192/32/7488_2.png) [@Githopp192](https://forum.opennebula.io/u/Githopp192)\
**Post date:** [November 16, 2021, 9:27am UTC](https://forum.opennebula.io/t/disk-snapshots-in-opennebula/10017/7 "2021-11-16T09:27:22Z")

</div>

once i did some tests reverting the disks snapshots and the tried to restore the VM State afterwards. This has failed for some reasons
