LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Clone and snapshot in the guest VM. What is the difference? (https://www.linuxquestions.org/questions/linux-newbie-8/clone-and-snapshot-in-the-guest-vm-what-is-the-difference-4175503927/)

AlexBB 05-04-2014 03:59 PM

Clone and snapshot in the guest VM. What is the difference?
 
What is the difference between clone and snapshot in Ubuntu guest VM?

Doc CPU 05-05-2014 02:15 AM

Hi there,

Quote:

Originally Posted by AlexBB (Post 5164568)
What is the difference between clone and snapshot in Ubuntu guest VM?

I don't know what virtualization software you're using - but then I guess they're not very different about this.

A snapshot is exactly what the name suggests: It captures the VM's current state, so that you can roll it back later and restore the state it had when the snapshot was taken. A snapshot is usually based on the data being maintained in the VM, so it can't be isolated from the rest.

A clone is a complete copy of a VM that you can fully detach from the original to spawn a new VM from that point, even take it to a different PC.

[X] Doc CPU

AlexBB 05-05-2014 06:28 AM

I use Oracle Virtual Box Version 4.3.10 r 93012

jefro 05-05-2014 09:47 PM

From the manual.

"1.10.2. Snapshot contents

Think of a snapshot as a point in time that you have preserved. More formally, a snapshot consists of three things:

It contains a complete copy of the VM settings, including the hardware configuration, so that when you restore a snapshot, the VM settings are restored as well. (For example, if you changed the hard disk configuration or the VM's system settings, that change is undone when you restore the snapshot.)

The copy of the settings is stored in the machine configuration, an XML text file, and thus occupies very little space.

The complete state of all the virtual disks attached to the machine is preserved. Going back to a snapshot means that all changes that had been made to the machine's disks -- file by file, bit by bit -- will be undone as well. Files that were since created will disappear, files that were deleted will be restored, changes to files will be reverted.

(Strictly speaking, this is only true for virtual hard disks in "normal" mode. As mentioned above, you can configure disks to behave differently with snapshots; see Section 5.4, “Special image write modes”. Even more formally and technically correct, it is not the virtual disk itself that is restored when a snapshot is restored. Instead, when a snapshot is taken, VirtualBox creates differencing images which contain only the changes since the snapshot were taken, and when the snapshot is restored, VirtualBox throws away that differencing image, thus going back to the previous state. This is both faster and uses less disk space. For the details, which can be complex, please see Section 5.5, “Differencing images”.)

Creating the differencing image as such does not occupy much space on the host disk initially, since the differencing image will initially be empty (and grow dynamically later with each write operation to the disk). The longer you use the machine after having created the snapshot, however, the more the differencing image will grow in size.

Finally, if you took a snapshot while the machine was running, the memory state of the machine is also saved in the snapshot (the same way the memory can be saved when you close the VM window). When you restore such a snapshot, execution resumes at exactly the point when the snapshot was taken.

The memory state file can be as large as the memory size of the virtual machine and will therefore occupy quite some disk space as well."

https://www.virtualbox.org/manual/ch01.html#snapshots

AlexBB 05-06-2014 08:34 PM

Thank you, jefro.

jefro 05-07-2014 04:10 PM

Still a bit confusing but not sure I could have written it better.


All times are GMT -5. The time now is 03:12 AM.