LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2014, 04:59 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Rep: Reputation: Disabled
Clone and snapshot in the guest VM. What is the difference?


What is the difference between clone and snapshot in Ubuntu guest VM?
 
Old 05-05-2014, 03:15 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
Hi there,

Quote:
Originally Posted by AlexBB View Post
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
 
Old 05-05-2014, 07:28 AM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
I use Oracle Virtual Box Version 4.3.10 r 93012
 
Old 05-05-2014, 10:47 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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
 
Old 05-06-2014, 09:34 PM   #5
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Thank you, jefro.
 
Old 05-07-2014, 05:10 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Still a bit confusing but not sure I could have written it better.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between clone and create an image shangshangw Ubuntu 1 04-21-2013 01:02 AM
Snapshot & Clone on KVM benelux.j Linux - Virtualization and Cloud 3 12-03-2012 03:37 AM
How to get snapshot backup the KVM Virtual Guest ? splinux Linux - Virtualization and Cloud 0 06-30-2012 02:06 AM
Guest to Host message passing - guest's memory usage statistics & guest's IP address Prince_Pangeni Linux - Virtualization and Cloud 2 03-03-2012 04:06 AM
VMware snapshot with VMware tools loses network on restart (Host XP, Guest Fedora) John Fletcher Linux - General 12 10-18-2010 01:28 PM


All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration