How to take snapshot and restore a snapshot in VirtualBox 5.2.6

Sometimes you may want to take a snapshot of the current state of your virtual machine (in my case Ubuntu Linux) so that you can revert back to it if anything goes wrong in the virtual machine. The feature in VirtualBox which helps in this is called a snapshot.

A snapshot is basically a backup of your virtual machine in its current state.

Taking a Snapshot

To take a snapshot do the below

  1. Run the virtual machine from the Virtual machine Manager.
  2. Go to the Machine Menu option in the running instance of the Virtual Machine and click on Take Snapshot
  3. This will pop up a window asking for the name and the description of the snapshot.
  4. Give a suitable name and write some description so that you can identify in what state the virtual machine is at a later stage.

Now at a later stage when you want to go back to a snapshot because your current machine has got some problem or maybe you have made loads of upgrade in the current machine and something is not working:

  1. go back to your VirtualBox Manager.
  2. Click on the particular virtual machine you want to revert back

vm-manager

You can see two Options on the right hand pane 1. Details 2. Snapshots.

If this is how it looks it is easier to think what your next move is, i.e. to click on the Snapshots option and take it from there.

However, it maybe sometimes bit confusing particularly if the Details option was selected at a earlier time, the content on the right hand pane may look different. Lets see how that looks, click on the Details option and the right hand pane will look like this:

Details-vm-manager

In my Vitual Box this was the case and I was wondering how to go back to the Snapshot mode. Just click on close (x) icon on the Details button and you will see the right hand pane having both the options again. This sounds bit stupid but sometimes stupid things happen.

Ok going back to the original discussion about snapshot. Click on the Snapshots options as marked below:

Snapshots-vm-Manager

Once you click on the Snapshots option you will something like the below:

snapshots-hover

As you can see in the above picture there a snapshot which I had taken called Ubuntu 12.04 – Xtensa Tooclchain installed. This is presently under the Snapshot 1. The reason being I had to revert back to my original Snapshot before I wrote this blog. I had corrupted my original VM machine and once you revert back you loose the current state of the machine.

I will now take example of another running VM whose current state looks like the below:

Snapshot-frsh

Tere is already a snapshot taken on this VM. Now I will take another snapshot on this VM following the steps as described previously and it looks like this:

snapshot-recreate

As you can see a new snapshot has been created under Snapshot -1 and it is called “Example Snapshot – for demonstration“.

Lets Take couple of more Snapshots and it now looks like the below:

example-snapshot-3

Deleting a snapshot

To delete a snapshot follow the below steps:

Select the particular snapshot to be deleted, for example snapshot “Example Snapshot – 2” and click on the Delete Button above:

snapshot-delete

It will ask for a final confirmation, confirm delete (if you really want to delete – Don’t otherwise)

snapshot-delete-confirm

Once you confirm the deleted snapshot goes away from the list, the list now looks like:

snapshot-after-delete.png

Restoring a Snapshot

If you want to restore back to a particular snapshot in the snapshot list select the particular snapshot you want to revert to, for example we want to now get back to the snapshot “Example Snapshot – for demonstration”, so select it in the list and then click on the Restore button at the top:

snapshot-restore

Once you click on the Restore button it will ask for confirmation. In the confirmation there is a check box asking if you want to take a snapshot of the current state of the virtual machine, If you want to do that check this box, like in this example we have checked this box and now once the Restore confirmation button has been selected it is asking for the snapshot name (name for the snapshot of the current vm state before restoring to the original snapshot). Provide a name.

snapshot-restore-confirm

I gave a name like “Final VM State before Restoring”.

Now it looks like below:

final-after-snapshot-restore.png

As you can see the “Example Snapshot – for demonstration” is in bold faced as it has been restored back.

 

 

 

 

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s