1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="snapshots-take-restore-delete">
<title>Taking, Restoring, and Deleting Snapshots</title>
<body>
<p>
There are three operations related to snapshots, as follows:
</p>
<ol>
<li>
<p>
<b outputclass="bold">Take a snapshot.</b> This makes
a copy of the machine's current state, to which you can go
back at any given time later.
</p>
<ul>
<li>
<p>
If your VM is running:
</p>
<p>
Select <b outputclass="bold">Take Snapshot</b>
from the <b outputclass="bold">Machine</b> menu
in the VM window.
</p>
<p>
The VM is paused while the snapshot is being created.
After snapshot creation, the VM continues to run as
normal.
</p>
</li>
<li>
<p>
If your VM is in either the Saved or the Powered Off
state, as displayed next to the VM name in the machine
list:
</p>
<p>
Display the Snapshots window and do one of the
following:
</p>
<ul>
<li>
<p>
Click <b outputclass="bold">Take</b> in the
Snapshots window toolbar.
</p>
</li>
<li>
<p>
Right-click on the <b outputclass="bold">Current
State </b>item in the list and select
<b outputclass="bold">Take</b>.
</p>
</li>
</ul>
</li>
</ul>
<p>
A dialog is displayed, prompting you for a snapshot name.
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 Guest
Additions", or "Service Pack 3 just installed". You can also
add a longer text description in the
<b outputclass="bold">Snapshot Description</b> field.
</p>
<p>
Your new snapshot will then appear in the snapshots list.
Underneath your new snapshot, you will see an item called
<b outputclass="bold">Current State</b>, 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 are displayed in sequence,
and that each subsequent snapshot is derived from an earlier
one.
</p>
<fig id="fig-snapshots-list">
<title>Snapshots List For a Virtual Machine</title>
<xref href="images/snapshots-2.png" format="png" platform="htmlhelp">
<image href="images/snapshots-2.png" width="10cm" placement="break">
<alt>Snapshots List For a Virtual Machine</alt>
</image>
</xref>
<image platform="ohc" href="images/snapshots-2.png" width="10cm" placement="break">
<alt>Snapshots List For a Virtual Machine</alt>
</image>
</fig>
<p>
Oracle VM VirtualBox imposes no limits on the number of snapshots
you can take. The only practical limitation is disk space on
your host. Each snapshot stores the state of the virtual
machine and thus occupies some disk space. See
<xref href="snapshots-contents.dita#snapshots-contents"/> for details on what is
stored in a snapshot.
</p>
</li>
<li>
<p>
<b outputclass="bold">Restore a snapshot.</b> In the
Snapshots window, select the snapshot you have taken and
click <b outputclass="bold">Restore</b> in the
toolbar. By restoring a snapshot, you go back or forward in
time. The current state of the machine is lost, and the
machine is restored to the exact state it was in when the
snapshot was taken.
</p>
<note>
<p>
Restoring a snapshot 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 <i>will be
lost. </i>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
<i>write-through</i> mode using the
<userinput>VBoxManage</userinput> interface and use it to
store your data. As write-through hard drives are
<i>not</i> included in snapshots, they
remain unaltered when a machine is reverted. See
<xref href="hdimagewrites.dita#hdimagewrites"/>.
</p>
</note>
<p>
To avoid losing the current state when restoring a snapshot,
you can create a new snapshot before the restore operation.
</p>
<p>
By restoring an earlier snapshot and taking more snapshots
from there, it is even possible to create a kind of
alternate reality and to switch between these different
histories of the virtual machine. This can result in a whole
tree of virtual machine snapshots.
</p>
</li>
<li>
<p>
<b outputclass="bold">Delete a snapshot.</b> This
does not affect the state of the virtual machine, but only
releases the files on disk that Oracle VM VirtualBox used to store
the snapshot data, thus freeing disk space. To delete a
snapshot, select the snapshot name in the Snapshots window
and click <b outputclass="bold">Delete</b> in the
toolbar. Snapshots can be deleted even while a machine is
running.
</p>
<note>
<p>
Whereas taking and restoring snapshots are fairly quick
operations, deleting a snapshot can take a considerable
amount of time since large amounts of data may need to be
copied between several disk image files. Temporary disk
files may also need large amounts of disk space while the
operation is in progress.
</p>
</note>
<p>
There are some situations which cannot be handled while a VM
is running, and you will get an appropriate message that you
need to perform this snapshot deletion when the VM is shut
down.
</p>
</li>
</ol>
</body>
</topic>
|