[comments inline, below]

On 6 November 2012 14:27, John A. Wallace <[email protected]> wrote:
> As I am setting up a new VM and making several and frequent changes, I end
> up making a number of snapshots along the way, especially when it is a
> server to which I am adding features incrementally and assessing effects,
> etc.. Eventually, I get to a stable state, one which is not likely to be
> changed much, if any, indefinitely, and I make a snapshot of the current
> condition. At this point it would be good to get rid of some of the interim
> snapshots in order to recover disk space. What is the right way (best
> practices) to eliminate these middle snapshots or, say, all of the preceding
> snapshots except possibly the very first one and very last one in the
> sequence?

If you intend to eventually delete all snapshots, then deleting from
the top tends to minimise total disk IO.
If you intend to leave some snapshots (as you do), then delete from
the bottom up towards those you will keep.

Deleting the topmost snapshot (so I understand) is a 'backwards merge'
: the topmost differencing disk is merged into the base hard disk.
Deleting a snapshot other than the topmost is a 'forwards merge' : the
differencing disk is merged into the following differencing disk
(which might be for the "Current State").

A post here: https://forums.virtualbox.org/viewtopic.php?p=29269, has
some information.
The description there is still accurate, but, terminology has changed
a bit (now "Delete" rather than the older "Discard").

An example, imagine 4 snapshots.
There will be 5 VDI files:, the main base VDI, which is frozen
(readonly) and represents snapshot T (top). Then 3 differencing VDIs
for snapshots M1, M2 and M3 (middle).  Then a final differencing VDI
for the "Current State".
You intend to delete the two middle snapshots, leaving the last (M3)
and the first (T).
Suppose Then 3 differencing VDIs for snapshots M1, M2 and M3 are each
1GB in size.
If snapshot M1 is deleted first, its 1GB differencing disk is forward
merged into that for snapshot M2, giving 1GB of data processed, and
snapshot M2 is now 2GB.
Repeat by deleting snapshot M2, and its 2GB is merged forward into snapshot M3.
Total data merged forward 3GB.  Each merge forward has to re-handle
the data carried from the previous snapshots. In a chain of snapshots,
the data from the (other than very very top-most) top snapshots is
repeatedly re-copied forward, duplicating effort.

If instead snapshot M2 is deleted first, its 1GB is merged into M3,
then M1 is merged forward into M3.
Total data merged forwards 2GB.  No double handling.

(At least that is the theory, if I have it right.)

At all times make sure you have free space on the host drive.
If you run out of space during a snapshot delete, likely bad things
will happen to your VM!
I recommend as much free space as the total of the base VDI and the
differencing VDIs at all times (check before each snapshot delete).

> Moreover, I would just as soon remove as many as I can at one
> time, if possible, using the “vboxmanage.exe” tool.

They can only be dealt with one at a time, AFAIK.

--
Mark

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
VBox-users-community mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vbox-users-community
_______________________________________________
Unsubscribe:  
mailto:[email protected]?subject=unsubscribe

Reply via email to