Page 1 of 2

How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 01:15
by ATheros
snapshots.png
snapshots.png (12.87 KiB) Viewed 4030 times
Suppose I want to delete and abandon the data for the "test ipv6" snapshot. How do I do that?
Suppose I want to delete and merge upward the "test ipv6" snapshot. Thus it will merge into 'OpenSSL and PyQT'. How do I do that?

This information is not in the manual.

Thank you.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 07:40
by socratis
ATheros wrote:Suppose I want to delete and abandon the data for the "test ipv6" snapshot. How do I do that?
It looks like your "Current State" is a child of "OpenSSL and PyQT" (as is the "test ipv6"). Simply select the "test ipv6" and click "Discard".

I'm not sure I understand your second question, it looks surprisingly similar to the first one. Could you elaborate?

Re: How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 13:27
by mpack
I think part of the confusion is that ATheros is clearly thinking of a snapshot as a container for data, when in fact it's just a marker. You can't merge markers, you can't abandon the data either because there is no data. If you no longer need the marker then you simply delete it.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 19:43
by ATheros
Simply select the "test ipv6" and click "Discard".
The discard button is greyed out. It's greyed out no matter what snapshot I select with any of my virtual machines.
I think part of the confusion is that ATheros is clearly thinking of a snapshot as a container for data, when in fact it's just a marker. You can't merge markers, you can't abandon the data either because there is no data.
Sure you can abandon the data: you simply delete the data that was "written" after the marker. The UI could disallow one to delete a marker if there are child markers further down. And "merging" the data into a parent marker would mean to remove the child marker.
If there was no data written after or associated with a snapshot then it wouldn't be possible to have multiple branches off of a single snapshot.
Also it doesn't make sense that one should be able to make conflicting changes in two child snapshots and then "simply delete" the marker or snapshot as you said; clearly they can't both be merged into the parent.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 19:46
by mpack
ATheros wrote:Sure you can abandon the data: you simply delete the data that was "written" after the marker.
That clearly isn't what you intended earlier. However if you feel like a fencing match then I'll leave you to it, since I'm not interested in that.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 22:15
by ATheros
mpack wrote:
ATheros wrote:Sure you can abandon the data: you simply delete the data that was "written" after the marker.
That clearly isn't what you intended earlier. However if you feel like a fencing match then I'll leave you to it, since I'm not interested in that.
I have no interest in fencing with you either; I was simply pointing out that something you said did not make sense to me and I tried to explain why. I am interested in learning how to use snapshotting and perhaps improving the interface so that more people, including myself, can take advantage of what is otherwise very good software.

So my questions remain. The 'test ipv6' snapshot contains 1.56 GB of data on my system.
How do I delete this diff?
How do I merge this diff into the parent?

If it is indeed the case that the 'discard' button should be clickable, I can pursue that further.

Thank You all

Re: How to merge up / merge down / abandon snapshot data?

Posted: 28. Apr 2014, 22:55
by ATheros
socratis wrote:
ATheros wrote:Suppose I want to delete and abandon the data for the "test ipv6" snapshot. How do I do that?
I'm not sure I understand your second question, it looks surprisingly similar to the first one. Could you elaborate?
Of course. As I understand it, 'test ipv6' is a diff off of the 'OpenSSL and PyQT' snapshot. Assuming that this is correct, how do I merge 'test ipv6' into its parent?
My first question is how to delete the diff and not merge it into anything.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 29. Apr 2014, 01:07
by mpack
You need to separate the function from the details of implementation. You are not on the devteam, so the implementation details are not your concern. As far as you are concerned, the snapshot history shows you a timeline with markers. The markers represent past states that you might want to return to. If you no longer need to return to a marked state then you can delete the marker. The only time you can't do that is if you have used branching timelines and one of the other branches might want to revert.

It's really very easy to understand - I don't know why some people insist on making it hard.

The only implementation detail that you do need to understand: snapshots are notoriously error prone. If I was you I would back up the VM folder before messing with it.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 29. Apr 2014, 08:14
by socratis
ATheros wrote:As I understand it, 'test ipv6' is a diff off of the 'OpenSSL and PyQT' snapshot. Assuming that this is correct, how do I merge 'test ipv6' into its parent?
You get rid of the parent. You discard the 'OpenSSL and PyQT' snapshot and you're left with 'test ipv6'.

As for not being able to discard snapshots; your VM is shutdown, right? Not running, paused, saved, sleeping, hibernating or gone for vacation, but completely and normally shutdown.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 29. Apr 2014, 21:05
by ATheros
socratis wrote:As for not being able to discard snapshots; your VM is shutdown, right? Not running, paused, saved, sleeping, hibernating or gone for vacation, but completely and normally shutdown.
Yes. I never use sleeping, hibernation, paused, or any other sort of state except for either running or completely shut down. And they're shut down.
snapshots.png
snapshots.png (44.47 KiB) Viewed 3948 times
mpack wrote:It's really very easy to understand - I don't know why some people insist on making it hard.
Perhaps it is difficult because the user interface and your explanation does not seem to match what VirtualBox actually does.
mpack wrote:you can't abandon the data either because there is no data
There is 1.56 GB of it.
mpack wrote:If you no longer need to return to a marked state then you can delete the marker.
except that that's not what is happening apparently, nor is it logical. There are diffs which may, or may not, be merged into either a different diff or a master disk image. If this, so far, is correct then your explanation is detrimental to our understanding. Your explanation does seem to match the user interface: we simply 'delete' the marker/snapshot. But then it is ambiguous what happens to the diff data.

I do not appreciate asking simple questions for help and being accused of fencing with you and being told what is and isn't my concern.

Are snapshots notoriously error prone because of user error? Or because of latent bugs in VirtualBox?

Re: How to merge up / merge down / abandon snapshot data?

Posted: 29. Apr 2014, 21:25
by noteirak
Let's try to make this a bit more informative.

Snapshots is a concept that sets a marker in time and save the state of the system at that marker, and allow you to go back to it if you ever want to. This is the theory.
The implementation is that for each new snapshot, a new diff disk file will be created, containing the info of what the parent disk file is. The parent disk file (which can be the base disk file or another snapshot) is frozen at that point.

When you revert to a snapshot, something always happen : you will loose the current status of the VM and go back to the state of the snapshot.
Technical side, two things can happen :
- The snapshot has no child: the diff disk is reseted, and all the data up to that point is lost.
- The snapshot has childs: the latest diff disk file is rested, but the snapshot diff disk file is not, since you must keep it to be able to advance to the next child.

When you delete a snapshot, regardless of child or not, the snapshot diff disk file will be merged with the parent disk file (be it the base or another diff). You will reclaim an unknown amount of space (it will depend how much new sectors were written to compared to the previous image) and you'll loose the ability to ever go back to that point of time.

To answer your original question and of how to get back 1.56GB of data - delete the snapshot.

Finally, the question about issues with snapshots : each time you take a snapshot, you increase several things :
- The complexity of the VM configuration
- The number of files required to run the VM
- The amount of space required for the VM
- The amount of maintenance work required for the VM
It's not about being error prone or buggy, it's about the increased probability of something going wrong. Each snapshot adds files, adds space taken, add work required. Be it a user error, technical error, hardware error, or software error, the more items you give, the more "chances" it can be broken.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 29. Apr 2014, 22:19
by mpack
Actually, in this context a snapshot is more than a diff image of a disk. There may be multiple disks involved, and the VM settings are also preserved.

And Atheros, whether you like hearing it or not, a big problem with this whole discussion is that you're asking for fine details when you don't yet understand the basics, though you probably believe otherwise. I've been trying to steer you towards a Eureka moment, but apparantly I'm wasting both our time, so I'm done here.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 30. Apr 2014, 09:02
by socratis
Let's try this again.

Scenario 1: Discard of 'test ipv6'
Select 'test ipv6'. Click "Discard Snapshot". Done. You're left with what you had when you created 'OpenSSL and PyQT'.

Scenario 2: Merge 'test ipv6' (i.e. get rid of 'OpenSSL and PyQT')
Your 'Current State' is based on 'OpenSSL and PyQT'. Select the 'test ipv6'. Click on "Restore Snapshot". The 'Current State' should be a child of 'test ipv6'. Now select 'OpenSSL and PyQT'. Click "Discard Snapshot". Done. You're left with what you had when you created 'test ipv6'.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 2. May 2014, 20:03
by ATheros
Excellent. Thank you socratis!
noteirak wrote:When you delete a snapshot, regardless of child or not, the snapshot diff disk file will be merged with the parent disk file (be it the base or another diff).
Just so that other readers know, this seems to be inaccurate.

socratis, the "Discard" button is greyed out when I select the 'test ipv6' snapshot. It's greyed out no matter what snapshot I select. I tried using the "Delete Snapshot" button instead; this seems to behave the way you are describing: the data is deleted, not merged. I'm using VirtualBox version 4.3.10 r93012 so perhaps they changed the verbage from what you are using. There is a bug however: it shouldn't display the warning message about merging the snapshot data; this message is wrong.
merged_data_warning.png
merged_data_warning.png (34.78 KiB) Viewed 3899 times
In reality, the snapshot will NOT be merged into one file if the snapshot has no children, it will simply be deleted and it won't be a lengthy process because no merge takes place. This was the source of my confusion. I'll fill out a bug report.

mpack, it would be best if you avoided answering technical support questions in the future as many of your answers even in this thread have proven inaccurate. If you weren't a moderator I would assume that you are a troll.

Re: How to merge up / merge down / abandon snapshot data?

Posted: 2. May 2014, 20:09
by loukingjr
ATheros wrote: mpack, it would be best if you avoided answering technical support questions in the future as many of your answers even in this thread have proven inaccurate. If you weren't a moderator I would assume that you are a troll.
you do know mpack can ban you permanently from the forum right?