Hi!
I have an issue with the terminology regarding snapshots, specifically Deleting and merging (I am using VB 4.1.6).
1. So, assume I have a VM with the original vdi hard-disk
2. I now create a snapshot from the original disk (snapshot A), and I install some programs, creates some files etc.
3. From there I go on and make snapshot B, and install some more programs and so on. At this stage B is dependent of A.
Now, if I decide that I am not interested in snapshot B at all (it may have messed up my installation, common issue if you deal with alpha and beta releases), and I want to get rid of it totally and only have the original vdi and snapshot A left for this VM. What do I do: it seems that if I use the VB UI, and choose Delete of that snapshot, it merges the B snapshot into A - and that is not what I want.
Am I missing something here, or are there no real way to delete a snapshot???
Thanks!
Niels
Deleting Snapshots
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Deleting Snapshots
Lets get the terminology right first, because your thinking is wrong. "Snapshot A" refers to the base VM (including the base VDI) which was frozen when you made the first snapshot [ i.e. snapshot == photograph == a moment frozen in time ]. The snapshot represents the ability to revert to that moment in time. If you delete a snapshot then you don't lose any data, but you do lose the potential to revert to that moment in time. If you actually want to lose data then you use "Restore", not "Delete".
So, after creating snapshot A, in addition to the frozen snapshot there will have been a current state item representing the "now" or "live" VM. When you take another snapshot that old current state is frozen, becoming "Snapshot B". And there will be a new current state. At this point the list will show Snapshot A (==base), then Snapshot B (which depends on A), and the current state (which depends on both A and B).
Note that everything you change inside the VM after the creation of snapshot B goes into the current state, not into snapshot B.
Ok, you say you want to discard everything you did after creating snapshot B, in which case you just select snapshot B and choose "Restore". By restoring to an earlier time the implication is that you want to discard the current state. You'll be asked if you want to take a new snapshot first (to avoid losing data from the current state) - but you answer no, hence shortly thereafter you will have a new and empty current state.
At this point you can highlight snapshot B and delete it. This removes the ability to revert to that moment in time, and in effect takes you back to just before you took snapshot B, i.e. all the data from snapshot B is still there in the current state (because deleting a snapshot does not delete data), but the data is no longer frozen.
Repeat as necessary: click on Snapshot A and select "Restore" - all the changes since snapshot A are lost (current state is now empty again). Delete snapshot A and you will be left with only the current state, which is exactly what you had before the first snapshot was created.
So, after creating snapshot A, in addition to the frozen snapshot there will have been a current state item representing the "now" or "live" VM. When you take another snapshot that old current state is frozen, becoming "Snapshot B". And there will be a new current state. At this point the list will show Snapshot A (==base), then Snapshot B (which depends on A), and the current state (which depends on both A and B).
Note that everything you change inside the VM after the creation of snapshot B goes into the current state, not into snapshot B.
Ok, you say you want to discard everything you did after creating snapshot B, in which case you just select snapshot B and choose "Restore". By restoring to an earlier time the implication is that you want to discard the current state. You'll be asked if you want to take a new snapshot first (to avoid losing data from the current state) - but you answer no, hence shortly thereafter you will have a new and empty current state.
At this point you can highlight snapshot B and delete it. This removes the ability to revert to that moment in time, and in effect takes you back to just before you took snapshot B, i.e. all the data from snapshot B is still there in the current state (because deleting a snapshot does not delete data), but the data is no longer frozen.
Repeat as necessary: click on Snapshot A and select "Restore" - all the changes since snapshot A are lost (current state is now empty again). Delete snapshot A and you will be left with only the current state, which is exactly what you had before the first snapshot was created.
Re: Deleting Snapshots
mpack - thanks so much for the clarifications. When I get time I will test this out, so I get things straight.
Niels
Niels