Sun Microsystems VIRTUALBOX 3.0.0 User Manual

Page 79

Advertising
background image

5 Virtual storage

which VirtualBox creates automatically when the VM starts. The next time the
VM is started, the differencing image is reset so that every time the VM starts, its
immutable images have exactly the same content.

4

If the automatic discarding of the differencing image on VM startup does not fit
your needs, you can turn it off using the autoreset parameter of VBoxManage
modifyhd

; see chapter

8.15

,

VBoxManage modifyhd

, page

118

for details.

With respect to snapshots, the behavior of immutable images is identical to that
of “normal” images. When reverting to a snapshot taken of an immutable image,
its state will be fully reset to that of the snapshot.

As a result, as opposed to “normal” images, the same immutable image can be
used with several virtual machines without restrictions.

Normally, you would not create an immutable image, but instead create a
“normal” image first and then, when you deem its contents useful, later mark
it immutable using VBoxManage modifyhd; again, please see chapter

8.15

,

VBoxManage modifyhd

, page

118

. Alternatively, open an existing image in “im-

mutable” mode using VBoxManage openmedium; see chapter

8.12

,

VBoxMan-

age openmedium / closemedium

, page

116

.

3. Finally, write-through hard disks are like normal hard disks in that they fully

support read and write operations. However, their state is not saved when a
snapshot is taken, and not restored when a VM’s state is reverted.

To create a disk image in VDI format as “write-through”, use the VBoxManage
createhd

command; see chapter

8.14

,

VBoxManage createhd

, page

117

. To

mark an existing image as write-through, use VBoxManage modifyhd; see
chapter

8.15

,

VBoxManage modifyhd

, page

118

.

To illustrate the differences between the various types with respect to snapshots:

Assume you have installed your guest operating system in your VM, and you have
taken a snapshot. Imagine you have accidentally infected your VM with a virus and
would like to go back to the snapshot. With a normal hard disk image, you simply
revert the state of the VM, and the earlier state of your hard disk image will be restored
as well (and your virus infection will be undone). With an immutable hard disk,
irrespective of the snapshot, all it takes is to shut down and restart your VM, and the
virus infection will be discarded. With a write-through image however, you cannot
easily undo the virus infection by means of virtualization, but will have to disinfect
your virtual machine like a real computer.

Still, you might find write-though images useful if you want to preserve critical data

irrespective of snapshots, and since you can attach more than one image to a VM, you
may want to have one immutable for the operating system and one write-through for
your data files.

4

This behavior also changed with VirtualBox 2.2. Previously, the differencing images were discarded when

the VM session ended; now they are discarded every time the VM starts.

79

Advertising