Virtual machine snapshots

Snapshots help to save the exact state of a guest VM for later use. At any point in time, you can easily revert to the previous required state even though you may have changed the guest VM. It's similar to the saved state but many states can be preserved.

A snapshot not only preserves the complete state of all the virtual disks that are attached to the guest machine but also stores a complete copy of the VM settings, including the hardware configuration in an XML text file. Thus, when you restore a snapshot, the VM settings are restored as well as all the configuration files are stored in the XML format, so it takes very little space to store all the information.

When a snapshot is taken while the VM is running, the memory state of the guest VM also gets saved in the snapshot and the snapshots stored in the local hard disk. As a result, when the execution resumes, the guest VM starts exactly from the same state as when the snapshot was taken.

You can take a snapshot of a VM by selecting a machine in the VirtualBox Manager and then clicking on the Snapshots button on the top-right corner.

Virtual machine snapshots

The list of snapshots looks empty except for the Current State item. Current State represents the "Now" point in the lifetime of the VM.

Taking, restoring, and deleting snapshots

You can take the snapshot of a guest VM that is either running, saved, or in the power-off state.

To take the snapshot, you either click on the Snapshots tab on the top-right corner of the VirtualBox Manager or right-click on the guest VM and select Take Snapshot. The following screen appears, where you will be asked to provide the name of the snapshot and the description. It's good practice to give a proper name and description then click on OK. Now, your snapshot is created with the snapshot name that you have provided. In this example, I have provided OEL Updated.

Taking, restoring, and deleting snapshots

To check the details of the snapshots, click on the VM. You can see the list of snapshots in the right-hand panel.

If you right-click on the snapshot, you can see options as shown in the following screenshot:

Taking, restoring, and deleting snapshots

The Restore Snapshot option helps you to go forward or backward in time. By selecting this option you will lose the current state of the VM, but you will be able to restore the VM to the exact state when you have taken the snapshot.

But if you don't want to lose your current state, take a new snapshot of the current VM before restoring the VM.

The Delete Snapshot option helps to delete the snapshots of the guest VM, which in turn frees up the disk space. You can also delete the snapshots while the VM is in a running state.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.82.4