This command is used to control snapshots from the command line. A snapshot consists of a complete copy of the virtual machine settings, copied at the time when the snapshot was taken, and optionally a virtual machine saved state file if the snapshot was taken while the machine was running. After a snapshot has been taken, VirtualBox creates differencing hard disk for each normal hard disk associated with the machine so that when a snapshot is restored, the contents of the virtual machine's virtual hard disks can be quickly reset by simply dropping the pre-existing differencing files.
VBoxManage snapshot <uuid|vmname> take <name> [--description <desc>] [--live] [--uniquename Number,Timestamp,Space,Force] | delete <uuid|snapname> | restore <uuid|snapname> | restorecurrent | edit <uuid|snapname>|--current [--name <name>] [--description <desc>] | list [--details|--machinereadable] showvminfo <uuid|snapname>
The take
operation takes a snapshot
of the current state of the virtual machine. You must supply a name for
the snapshot and can optionally supply a description. The new snapshot is
inserted into the snapshots tree as a child of the current snapshot and
then becomes the new current snapshot. The
--description
parameter allows to
describe the snapshot. If --live
is specified, the VM will not be stopped during the snapshot creation
(live snapshotting).
The delete
operation deletes a
snapshot (specified by name or by UUID). This can take a while to finish
since the differencing images associated with the snapshot might need to
be merged with their child differencing images.
The restore
operation will restore
the given snapshot (specified by name or by UUID) by resetting the virtual
machine's settings and current state to that of the snapshot. The previous
current state of the machine will be lost. After this, the given snapshot
becomes the new "current" snapshot so that subsequent snapshots are
inserted under the snapshot from which was restored.
The restorecurrent
operation is a
shortcut to restore the current snapshot (i.e. the snapshot from which the
current state is derived). This subcommand is equivalent to using the
"restore" subcommand with the name or UUID of the current snapshot, except
that it avoids the extra step of determining that name or UUID.
With the edit
operation, you can
change the name or description of an existing snapshot.
The list
operation shows all
snapshots of a virtual machine.
With the showvminfo
operation, you
can view the virtual machine settings that were stored with an existing
snapshot.