Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

  1. #21
    Join Date
    Mar 2009
    Beans
    19

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Quote Originally Posted by sleeping View Post
    Is there a way to have a "tree" of snapshots instead of a "line" of snapshots? The way the VBox GUI presents it, it leads me to believe I can build a whole hierarchy of snapshots, but I can't find how. Here's an example of what I would want:

    Code:
    base ---> snap1 ---> snap2 ---> snap3
          |          |
          |          |
          |          --> snap2.1 --- snap2.2
          |
          |
          --> snap1.1 ---> snap1.2 ---> snap1.3
                                    |
                                    |
                                    --> snap1.3.1
    The Snapshots tab in the VBox gui displays the snapshots in a tree-like fashion, which makes it appear that such a tree is possible. When I'm at snap3, I would like to go back to snap2 and "fork" a new state to make snap2.1, then go back to base and "fork" yet another state to make snap1.1.
    As far as I know there is no way you can do this with VirtualBox. The snapshot feature of VirtualBox sucks. It does not allow you to move freely between the snapshots in your snapshot tree. Moreover, if you return one step backward, you will lost your current snapshot.

    You can do all of these (and even more) very easily in VMware.

    In my opinion, the snapshot feature of VirtualBox is far too bad compared to what the users expect it should be (and what it could be). Sadly, the developers have not made any move in improving the feature yet, despite the fact that many requests have already been sent to their support forum. It seems that they just ignore our opinions about this issue.

  2. #22
    Join Date
    Apr 2008
    Beans
    84

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Quote Originally Posted by glenn69 View Post
    I'm a bit confused about the terminology of the "state" of my computer being saved. If I install a new piece of software to a snapshot, will it be t here when I next open the snapshot or does it revert to before I installed the software? In other words, do I have to create a new snapshot sfter every piece of software is installed ?

    Thanks
    Look in your home directory (show hidden) .VirtualBox/Machines/whichever/blahblah.xml edit it with whatever and also change the states it saved last time ok... got me out of a state.

  3. #23
    Join Date
    Oct 2009
    Beans
    1

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Reading the user guide for VB I find it is not very clear in several areas from command line functions to taking snapshots. Today, I looked into snapshots and decided to write this simple, easy to understand guide:

    Prerequisites:

    Virtual Machine
    Initial Snapshot (optional, e.g week ago)
    Snapshot DAY 1 (e.g. 2 days ago)
    Snapshot DAY 2 (e.g. 1 day ago)
    Current state (changed today)

    Snapshot commands explained:

    1) REVERT TO CURRENT SNAPSHOT (Ctrl+Shift+R)

    This will discard changes in the "Current State" and go back to how the machine was in the LAST = MOST RECENT snapshot we've done, that is DAY 2.

    When to use this: e.g. You installed a crappy software and machine doesn't boot. So you want to go back. Result would be like if you would go to "Last Known Good Configuration" under Windows.

    2) DISCARD CURRENT SNAPSHOT AND STATE (Ctrl+Shift+B)

    This will discard changes in the "Current State" AND in "LAST = MOST RECENT snapshot" we've done, that is DAY 2 and it will go back to how it was on DAY 1.

    When to use this: A) You installed crappy software before you took Snapshot DAY 2. So you need to go to DAY 1. B) You decided to go back to ORIGINAL state of Virtual Machine (or to Initial Snapshot) and you don't need/want snapshots. Initial Snapshot is an option, you don't need it if you plan to revert to original state of virtual machine.

    3) DISCARD SNAPSHOT (Ctrl + Shift + D)

    This will be done without warning dialog! It will just delete the snapshot which is marked but keep the CURRENT STATE. The current state will have all changes up-to-date. If you want to delete all snapshots, you will have to do it to each of them. You can delete the snapshots in any order you like without effect on the current state.

    When to use this: e.g. When you are satisfied with the current system state or your work and you don't need to keep the old(er) snapshots because you don't want to go back. It's like if you delete old Windows System Restore profiles to make more space in Windows.

    ----
    Important note:

    If you have done snapshots and you want to go back to original virtual machine you must to it the way in point #2 above. (At least I haven't found any other way.) If you try to delete snapshot manually (in Windows Explorer), you won't be able to load the machine. If you try to delete the machine from Virtualbox GUI, it will tell you it can't unregister because it has snapshots attached to it.

    It is not possible to move snapshots between identical installations of same virtual machine because they have unique identifier in the file name.

    Some ideas ...

    However, it could be possible to copy snapshots between 2 computers with exactly identical virtual machines. If we create ONE snapshot AND take a copy of your virtual machine complete with that snapshot and copy it on a second computer (to possibly exact drive and location) and THEN we should be able exchange just the snapshot back and forth between computers and keep the whole virtual machine up-to-date. This remains a theory until somebody can prove. Perhaps, using Livemesh.com we could keep the virtual machines in sync that way. If we don't use Paging file in VM or it is deleted on machine shut-down, then the snapshot should be reasonably sized.

    Maybe sounds like a crazy idea, but perhaps it may work for a limited number of cases when required. For instance, we would need to sync the whole machine state, not just the files changed (which of course can be done using USB flash drive, as well as using a shared folder which is then synchronized using Livemesh.com). Expanding on this, perhaps this could be a good idea for Sun Virtualbox to incorporate into next version of VB 4.x

    Anyway I'm talking too much. Hope this guide helps.

  4. #24
    Join Date
    Mar 2006
    Location
    Oxford, OH, USA
    Beans
    1,002
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    So....


    You can only take a snapshot of a virtual machine when its shutdown? (i.e. not running)?

    - CH
    ________________________________
    DELL e6420 Laptop
    Ubuntu Pagolin Precise 12.04 LTS
    Linux Registered User #434330

  5. #25
    Join Date
    Apr 2008
    Beans
    10

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Quote Originally Posted by cement_head View Post
    So....


    You can only take a snapshot of a virtual machine when its shutdown? (i.e. not running)?

    - CH
    No, you can take a snapshot when the virtual machine is running (Machine > Take Snapshot...)

  6. #26
    Join Date
    Mar 2006
    Location
    The Netherlands
    Beans
    82

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Quote Originally Posted by sleeping View Post
    Is there a way to have a "tree" of snapshots instead of a "line" of snapshots? The way the VBox GUI presents it, it leads me to believe I can build a whole hierarchy of snapshots, but I can't find how. Here's an example of what I would want:

    Code:
    base ---> snap1 ---> snap2 ---> snap3
          |          |
          |          |
          |          --> snap2.1 --- snap2.2
          |
          |
          --> snap1.1 ---> snap1.2 ---> snap1.3
                                    |
                                    |
                                    --> snap1.3.1
    The Snapshots tab in the VBox gui displays the snapshots in a tree-like fashion, which makes it appear that such a tree is possible. When I'm at snap3, I would like to go back to snap2 and "fork" a new state to make snap2.1, then go back to base and "fork" yet another state to make snap1.1.

    VBox 3.1.0 provides just this. Snapshots are now on par with VMware Workststation.
    VBoxTool, VirtualBox automation tools: http://vboxtool.sourceforge.net/
    ufw2web, a web interface for ufw (Ubuntu Firewall): http://ufw2web.sourceforge.net/
    Frext, a replicator for Firebird databases: http://frext.sourceforge.net/

  7. #27
    Join Date
    Mar 2010
    Location
    Norway
    Beans
    22
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    @polocanada:

    Thank you for clearing that up! I've been afraid to mess with snapshots as they seem to revert my VM's unpredictably. I kind of still am. Talk about confusing command names in virtualbox! (Other than that, its a really great piece of software, of course!)


    @sehe:
    Now the sickening irony is that I have ruined a good number of VMs and I have still to figure out whether you are (a) plain wrong (b) what the heck you mean by 'top' or 'bottom'. Top could mean: top of the window, top of the tree (ironically, the 'trunk'), the top of the snapshot stack (in the LIFO sense of the word, so: the actual leaf-node or treetop to be completely confusing)... mirror that for bottom.

    It couldn't be more unclear. IMHO

    Seth
    I completely agree!

  8. #28
    Join Date
    May 2007
    Beans
    96
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Latest version of Sun VirtualBox 3.1 under desktop virtualization software came with some new features including Branched Snapshots. Here I explain how branched snapshots works in VirtualBox with examples.
    http://www.sysprobs.com/branched-snapshots-virtualbox

  9. #29
    Join Date
    Jan 2010
    Location
    Serbia,Belgrade
    Beans
    159
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    Quote Originally Posted by dccrens View Post
    Great howto. I also have had a lot of issues with snapshots and understanding how they work. I love VB but their snapshot terminology really sucks.

    I still don't understand what to select to incorporate the current "machine state" or snapshot as the "default".

    Let say I have my original default VDI (a basic install). I take a snapshot on say 03/20/08. I then install some software and take another snapshot on 03/21/08. I install some more software and take a snapshot on 03/23/08. Everything is working good so I want to keep the machine state as it is on 03/23/08 with all of the software and changes. If I just "leave" the snapshots and do nothing I will be ok BUT the other previous snapshots are taking up disk space. So, is there a way to get rid of them and make the "last" snapshot I took on 03/23/08 the "only" disk image/snapshot???
    Wow you have same icon as me
    Linux Ubuntu 9.10 32-bit
    2gb ram ddr3
    Intel(R)Pentium(R) Dual CPU E2200 2.2Ghz
    Ati HD3650

  10. #30
    Join Date
    Jul 2007
    Beans
    48
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: VirtualBox Snapshots. The Ins and Outs of Snapshots.

    OK, will try this without making reference to top or bottom.

    let's say you have the following tree:

    originalsnap -> snap1 -> snap2 -> current state

    Just forget for a moment about how this is accomplished in terms of disk images and focus on the end result. Pretend that each of these snapshots, including the "current state," is a full image of your disk some point in time (and memory, too, if the VM was powered up when you took the snapshot). Then it should be clear that you don't lose any of your recent work by deleting originalsnap or snap1. If you delete originalsnap, then you will simply never be able to revert back to that point in time. You have not lost any data, though, since you still have "current state" intact. You can delete the oldest one, or something from somewhere in the middle, without problem.

    If you delete the newest one, "current state," then you will lose all information since snap2. So don't go deleting things from the most recent end of the tree unless you really mean to.

    It does get confusing when you start to try to think about this in terms of what is happening to the .vdi files as you add and delete snapshots, and how the contents are merged. My advice is not to worry about it.

    There are a couple of things that I haven't spelled out here, because I haven't tried them out myself.
    * I believe that the "current state" actually behaves differently than other snapshots. I think that if you revert to an older snapshot then your "current state" will actually be lost, even though you didn't explicitly choose to delete it. I don't know though, since I haven't tried it. The solution to this would be to take another snapshot to preserve the "current state" before reverting.
    * I believe it is also OK to delete "snap2" (most recent snapshot, just before "current state"), and that your current state would be retained in this case. But I have not tried this either.

Page 3 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •