User manual is wrong about snapshot deletion

Bug #1175647 reported by Alexander Sashnov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
New
Undecided
Unassigned

Bug Description

UserManual.pdf wrong about deleting snapshot - data from deleted snapshot does not merges with parent.

Instead, data from deleted snapshot merges with all of its child snapshots.

Wrong information is located into UserManual.pdf:
-----------------------------------
5.5 Differencing images
......
If you later delete a snapshot in order to free disk space, for each disk attachment, one of the differencing images becomes obsolete. In this case, the differencing image of the disk attachment cannot simply be deleted. Instead, VirtualBox needs to look at each sector of the differencing image and needs to copy it back into its parent; this is alled “merging” images and can be a potentially lengthy process, epending on how large the differencing image is. It can also emporarily need a considerable amount of extra disk space, before the differencing image obsoleted by the merge operation is deleted.
-----------------------------------

What exactly wrong in text above:

VirtualBox needs to look at each sector of the differencing image and needs to copy it back into its parent.

I think it would be something like:

VirtualBox needs to look at each sector of the differencing image and needs to copy it forward into all of its children.

But really things are as follow. Imagine the situation:

1. Create new virtual machine with windows XP using existing VDI disk image (image of just installed system)

2. Create "clean" snapshot right after VM creation wizard have finished.

3. Run the virtual machine, do some experiment and turn off it (Start menu, Shutdown)

4. Right click to the "current state" and do "Take Snapshort", name it "after first experiment".

Now you will have following snapshots hierarchy:

(Hint: you can see size of snapshots in "Virtual Media Manager")

XP.vdi - normal VDI, attached to "clean" snapshot (1.2 Gb for ex.)
-- {234234} diff VDI, attached to "experiment 1" (for ex, 800 Mb)
----{423412} diff VDI, attached to "XP" (current state), 168 Kb

Question: what will happens if I delete "experiment 1" snapshot now?

According to the documentation (see quotation above) data from "experiment 1" will be merged to its parent- "clean" snapshot.

But it really merges to "current state" snapshot, so after delete we will get following snapshots hierarchy:

XP.vdi - normal VDI, attached to "clean" snapshot (1.2 Gb for ex.)
--{423412} diff VDI, attached to "XP" (current state, 802 Mb)

More more, if you had following hierarchy:

XP.vdi - normal VDI, attached to "clean" snapshot (1.2 Gb for ex.)
-- {234234} diff VDI, attached to "experiment 1" (for ex, 800 Mb)
---- {63453} diff VDI, attached to "experiment 2a " (for ex, 30 Mb)
---- {32344} diff VDI, attached to "experiment 2b " (for ex, 20 Mb)
------{423412} difference VDI, attached to "XP" (current state), 168 Kb

Question: what will happend if you delete "experiment 1" snapshot?

Of cause, it will _not_ be merged with parent "clean" image.

It will merged into _both_ "experiment 2a" and "experiment 2b":

XP.vdi - normal VDI, attached to "clean" snapshot (1.2 Gb for ex.)
-- {63453} diff VDI, attached to "experiment 2a " (for ex, 830 Mb)
-- {32344} diff VDI, attached to "experiment 2b " (for ex, 820 Mb)
----{423412} difference VDI, attached to "XP" (current state), 168 Kb

That how it works in VirtualBox 4.2.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: virtualbox 4.2.10-dfsg-0ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-19.29-generic 3.8.8
Uname: Linux 3.8.0-19-generic i686
ApportVersion: 2.9.2-0ubuntu8
Architecture: i386
Date: Thu May 2 21:44:37 2013
InstallationDate: Installed on 2013-05-02 (0 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130424)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: virtualbox
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alexander Sashnov (sashnov) wrote :
description: updated
description: updated
description: updated
summary: - UserManual.pdf wrong about deleting snapshot
+ Documentation about snapshot deletion is wrong
summary: - Documentation about snapshot deletion is wrong
+ User manual is wrong about snapshot deletion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.