Safely delete nested snapshots

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
magi.forums
Posts: 2
Joined: 17. Sep 2020, 18:35

Safely delete nested snapshots

Post by magi.forums »

Hi,
I read a number of posts with the same subject but actually I'm too scared to make mistakes and broke my VM.
My VM has a number of snapshots, so many that the VirtualBox VMs is 114GB while the VM is 40GB.
Yes, I know I made a mistake at the beginning by taking so many snaps, I won't do it again, lesson learned!
My nested snapshots

Code: Select all

+ Snapshot 1
   |
    +-- Snapshot 2       
        |
        +-- Snapshot 3         
               |
              +--Snapshot 4 
                  |
                  +-- Snapshot 5  // broken
                       |
                       +-- Current state // restored from Snapshot 4 
I'd like to know if
1) it is safe to delete snapshot 5;
2) it is safe to delete also snapshot 1,2,3;

Thank you for any help you could provide
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Safely delete nested snapshots

Post by mpack »

No need for fear. Just make a backup of the VM folder before you do anything else

In order to answer if it is safe to delete snapshot 5, I would need to know what "broken" means. What you musn't do is delete the file on the host outside of VirtualBox. Also: how could a current state be "restored from snapshot 4" when it's a child of snapshot 5? If it's a new branch from snapshot 4 then the diagram is incorrect.

p.s. I feel that the golden rule is: do not let the number of snapshots exceed 0. That's the only way I know to guarantee that you can't lose data to them.

An alternative to deleting snapshots, if the VM runs, is to clone the VM without preserving the snapshot structure (i.e. clone current state only). That gives you a pristine VM you can test. If it test ok you can delete the old VM. Bear in mind that cloning can cause Windows to need reactivation since from it's POV the image has been transferred to a new PC.
magi.forums
Posts: 2
Joined: 17. Sep 2020, 18:35

Re: Safely delete nested snapshots

Post by magi.forums »

In order to answer if it is safe to delete snapshot 5, I would need to know what "broken" means. What you musn't do is delete the file on the host outside of VirtualBox. Also: how could a current state be "restored from snapshot 4" when it's a child of snapshot 5? If it's a new branch from snapshot 4 then the diagram is incorrect.
I've got "current state" from restoring snapshot 4, the diagram was wrong you are rigth.
Now the diagram is https://ibb.co/LnQSSGb
So, as long I back up all the VMFolder, I do not risk to loose data. I try to delete the pre_samtols snap then.
p.s. I feel that the golden rule is: do not let the number of snapshots exceed 0. That's the only way I know to guarantee that you can't lose data to them.
I will do it from now on!! lesson learned
Post Reply