VirtualBox

Opened 11 years ago

Closed 9 years ago

#11773 closed defect (fixed)

UserManual is wrong about deleting a snapshot

Reported by: asashnov Owned by:
Component: documentation Version: VirtualBox 4.2.12
Keywords: snapshot Cc:
Guest type: all Host type: all

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)
  1. Create "clean" snapshot right after VM creation wizard have finished.
  1. Run the virtual machine, do some experiment and turn off it (Start menu, Shutdown)
  1. 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)


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)




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)


That how it works in VirtualBox 4.2.

Change History (2)

comment:1 by aeichner, 11 years ago

Thanks for the information. Updating the documentation slipped through when backporting the change to 4.2. The merge direction of snapshots is based on the image size of the images to be merged. So it can merge either forward or backward in most cases. One exception is merging the first snapshot into the base image which will always be a backward merge to keep the base image. We will update the manual accordingly.

comment:2 by Frank Mehnert, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette