3 Starting out with VirtualBox

Once you have set up the machine the way you want it, simply take a snapshot, and should anything happen to the installation, you can simply revert to its snapshot state.

To take a snapshot of your VM, perform the following steps:

1.If your VM is currently in either the “saved” or the “powered off” state (as dis- played next to the VM in the VirtualBox main window), click on the “Snapshots” tab on the top right of the main window, and then on the small camera icon (for “Take snapshot”).

If your VM is currently running, select “Take snapshot” from the “Machine” pull- down menu of the VM window.

2.A window will pop up and ask you to name the snapshot. This name is purely for reference purposes to help you remember the state of the snapshot. For example, a useful name would be “Fresh installation from scratch, no external drivers”.

3.Your new snapshot will then appear in the list of snapshots under the “Snapshots” tab. Underneath, you will see an item called “Current state”, signifying that the current state of your VM is a variation based on the snapshot you took earlier.

(If you later take another snapshot, you will see that they will be displayed in sequence, and each subsequent snapshot is a derivation of the earlier one.)

To revert to an earlier snapshot, you right-click on the “Current state” item and select “Revert to current snapshot”. This will bring the VM back to the state of the nearest (most recent) snapshot. Similarly, you can merge several earlier snapshots into one by right-clicking on a snapshot and selecting “Discard snapshot”.

Note: The snapshot reverted to will affect the virtual hard drives that are connected to your VM, as the entire state of the virtual hard drive will be reverted as well. This means also that all files that have been created since the snapshot and all other file changes will be lost. In order to prevent such data loss while still making use of the snapshot feature, it is possible to add a second hard drive in “write-through” mode using the VBoxManage interface and use it to store your data. As write-through hard drives are not included in snapshots, they remain unaltered when a machine is reverted. See chapter 5.3, Configuring image write operations, page 78 for details.

3.5 The Virtual Disk Manager

VirtualBox keeps an internal registry of all available hard disk, CD/DVD-ROM and floppy disk images. This registry can be viewed and changed in the Virtual Disk Manager, which you can access from the “File” menu in the VirtualBox main window:

43

Page 43
Image 43
Sun Microsystems 3.0.0 user manual Virtual Disk Manager, Starting out with VirtualBox