1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
|
---|
4 | <chapter>
|
---|
5 | <title id="Introduction">First steps</title>
|
---|
6 |
|
---|
7 | <para>Welcome to $VBOX_PRODUCT!</para>
|
---|
8 |
|
---|
9 | <para>VirtualBox is a cross-platform virtualization application. What does
|
---|
10 | that mean? For one thing, it installs on your existing Intel or AMD-based
|
---|
11 | computers, whether they are running Windows, Mac, Linux or Solaris operating
|
---|
12 | systems. Secondly, it extends the capabilities of your existing computer so
|
---|
13 | that it can run multiple operating systems (inside multiple virtual
|
---|
14 | machines) at the same time. So, for example, you can run Windows and Linux
|
---|
15 | on your Mac, run Windows Server 2008 on your Linux server, run Linux on your
|
---|
16 | Windows PC, and so on, all alongside your existing applications. You can
|
---|
17 | install and run as many virtual machines as you like -- the only practical
|
---|
18 | limits are disk space and memory.</para>
|
---|
19 |
|
---|
20 | <para>VirtualBox is deceptively simple yet also very powerful. It can run
|
---|
21 | everywhere from small embedded systems or desktop class machines all the way
|
---|
22 | up to datacenter deployments and even Cloud environments.</para>
|
---|
23 |
|
---|
24 | <para>The following screenshot shows you how VirtualBox, installed on a Mac
|
---|
25 | computer, is running Windows 7 in a virtual machine window:</para>
|
---|
26 |
|
---|
27 | <para><mediaobject>
|
---|
28 | <imageobject>
|
---|
29 | <imagedata align="center" fileref="images/vm-vista-running.png"
|
---|
30 | width="14cm" />
|
---|
31 | </imageobject>
|
---|
32 | </mediaobject></para>
|
---|
33 |
|
---|
34 | <para>In this User Manual, we'll begin simply with a quick introduction to
|
---|
35 | virtualization and how to get your first virtual machine running with the
|
---|
36 | easy-to-use VirtualBox graphical user interface. Subsequent chapters will go
|
---|
37 | into much more detail covering more powerful tools and features, but
|
---|
38 | fortunately, it is not necessary to read the entire User Manual before you
|
---|
39 | can use VirtualBox.</para>
|
---|
40 |
|
---|
41 | <para>You can find a summary of VirtualBox's capabilities in <xref
|
---|
42 | linkend="features-overview" />. For existing VirtualBox users who just want
|
---|
43 | to see what's new in this release, there is a detailed list in <xref
|
---|
44 | linkend="ChangeLog" />.</para>
|
---|
45 |
|
---|
46 | <sect1>
|
---|
47 | <title>Why is virtualization useful?</title>
|
---|
48 |
|
---|
49 | <para>The techniques and features that VirtualBox provides are useful for
|
---|
50 | several scenarios:</para>
|
---|
51 |
|
---|
52 | <itemizedlist>
|
---|
53 | <listitem>
|
---|
54 | <para><emphasis role="bold">Running multiple operating systems
|
---|
55 | simultaneously.</emphasis> VirtualBox allows you to run more than one
|
---|
56 | operating system at a time. This way, you can run software written for
|
---|
57 | one operating system on another (for example, Windows software on
|
---|
58 | Linux or a Mac) without having to reboot to use it. Since you can
|
---|
59 | configure what kinds of "virtual" hardware should be presented to each
|
---|
60 | such operating system, you can install an old operating system such as
|
---|
61 | DOS or OS/2 even if your real computer's hardware is no longer
|
---|
62 | supported by that operating system.</para>
|
---|
63 | </listitem>
|
---|
64 |
|
---|
65 | <listitem>
|
---|
66 | <para><emphasis role="bold">Easier software installations.</emphasis>
|
---|
67 | Software vendors can use virtual machines to ship entire software
|
---|
68 | configurations. For example, installing a complete mail server
|
---|
69 | solution on a real machine can be a tedious task. With VirtualBox,
|
---|
70 | such a complex setup (then often called an "appliance") can be packed
|
---|
71 | into a virtual machine. Installing and running a mail server becomes
|
---|
72 | as easy as importing such an appliance into VirtualBox.</para>
|
---|
73 | </listitem>
|
---|
74 |
|
---|
75 | <listitem>
|
---|
76 | <para><emphasis role="bold">Testing and disaster recovery.</emphasis>
|
---|
77 | Once installed, a virtual machine and its virtual hard disks can be
|
---|
78 | considered a "container" that can be arbitrarily frozen, woken up,
|
---|
79 | copied, backed up, and transported between hosts.</para>
|
---|
80 |
|
---|
81 | <para>On top of that, with the use of another VirtualBox feature
|
---|
82 | called "snapshots", one can save a particular state of a virtual
|
---|
83 | machine and revert back to that state, if necessary. This way, one can
|
---|
84 | freely experiment with a computing environment. If something goes
|
---|
85 | wrong (e.g. after installing misbehaving software or infecting the
|
---|
86 | guest with a virus), one can easily switch back to a previous snapshot
|
---|
87 | and avoid the need of frequent backups and restores.</para>
|
---|
88 |
|
---|
89 | <para>Any number of snapshots can be created, allowing you to travel
|
---|
90 | back and forward in virtual machine time. You can delete snapshots
|
---|
91 | while a VM is running to reclaim disk space.</para>
|
---|
92 | </listitem>
|
---|
93 |
|
---|
94 | <listitem>
|
---|
95 | <para><emphasis role="bold">Infrastructure consolidation.</emphasis>
|
---|
96 | Virtualization can significantly reduce hardware and electricity
|
---|
97 | costs. Most of the time, computers today only use a fraction of their
|
---|
98 | potential power and run with low average system loads. A lot of
|
---|
99 | hardware resources as well as electricity is thereby wasted. So,
|
---|
100 | instead of running many such physical computers that are only
|
---|
101 | partially used, one can pack many virtual machines onto a few powerful
|
---|
102 | hosts and balance the loads between them.</para>
|
---|
103 | </listitem>
|
---|
104 | </itemizedlist>
|
---|
105 | </sect1>
|
---|
106 |
|
---|
107 | <sect1>
|
---|
108 | <title id="virtintro">Some terminology</title>
|
---|
109 |
|
---|
110 | <para>When dealing with virtualization (and also for understanding the
|
---|
111 | following chapters of this documentation), it helps to acquaint oneself
|
---|
112 | with a bit of crucial terminology, especially the following terms:</para>
|
---|
113 |
|
---|
114 | <glosslist>
|
---|
115 | <glossentry>
|
---|
116 | <glossterm>Host operating system (host OS).</glossterm>
|
---|
117 |
|
---|
118 | <glossdef>
|
---|
119 | <para>This is the operating system of the physical computer on which
|
---|
120 | VirtualBox was installed. There are versions of VirtualBox for
|
---|
121 | Windows, Mac OS X, Linux and Solaris hosts; for details, please see
|
---|
122 | <xref linkend="hostossupport" />.</para>
|
---|
123 |
|
---|
124 | <para>Most of the time, this User Manual discusses all VirtualBox
|
---|
125 | versions together. There may be platform-specific differences which
|
---|
126 | we will point out where appropriate.</para>
|
---|
127 | </glossdef>
|
---|
128 | </glossentry>
|
---|
129 |
|
---|
130 | <glossentry>
|
---|
131 | <glossterm>Guest operating system (guest OS).</glossterm>
|
---|
132 |
|
---|
133 | <glossdef>
|
---|
134 | <para>This is the operating system that is running inside the
|
---|
135 | virtual machine. Theoretically, VirtualBox can run any x86 operating
|
---|
136 | system (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve
|
---|
137 | near-native performance of the guest code on your machine, we had to
|
---|
138 | go through a lot of optimizations that are specific to certain
|
---|
139 | operating systems. So while your favorite operating system
|
---|
140 | <emphasis>may</emphasis> run as a guest, we officially support and
|
---|
141 | optimize for a select few (which, however, include the most common
|
---|
142 | ones).</para>
|
---|
143 |
|
---|
144 | <para>See <xref linkend="guestossupport" /> for details.</para>
|
---|
145 | </glossdef>
|
---|
146 | </glossentry>
|
---|
147 |
|
---|
148 | <glossentry>
|
---|
149 | <glossterm>Virtual machine (VM).</glossterm>
|
---|
150 |
|
---|
151 | <glossdef>
|
---|
152 | <para>This is the special environment that VirtualBox creates for
|
---|
153 | your guest operating system while it is running. In other words, you
|
---|
154 | run your guest operating system "in" a VM. Normally, a VM will be
|
---|
155 | shown as a window on your computer's desktop, but depending on which
|
---|
156 | of the various frontends of VirtualBox you use, it can be displayed
|
---|
157 | in full-screen mode or remotely on another computer.</para>
|
---|
158 |
|
---|
159 | <para>In a more abstract way, internally, VirtualBox thinks of a VM
|
---|
160 | as a set of parameters that determine its behavior. They include
|
---|
161 | hardware settings (how much memory the VM should have, what hard
|
---|
162 | disks VirtualBox should virtualize through which container files,
|
---|
163 | what CDs are mounted etc.) as well as state information (whether the
|
---|
164 | VM is currently running, saved, its snapshots etc.). These settings
|
---|
165 | are mirrored in the VirtualBox Manager window as well as the
|
---|
166 | <computeroutput>VBoxManage</computeroutput> command line program;
|
---|
167 | see <xref linkend="vboxmanage" />. In other words, a VM is also what
|
---|
168 | you can see in its settings dialog.</para>
|
---|
169 | </glossdef>
|
---|
170 | </glossentry>
|
---|
171 |
|
---|
172 | <glossentry>
|
---|
173 | <glossterm>Guest Additions.</glossterm>
|
---|
174 |
|
---|
175 | <glossdef>
|
---|
176 | <para>This refers to special software packages which are shipped
|
---|
177 | with VirtualBox but designed to be installed
|
---|
178 | <emphasis>inside</emphasis> a VM to improve performance of the guest
|
---|
179 | OS and to add extra features. This is described in detail in <xref
|
---|
180 | linkend="guestadditions" />.</para>
|
---|
181 | </glossdef>
|
---|
182 | </glossentry>
|
---|
183 | </glosslist>
|
---|
184 | </sect1>
|
---|
185 |
|
---|
186 | <sect1 id="features-overview">
|
---|
187 | <title>Features overview</title>
|
---|
188 |
|
---|
189 | <para>Here's a brief outline of VirtualBox's main features:</para>
|
---|
190 |
|
---|
191 | <itemizedlist>
|
---|
192 | <listitem>
|
---|
193 | <para><emphasis role="bold">Portability.</emphasis> VirtualBox runs on
|
---|
194 | a large number of 32-bit and 64-bit host operating systems (again, see
|
---|
195 | <xref linkend="hostossupport" /> for details).</para>
|
---|
196 |
|
---|
197 | <para>VirtualBox is a so-called "hosted" hypervisor (sometimes
|
---|
198 | referred to as a "type 2" hypervisor). Whereas a "bare-metal" or "type
|
---|
199 | 1" hypervisor would run directly on the hardware, VirtualBox requires
|
---|
200 | an existing operating system to be installed. It can thus run
|
---|
201 | alongside existing applications on that host.</para>
|
---|
202 |
|
---|
203 | <para>To a very large degree, VirtualBox is functionally identical on
|
---|
204 | all of the host platforms, and the same file and image formats are
|
---|
205 | used. This allows you to run virtual machines created on one host on
|
---|
206 | another host with a different host operating system; for example, you
|
---|
207 | can create a virtual machine on Windows and then run it under
|
---|
208 | Linux.</para>
|
---|
209 |
|
---|
210 | <para>In addition, virtual machines can easily be imported and
|
---|
211 | exported using the Open Virtualization Format (OVF, see <xref
|
---|
212 | linkend="ovf" />), an industry standard created for this purpose. You
|
---|
213 | can even import OVFs that were created with a different virtualization
|
---|
214 | software.</para>
|
---|
215 | </listitem>
|
---|
216 |
|
---|
217 | <listitem>
|
---|
218 | <para><emphasis role="bold">No hardware virtualization
|
---|
219 | required.</emphasis> For many scenarios, VirtualBox does not require
|
---|
220 | the processor features built into newer hardware like Intel VT-x or
|
---|
221 | AMD-V. As opposed to many other virtualization solutions, you can
|
---|
222 | therefore use VirtualBox even on older hardware where these features
|
---|
223 | are not present. The technical details are explained in <xref
|
---|
224 | linkend="hwvirt" />.</para>
|
---|
225 | </listitem>
|
---|
226 |
|
---|
227 | <listitem>
|
---|
228 | <para><emphasis role="bold">Guest Additions: shared folders, seamless
|
---|
229 | windows, 3D virtualization.</emphasis> The VirtualBox Guest Additions
|
---|
230 | are software packages which can be installed
|
---|
231 | <emphasis>inside</emphasis> of supported guest systems to improve
|
---|
232 | their performance and to provide additional integration and
|
---|
233 | communication with the host system. After installing the Guest
|
---|
234 | Additions, a virtual machine will support automatic adjustment of
|
---|
235 | video resolutions, seamless windows, accelerated 3D graphics and more.
|
---|
236 | The Guest Additions are described in detail in <xref
|
---|
237 | linkend="guestadditions" />.</para>
|
---|
238 |
|
---|
239 | <para>In particular, Guest Additions provide for "shared folders",
|
---|
240 | which let you access files from the host system from within a guest
|
---|
241 | machine. Shared folders are described in <xref
|
---|
242 | linkend="sharedfolders" />.</para>
|
---|
243 | </listitem>
|
---|
244 |
|
---|
245 | <listitem>
|
---|
246 | <para><emphasis role="bold">Great hardware support.</emphasis> Among
|
---|
247 | others, VirtualBox supports:</para>
|
---|
248 |
|
---|
249 | <itemizedlist>
|
---|
250 | <listitem>
|
---|
251 | <para><emphasis role="bold">Guest multiprocessing
|
---|
252 | (SMP).</emphasis> VirtualBox can present up to 32 virtual CPUs to
|
---|
253 | each virtual machine, irrespective of how many CPU cores are
|
---|
254 | physically present on your host.</para>
|
---|
255 | </listitem>
|
---|
256 |
|
---|
257 | <listitem>
|
---|
258 | <para><emphasis role="bold">USB device support.</emphasis>
|
---|
259 | VirtualBox implements a virtual USB controller and allows you to
|
---|
260 | connect arbitrary USB devices to your virtual machines without
|
---|
261 | having to install device-specific drivers on the host. USB support
|
---|
262 | is not limited to certain device categories. For details, see
|
---|
263 | <xref linkend="settings-usb" />.</para>
|
---|
264 | </listitem>
|
---|
265 |
|
---|
266 | <listitem>
|
---|
267 | <para><emphasis role="bold">Hardware compatibility.</emphasis>
|
---|
268 | VirtualBox virtualizes a vast array of virtual devices, among them
|
---|
269 | many devices that are typically provided by other virtualization
|
---|
270 | platforms. That includes IDE, SCSI and SATA hard disk controllers,
|
---|
271 | several virtual network cards and sound cards, virtual serial and
|
---|
272 | parallel ports and an Input/Output Advanced Programmable Interrupt
|
---|
273 | Controller (I/O APIC), which is found in many modern PC systems.
|
---|
274 | This eases cloning of PC images from real machines and importing
|
---|
275 | of third-party virtual machines into VirtualBox.</para>
|
---|
276 | </listitem>
|
---|
277 |
|
---|
278 | <listitem>
|
---|
279 | <para><emphasis role="bold">Full ACPI support.</emphasis> The
|
---|
280 | Advanced Configuration and Power Interface (ACPI) is fully
|
---|
281 | supported by VirtualBox. This eases cloning of PC images from real
|
---|
282 | machines or third-party virtual machines into VirtualBox. With its
|
---|
283 | unique <emphasis role="bold">ACPI power status support,</emphasis>
|
---|
284 | VirtualBox can even report to ACPI-aware guest operating systems
|
---|
285 | the power status of the host. For mobile systems running on
|
---|
286 | battery, the guest can thus enable energy saving and notify the
|
---|
287 | user of the remaining power (e.g. in fullscreen modes).</para>
|
---|
288 | </listitem>
|
---|
289 |
|
---|
290 | <listitem>
|
---|
291 | <para><emphasis role="bold">Multiscreen resolutions.</emphasis>
|
---|
292 | VirtualBox virtual machines support screen resolutions many times
|
---|
293 | that of a physical screen, allowing them to be spread over a large
|
---|
294 | number of screens attached to the host system.</para>
|
---|
295 | </listitem>
|
---|
296 |
|
---|
297 | <listitem>
|
---|
298 | <para><emphasis role="bold">Built-in iSCSI support.</emphasis>
|
---|
299 | This unique feature allows you to connect a virtual machine
|
---|
300 | directly to an iSCSI storage server without going through the host
|
---|
301 | system. The VM accesses the iSCSI target directly without the
|
---|
302 | extra overhead that is required for virtualizing hard disks in
|
---|
303 | container files. For details, see <xref
|
---|
304 | linkend="storage-iscsi" />.</para>
|
---|
305 | </listitem>
|
---|
306 |
|
---|
307 | <listitem>
|
---|
308 | <para><emphasis role="bold">PXE Network boot.</emphasis> The
|
---|
309 | integrated virtual network cards of VirtualBox fully support
|
---|
310 | remote booting via the Preboot Execution Environment (PXE).</para>
|
---|
311 | </listitem>
|
---|
312 | </itemizedlist>
|
---|
313 | </listitem>
|
---|
314 |
|
---|
315 | <listitem>
|
---|
316 | <para><emphasis role="bold">Multigeneration branched
|
---|
317 | snapshots.</emphasis> VirtualBox can save arbitrary snapshots of the
|
---|
318 | state of the virtual machine. You can go back in time and revert the
|
---|
319 | virtual machine to any such snapshot and start an alternative VM
|
---|
320 | configuration from there, effectively creating a whole snapshot tree.
|
---|
321 | For details, see <xref linkend="snapshots" />. You can create and
|
---|
322 | delete snapshots while the virtual machine is running.</para>
|
---|
323 | </listitem>
|
---|
324 |
|
---|
325 | <listitem>
|
---|
326 | <para><emphasis role="bold">Clean architecture; unprecedented
|
---|
327 | modularity.</emphasis> VirtualBox has an extremely modular design with
|
---|
328 | well-defined internal programming interfaces and a clean separation of
|
---|
329 | client and server code. This makes it easy to control it from several
|
---|
330 | interfaces at once: for example, you can start a VM simply by clicking
|
---|
331 | on a button in the VirtualBox graphical user interface and then
|
---|
332 | control that machine from the command line, or even remotely. See
|
---|
333 | <xref linkend="frontends" /> for details.</para>
|
---|
334 |
|
---|
335 | <para>Due to its modular architecture, VirtualBox can also expose its
|
---|
336 | full functionality and configurability through a comprehensive
|
---|
337 | <emphasis role="bold">software development kit (SDK),</emphasis> which
|
---|
338 | allows for integrating every aspect of VirtualBox with other software
|
---|
339 | systems. Please see <xref linkend="VirtualBoxAPI" /> for
|
---|
340 | details.</para>
|
---|
341 | </listitem>
|
---|
342 |
|
---|
343 | <listitem>
|
---|
344 | <para><emphasis role="bold">Remote machine display.</emphasis> The
|
---|
345 | VirtualBox Remote Desktop Extension (VRDE) allows for high-performance
|
---|
346 | remote access to any running virtual machine. This extension supports
|
---|
347 | the Remote Desktop Protocol (RDP) originally built into Microsoft
|
---|
348 | Windows, with special additions for full client USB support.</para>
|
---|
349 |
|
---|
350 | <para>The VRDE does not rely on the RDP server that is built into
|
---|
351 | Microsoft Windows; instead, it is plugged directly into the
|
---|
352 | virtualization layer. As a result, it works with guest operating
|
---|
353 | systems other than Windows (even in text mode) and does not require
|
---|
354 | application support in the virtual machine either. The VRDE is
|
---|
355 | described in detail in <xref linkend="vrde" />.</para>
|
---|
356 |
|
---|
357 | <para>On top of this special capacity, VirtualBox offers you more
|
---|
358 | unique features:<itemizedlist>
|
---|
359 | <listitem>
|
---|
360 | <para><emphasis role="bold">Extensible RDP
|
---|
361 | authentication.</emphasis> VirtualBox already supports Winlogon
|
---|
362 | on Windows and PAM on Linux for RDP authentication. In addition,
|
---|
363 | it includes an easy-to-use SDK which allows you to create
|
---|
364 | arbitrary interfaces for other methods of authentication; see
|
---|
365 | <xref linkend="vbox-auth" /> for details.</para>
|
---|
366 | </listitem>
|
---|
367 |
|
---|
368 | <listitem>
|
---|
369 | <para><emphasis role="bold">USB over RDP.</emphasis> Via RDP
|
---|
370 | virtual channel support, VirtualBox also allows you to connect
|
---|
371 | arbitrary USB devices locally to a virtual machine which is
|
---|
372 | running remotely on a VirtualBox RDP server; see <xref
|
---|
373 | linkend="usb-over-rdp" /> for details.</para>
|
---|
374 | </listitem>
|
---|
375 | </itemizedlist></para>
|
---|
376 | </listitem>
|
---|
377 | </itemizedlist>
|
---|
378 | </sect1>
|
---|
379 |
|
---|
380 | <sect1>
|
---|
381 | <title id="hostossupport">Supported host operating systems</title>
|
---|
382 |
|
---|
383 | <para>Currently, VirtualBox runs on the following host operating
|
---|
384 | systems:</para>
|
---|
385 |
|
---|
386 | <itemizedlist>
|
---|
387 | <listitem>
|
---|
388 | <para><emphasis role="bold">Windows</emphasis> hosts:<itemizedlist>
|
---|
389 | <listitem>
|
---|
390 | <para>Windows XP, all service packs (32-bit)</para>
|
---|
391 | </listitem>
|
---|
392 |
|
---|
393 | <listitem>
|
---|
394 | <para>Windows Server 2003 (32-bit)</para>
|
---|
395 | </listitem>
|
---|
396 |
|
---|
397 | <listitem>
|
---|
398 | <para>Windows Vista (32-bit and 64-bit<footnote>
|
---|
399 | <para>Support for 64-bit Windows was added with VirtualBox
|
---|
400 | 1.5.</para>
|
---|
401 | </footnote>).</para>
|
---|
402 | </listitem>
|
---|
403 |
|
---|
404 | <listitem>
|
---|
405 | <para>Windows Server 2008 (32-bit and 64-bit)</para>
|
---|
406 | </listitem>
|
---|
407 |
|
---|
408 | <listitem>
|
---|
409 | <para>Windows 7 (32-bit and 64-bit)</para>
|
---|
410 | </listitem>
|
---|
411 | </itemizedlist></para>
|
---|
412 | </listitem>
|
---|
413 |
|
---|
414 | <listitem>
|
---|
415 | <para><emphasis role="bold">Mac OS X</emphasis> hosts:<footnote>
|
---|
416 | <para>Preliminary Mac OS X support (beta stage) was added with
|
---|
417 | VirtualBox 1.4, full support with 1.6. Mac OS X 10.4 (Tiger)
|
---|
418 | support was removed with VirtualBox 3.1.</para>
|
---|
419 | </footnote></para>
|
---|
420 |
|
---|
421 | <itemizedlist>
|
---|
422 | <listitem>
|
---|
423 | <para>10.5 (Leopard, 32-bit)</para>
|
---|
424 | </listitem>
|
---|
425 |
|
---|
426 | <listitem>
|
---|
427 | <para>10.6 (Snow Leopard, 32-bit and 64-bit)</para>
|
---|
428 | </listitem>
|
---|
429 | </itemizedlist>
|
---|
430 |
|
---|
431 | <para>Intel hardware is required; please see <xref
|
---|
432 | linkend="KnownIssues" /> also.</para>
|
---|
433 | </listitem>
|
---|
434 |
|
---|
435 | <listitem>
|
---|
436 | <para><emphasis role="bold">Linux</emphasis> hosts (32-bit and
|
---|
437 | 64-bit<footnote>
|
---|
438 | <para>Support for 64-bit Linux was added with VirtualBox
|
---|
439 | 1.4.</para>
|
---|
440 | </footnote>). Among others, this includes:<itemizedlist>
|
---|
441 | <listitem>
|
---|
442 | <para>Ubuntu 6.06 ("Dapper Drake"), 6.10 ("Edgy Eft"), 7.04
|
---|
443 | ("Feisty Fawn"), 7.10 ("Gutsy Gibbon"), 8.04 ("Hardy Heron"),
|
---|
444 | 8.10 ("Intrepid Ibex"), 9.04 ("Jaunty Jackalope"), 9.10 ("Karmic
|
---|
445 | Koala"), 10.04 ("Lucid Lynx"), 10.10 ("Maverick Meerkat).</para>
|
---|
446 | </listitem>
|
---|
447 |
|
---|
448 | <listitem>
|
---|
449 | <para>Debian GNU/Linux 3.1 ("sarge"), 4.0 ("etch"), 5.0
|
---|
450 | ("lenny") and 6.0 ("squeeze")</para>
|
---|
451 | </listitem>
|
---|
452 |
|
---|
453 | <listitem>
|
---|
454 | <para>Oracle Enterprise Linux 4 and 5, Oracle Linux 6</para>
|
---|
455 | </listitem>
|
---|
456 |
|
---|
457 | <listitem>
|
---|
458 | <para>Redhat Enterprise Linux 4, 5 and 6</para>
|
---|
459 | </listitem>
|
---|
460 |
|
---|
461 | <listitem>
|
---|
462 | <para>Fedora Core 4 to 14</para>
|
---|
463 | </listitem>
|
---|
464 |
|
---|
465 | <listitem>
|
---|
466 | <para>Gentoo Linux</para>
|
---|
467 | </listitem>
|
---|
468 |
|
---|
469 | <listitem>
|
---|
470 | <para>SUSE Linux 9, 10 and 11, openSUSE 10.3, 11.0, 11.1, 11.2,
|
---|
471 | 11.3</para>
|
---|
472 | </listitem>
|
---|
473 |
|
---|
474 | <listitem>
|
---|
475 | <para>Mandriva 2007.1, 2008.0, 2009.1, 2010.0 and 2010.1</para>
|
---|
476 | </listitem>
|
---|
477 | </itemizedlist></para>
|
---|
478 |
|
---|
479 | <para>It should be possible to use VirtualBox on most systems based on
|
---|
480 | Linux kernel 2.6 using either the VirtualBox installer or by doing a
|
---|
481 | manual installation; see <xref linkend="install-linux-host" />. However,
|
---|
482 | the formally tested and supported Linux distributions are those for
|
---|
483 | which we offer a dedicated package.</para>
|
---|
484 |
|
---|
485 | <para>Note that starting with VirtualBox 2.1, Linux 2.4-based host
|
---|
486 | operating systems are no longer supported.</para>
|
---|
487 | </listitem>
|
---|
488 |
|
---|
489 | <listitem>
|
---|
490 | <para><emphasis role="bold">Solaris</emphasis> hosts (32-bit and
|
---|
491 | 64-bit) are supported with the restrictions listed in <xref
|
---|
492 | linkend="KnownIssues" />:<itemizedlist>
|
---|
493 | <listitem>
|
---|
494 | <para>Solaris 11 Express (Nevada build 86 and higher,
|
---|
495 | OpenSolaris 2008.05 and higher)</para>
|
---|
496 | </listitem>
|
---|
497 |
|
---|
498 | <listitem>
|
---|
499 | <para>Solaris 10 (u8 and higher)</para>
|
---|
500 | </listitem>
|
---|
501 | </itemizedlist></para>
|
---|
502 | </listitem>
|
---|
503 | </itemizedlist>
|
---|
504 | </sect1>
|
---|
505 |
|
---|
506 | <sect1 id="intro-installing">
|
---|
507 | <title>Installing VirtualBox and extension packs</title>
|
---|
508 |
|
---|
509 | <para>VirtualBox comes in many different packages, and installation
|
---|
510 | depends on your host operating system. If you have installed software
|
---|
511 | before, installation should be straightforward: on each host platform,
|
---|
512 | VirtualBox uses the installation method that is most common and easy to
|
---|
513 | use. If you run into trouble or have special requirements, please refer to
|
---|
514 | <xref linkend="installation" /> for details about the various installation
|
---|
515 | methods.</para>
|
---|
516 |
|
---|
517 | <para>Starting with version 4.0, VirtualBox is split into several
|
---|
518 | components.<orderedlist>
|
---|
519 | <listitem>
|
---|
520 | <para>The base package consists of all open-source components and is
|
---|
521 | licensed under the GNU General Public License V2.</para>
|
---|
522 | </listitem>
|
---|
523 |
|
---|
524 | <listitem>
|
---|
525 | <para>Additional extension packs can be downloaded which extend the
|
---|
526 | functionality of the VirtualBox base package. Currently, Oracle
|
---|
527 | provides the one extension pack, which can be found at <ulink
|
---|
528 | url="http://www.virtualbox.org">http://www.virtualbox.org</ulink>
|
---|
529 | and provides the following added functionality:<orderedlist>
|
---|
530 | <listitem>
|
---|
531 | <para>The virtual USB 2.0 (EHCI) device; see <xref
|
---|
532 | linkend="settings-usb" />.</para>
|
---|
533 | </listitem>
|
---|
534 |
|
---|
535 | <listitem>
|
---|
536 | <para>VirtualBox Remote Desktop Protocol (VRDP) support; see
|
---|
537 | <xref linkend="vrde" />.</para>
|
---|
538 | </listitem>
|
---|
539 |
|
---|
540 | <listitem>
|
---|
541 | <para>Intel PXE boot ROM with support for the E1000 network
|
---|
542 | card.</para>
|
---|
543 | </listitem>
|
---|
544 | </orderedlist></para>
|
---|
545 |
|
---|
546 | <para>VirtualBox extension packages have a
|
---|
547 | <computeroutput>.vbox-extpack</computeroutput> file name extension.
|
---|
548 | To install an extension, simply double-click on the package file,
|
---|
549 | and the VirtualBox Manager will guide you through the required
|
---|
550 | steps.</para>
|
---|
551 |
|
---|
552 | <para>To view the extension packs that are currently installed,
|
---|
553 | please start the VirtualBox Manager (see the next section). From the
|
---|
554 | "File" menu, please select "Preferences". In the window that shows
|
---|
555 | up, go to the "Extensions" category which shows you the extensions
|
---|
556 | which are currently installed and allows you to remove a package or
|
---|
557 | add a new one.</para>
|
---|
558 |
|
---|
559 | <para>Alternatively you can use VBoxManage on the command line: see
|
---|
560 | <xref linkend="vboxmanage-extpack" /> for details.</para>
|
---|
561 | </listitem>
|
---|
562 | </orderedlist></para>
|
---|
563 | </sect1>
|
---|
564 |
|
---|
565 | <sect1>
|
---|
566 | <title>Starting VirtualBox</title>
|
---|
567 |
|
---|
568 | <para>After installation, you can start VirtualBox as
|
---|
569 | follows:<itemizedlist>
|
---|
570 | <listitem>
|
---|
571 | <para>On a Windows host, in the standard "Programs" menu, click on
|
---|
572 | the item in the "VirtualBox" group. On Vista or Windows 7, you can
|
---|
573 | also type "VirtualBox" in the search box of the "Start" menu.</para>
|
---|
574 | </listitem>
|
---|
575 |
|
---|
576 | <listitem>
|
---|
577 | <para>On a Mac OS X host, in the Finder, double-click on the
|
---|
578 | "VirtualBox" item in the "Applications" folder. (You may want to
|
---|
579 | drag this item onto your Dock.)</para>
|
---|
580 | </listitem>
|
---|
581 |
|
---|
582 | <listitem>
|
---|
583 | <para>On a Linux or Solaris host, depending on your desktop
|
---|
584 | environment, a "VirtualBox" item may have been placed in either the
|
---|
585 | "System" or "System Tools" group of your "Applications" menu.
|
---|
586 | Alternatively, you can type
|
---|
587 | <computeroutput>VirtualBox</computeroutput> in a terminal.</para>
|
---|
588 | </listitem>
|
---|
589 | </itemizedlist></para>
|
---|
590 |
|
---|
591 | <para>When you start VirtualBox for the first time, a window like the
|
---|
592 | following should come up:</para>
|
---|
593 |
|
---|
594 | <para><mediaobject>
|
---|
595 | <imageobject>
|
---|
596 | <imagedata align="center" fileref="images/virtualbox-main-empty.png"
|
---|
597 | width="10cm" />
|
---|
598 | </imageobject>
|
---|
599 | </mediaobject>This window is called the <emphasis
|
---|
600 | role="bold">"VirtualBox Manager".</emphasis> On the left, you can see a
|
---|
601 | pane that will later list all your virtual machines. Since you have not
|
---|
602 | created any, the list is empty. A row of buttons above it allows you to
|
---|
603 | create new VMs and work on existing VMs, once you have some. The pane on
|
---|
604 | the right displays the properties of the virtual machine currently
|
---|
605 | selected, if any. Again, since you don't have any machines yet, the pane
|
---|
606 | displays a welcome message.</para>
|
---|
607 |
|
---|
608 | <para>To give you an idea what VirtualBox might look like later, after you
|
---|
609 | have created many machines, here's another example:</para>
|
---|
610 |
|
---|
611 | <para><mediaobject>
|
---|
612 | <imageobject>
|
---|
613 | <imagedata align="center" fileref="images/virtualbox-main.png"
|
---|
614 | width="10cm" />
|
---|
615 | </imageobject>
|
---|
616 | </mediaobject></para>
|
---|
617 | </sect1>
|
---|
618 |
|
---|
619 | <sect1 id="gui-createvm">
|
---|
620 | <title>Creating your first virtual machine</title>
|
---|
621 |
|
---|
622 | <para>Click on the "New" button at the top of the VirtualBox Manager
|
---|
623 | window. A wizard will pop up to guide you through setting up a new virtual
|
---|
624 | machine (VM):</para>
|
---|
625 |
|
---|
626 | <para><mediaobject>
|
---|
627 | <imageobject>
|
---|
628 | <imagedata align="center" fileref="images/create-vm-1.png"
|
---|
629 | width="10cm" />
|
---|
630 | </imageobject>
|
---|
631 | </mediaobject>On the following pages, the wizard will ask you for the
|
---|
632 | bare minimum of information that is needed to create a VM, in
|
---|
633 | particular:<orderedlist>
|
---|
634 | <listitem>
|
---|
635 | <para>The <emphasis role="bold">VM name</emphasis> will later be
|
---|
636 | shown in the VM list of the VirtualBox Manager window, and it will
|
---|
637 | be used for the VM's files on disk. Even though any name could be
|
---|
638 | used, keep in mind that once you have created a few VMs, you will
|
---|
639 | appreciate if you have given your VMs rather informative names; "My
|
---|
640 | VM" would thus be less useful than "Windows XP SP2 with
|
---|
641 | OpenOffice".</para>
|
---|
642 | </listitem>
|
---|
643 |
|
---|
644 | <listitem>
|
---|
645 | <para>For <emphasis role="bold">"Operating System Type",</emphasis>
|
---|
646 | select the operating system that you want to install later. The
|
---|
647 | supported operating systems are grouped; if you want to install
|
---|
648 | something very unusual that is not listed, select "Other". Depending
|
---|
649 | on your selection, VirtualBox will enable or disable certain VM
|
---|
650 | settings that your guest operating system may require. This is
|
---|
651 | particularly important for 64-bit guests (see <xref
|
---|
652 | linkend="intro-64bitguests" />). It is therefore recommended to
|
---|
653 | always set it to the correct value.</para>
|
---|
654 | </listitem>
|
---|
655 |
|
---|
656 | <listitem>
|
---|
657 | <para>On the next page, select the <emphasis role="bold">memory
|
---|
658 | (RAM)</emphasis> that VirtualBox should allocate every time the
|
---|
659 | virtual machine is started. The amount of memory given here will be
|
---|
660 | taken away from your host machine and presented to the guest
|
---|
661 | operating system, which will report this size as the (virtual)
|
---|
662 | computer's installed RAM.</para>
|
---|
663 |
|
---|
664 | <para><note>
|
---|
665 | <para>Choose this setting carefully! The memory you give to the
|
---|
666 | VM will not be available to your host OS while the VM is
|
---|
667 | running, so do not specify more than you can spare. For example,
|
---|
668 | if your host machine has 1 GB of RAM and you enter 512 MB as the
|
---|
669 | amount of RAM for a particular virtual machine, while that VM is
|
---|
670 | running, you will only have 512 MB left for all the other
|
---|
671 | software on your host. If you run two VMs at the same time, even
|
---|
672 | more memory will be allocated for the second VM (which may not
|
---|
673 | even be able to start if that memory is not available). On the
|
---|
674 | other hand, you should specify as much as your guest OS (and
|
---|
675 | your applications) will require to run properly.</para>
|
---|
676 | </note></para>
|
---|
677 |
|
---|
678 | <para>A Windows XP guest will require at least a few hundred MB RAM
|
---|
679 | to run properly, and Windows Vista will even refuse to install with
|
---|
680 | less than 512 MB. Of course, if you want to run graphics-intensive
|
---|
681 | applications in your VM, you may require even more RAM.</para>
|
---|
682 |
|
---|
683 | <para>So, as a rule of thumb, if you have 1 GB of RAM or more in
|
---|
684 | your host computer, it is usually safe to allocate 512 MB to each
|
---|
685 | VM. But, in any case, make sure you always have at least 256 to 512
|
---|
686 | MB of RAM left on your host operating system. Otherwise you may
|
---|
687 | cause your host OS to excessively swap out memory to your hard disk,
|
---|
688 | effectively bringing your host system to a standstill.</para>
|
---|
689 |
|
---|
690 | <para>As with the other settings, you can change this setting later,
|
---|
691 | after you have created the VM.</para>
|
---|
692 | </listitem>
|
---|
693 |
|
---|
694 | <listitem>
|
---|
695 | <para>Next, you must specify a <emphasis role="bold">virtual hard
|
---|
696 | disk</emphasis> for your VM.</para>
|
---|
697 |
|
---|
698 | <para>There are many and potentially complicated ways in which
|
---|
699 | VirtualBox can provide hard disk space to a VM (see <xref
|
---|
700 | linkend="storage" /> for details), but the most common way is to use
|
---|
701 | a large image file on your "real" hard disk, whose contents
|
---|
702 | VirtualBox presents to your VM as if it were a complete hard disk.
|
---|
703 | This file represents an entire hard disk then, so you can even copy
|
---|
704 | it to another host and use it with another VirtualBox
|
---|
705 | installation.</para>
|
---|
706 |
|
---|
707 | <para>The wizard shows you the following window:</para>
|
---|
708 |
|
---|
709 | <para><mediaobject>
|
---|
710 | <imageobject>
|
---|
711 | <imagedata align="center" fileref="images/create-vm-2.png"
|
---|
712 | width="10cm" />
|
---|
713 | </imageobject>
|
---|
714 | </mediaobject></para>
|
---|
715 |
|
---|
716 | <para>Here you have the following options:</para>
|
---|
717 |
|
---|
718 | <para><itemizedlist>
|
---|
719 | <listitem>
|
---|
720 | <para>To create a new, empty virtual hard disk, press the
|
---|
721 | <emphasis role="bold">"New"</emphasis> button.</para>
|
---|
722 | </listitem>
|
---|
723 |
|
---|
724 | <listitem>
|
---|
725 | <para>You can pick an <emphasis
|
---|
726 | role="bold">existing</emphasis> disk image file.</para>
|
---|
727 |
|
---|
728 | <para>The <emphasis role="bold">drop-down list</emphasis>
|
---|
729 | presented in the window contains all disk images which are
|
---|
730 | currently remembered by VirtualBox, probably because they are
|
---|
731 | currently attached to a virtual machine (or have been in the
|
---|
732 | past).</para>
|
---|
733 |
|
---|
734 | <para>Alternatively, you can click on the small <emphasis
|
---|
735 | role="bold">folder button</emphasis> next to the drop-down
|
---|
736 | list to bring up a standard file dialog, which allows you to
|
---|
737 | pick any disk image file on your host disk.</para>
|
---|
738 | </listitem>
|
---|
739 | </itemizedlist>Most probably, if you are using VirtualBox for the
|
---|
740 | first time, you will want to create a new disk image. Hence, press
|
---|
741 | the "New" button.</para>
|
---|
742 |
|
---|
743 | <para>This brings up another window, the <emphasis
|
---|
744 | role="bold">"Create New Virtual Disk Wizard",</emphasis> which helps
|
---|
745 | you create a new disk image file in the new virtual machine's
|
---|
746 | folder.</para>
|
---|
747 |
|
---|
748 | <para>VirtualBox supports two types of image files:<itemizedlist>
|
---|
749 | <listitem>
|
---|
750 | <para>A <emphasis role="bold">dynamically expanding
|
---|
751 | file</emphasis> will only grow in size when the guest actually
|
---|
752 | stores data on its virtual hard disk. It will therefore
|
---|
753 | initially be small on the host hard drive and only later grow
|
---|
754 | to the size specified as it is filled with data.</para>
|
---|
755 | </listitem>
|
---|
756 |
|
---|
757 | <listitem>
|
---|
758 | <para>A <emphasis role="bold">fixed-size file</emphasis> will
|
---|
759 | immediately occupy the file specified, even if only a fraction
|
---|
760 | of the virtual hard disk space is actually in use. While
|
---|
761 | occupying much more space, a fixed-size file incurs less
|
---|
762 | overhead and is therefore slightly faster than a dynamically
|
---|
763 | expanding file.</para>
|
---|
764 | </listitem>
|
---|
765 | </itemizedlist></para>
|
---|
766 |
|
---|
767 | <para>For details about the differences, please refer to <xref
|
---|
768 | linkend="vdidetails" />.</para>
|
---|
769 |
|
---|
770 | <para>To prevent your physical hard disk from running full,
|
---|
771 | VirtualBox limits the size of the image file. Still, it needs to be
|
---|
772 | large enough to hold the contents of your operating system and the
|
---|
773 | applications you want to install -- for a modern Windows or Linux
|
---|
774 | guest, you will probably need several gigabytes for any serious
|
---|
775 | use:</para>
|
---|
776 |
|
---|
777 | <mediaobject>
|
---|
778 | <imageobject>
|
---|
779 | <imagedata align="center" fileref="images/create-vdi-1.png"
|
---|
780 | width="10cm" />
|
---|
781 | </imageobject>
|
---|
782 | </mediaobject>
|
---|
783 |
|
---|
784 | <para>After having selected or created your image file, again press
|
---|
785 | <emphasis role="bold">"Next"</emphasis> to go to the next
|
---|
786 | page.</para>
|
---|
787 | </listitem>
|
---|
788 |
|
---|
789 | <listitem>
|
---|
790 | <para>After clicking on <emphasis role="bold">"Finish"</emphasis>,
|
---|
791 | your new virtual machine will be created. You will then see it in
|
---|
792 | the list on the left side of the Manager window, with the name you
|
---|
793 | entered initially.</para>
|
---|
794 | </listitem>
|
---|
795 | </orderedlist></para>
|
---|
796 | </sect1>
|
---|
797 |
|
---|
798 | <sect1>
|
---|
799 | <title>Running your virtual machine</title>
|
---|
800 |
|
---|
801 | <para>To start a virtual machine, you have several options:<itemizedlist>
|
---|
802 | <listitem>
|
---|
803 | <para>Double-click on its entry in the list within the Manager
|
---|
804 | window or</para>
|
---|
805 | </listitem>
|
---|
806 |
|
---|
807 | <listitem>
|
---|
808 | <para>select its entry in the list in the Manager window it and
|
---|
809 | press the "Start" button at the top or</para>
|
---|
810 | </listitem>
|
---|
811 |
|
---|
812 | <listitem>
|
---|
813 | <para>for virtual machines created with VirtualBox 4.0 or later,
|
---|
814 | navigate to the "VirtualBox VMs" folder in your system user's home
|
---|
815 | directory, find the subdirectory of the machine you want to start
|
---|
816 | and double-click on the machine settings file (with a
|
---|
817 | <computeroutput>.vbox</computeroutput> file extension).</para>
|
---|
818 | </listitem>
|
---|
819 | </itemizedlist></para>
|
---|
820 |
|
---|
821 | <para>This opens up a new window, and the virtual machine which you
|
---|
822 | selected will boot up. Everything which would normally be seen on the
|
---|
823 | virtual system's monitor is shown in the window, as can be seen with the
|
---|
824 | image in <xref linkend="virtintro" />.</para>
|
---|
825 |
|
---|
826 | <para>In general, you can use the virtual machine much like you would use
|
---|
827 | a real computer. There are couple of points worth mentioning
|
---|
828 | however.</para>
|
---|
829 |
|
---|
830 | <sect2>
|
---|
831 | <title>Starting a new VM for the first time</title>
|
---|
832 |
|
---|
833 | <para>When a VM gets started for the first time, another wizard -- the
|
---|
834 | <emphasis role="bold">"First Start Wizard"</emphasis> -- will pop up to
|
---|
835 | help you select an <emphasis role="bold">installation medium</emphasis>.
|
---|
836 | Since the VM is created empty, it would otherwise behave just like a
|
---|
837 | real computer with no operating system installed: it will do nothing and
|
---|
838 | display an error message that no bootable operating system was
|
---|
839 | found.</para>
|
---|
840 |
|
---|
841 | <para>For this reason, the wizard helps you select a medium to install
|
---|
842 | an operating system from.</para>
|
---|
843 |
|
---|
844 | <itemizedlist>
|
---|
845 | <listitem>
|
---|
846 | <para>If you have physical CD or DVD media from which you want to
|
---|
847 | install your guest operating system (e.g. in the case of a Windows
|
---|
848 | installation CD or DVD), put the media into your host's CD or DVD
|
---|
849 | drive.</para>
|
---|
850 |
|
---|
851 | <para>Then, in the wizard's drop-down list of installation media,
|
---|
852 | select <emphasis role="bold">"Host drive"</emphasis> with the
|
---|
853 | correct drive letter (or, in the case of a Linux host, device file).
|
---|
854 | This will allow your VM to access the media in your host drive, and
|
---|
855 | you can proceed to install from there.</para>
|
---|
856 | </listitem>
|
---|
857 |
|
---|
858 | <listitem>
|
---|
859 | <para>If you have downloaded installation media from the Internet in
|
---|
860 | the form of an ISO image file (most probably in the case of a Linux
|
---|
861 | distribution), you would normally burn this file to an empty CD or
|
---|
862 | DVD and proceed as just described. With VirtualBox however, you can
|
---|
863 | skip this step and mount the ISO file directly. VirtualBox will then
|
---|
864 | present this file as a CD or DVD-ROM drive to the virtual machine,
|
---|
865 | much like it does with virtual hard disk images.</para>
|
---|
866 |
|
---|
867 | <para>For this case, the wizard's drop-down list contains a list of
|
---|
868 | installation media that were previously used with VirtualBox.</para>
|
---|
869 |
|
---|
870 | <para>If your medium is not in the list (especially if you are using
|
---|
871 | VirtualBox for the first time), select the small folder icon next to
|
---|
872 | the drop-down list to bring up a standard file dialog, with which
|
---|
873 | you can pick the image file on your host disks.</para>
|
---|
874 | </listitem>
|
---|
875 | </itemizedlist>
|
---|
876 |
|
---|
877 | <para>In both cases, after making the choices in the wizard, you will be
|
---|
878 | able to install your operating system.</para>
|
---|
879 | </sect2>
|
---|
880 |
|
---|
881 | <sect2>
|
---|
882 | <title id="keyb_mouse_normal">Capturing and releasing keyboard and
|
---|
883 | mouse</title>
|
---|
884 |
|
---|
885 | <para>As of version 3.2, VirtualBox provides a virtual USB tablet device
|
---|
886 | to new virtual machines through which mouse events are communicated to
|
---|
887 | the guest operating system. As a result, if you are running a modern
|
---|
888 | guest operating system that can handle such devices, mouse support may
|
---|
889 | work out of the box without the mouse being "captured" as described
|
---|
890 | below; see <xref linkend="settings-motherboard" /> for more
|
---|
891 | information.</para>
|
---|
892 |
|
---|
893 | <para>Otherwise, if the virtual machine only sees standard PS/2 mouse
|
---|
894 | and keyboard devices, since the operating system in the virtual machine
|
---|
895 | does not "know" that it is not running on a real computer, it expects to
|
---|
896 | have exclusive control over your keyboard and mouse. This is, however,
|
---|
897 | not the case since, unless you are running the VM in full-screen mode,
|
---|
898 | your VM needs to share keyboard and mouse with other applications and
|
---|
899 | possibly other VMs on your host.</para>
|
---|
900 |
|
---|
901 | <para>As a result, initially after installing a guest operating system
|
---|
902 | and before you install the Guest Additions (we will explain this in a
|
---|
903 | minute), only one of the two -- your VM or the rest of your computer --
|
---|
904 | can "own" the keyboard and the mouse. You will see a
|
---|
905 | <emphasis>second</emphasis> mouse pointer which will always be confined
|
---|
906 | to the limits of the VM window. Basically, you activate the VM by
|
---|
907 | clicking inside it.</para>
|
---|
908 |
|
---|
909 | <para>To return ownership of keyboard and mouse to your host operating
|
---|
910 | system, VirtualBox reserves a special key on your keyboard for itself:
|
---|
911 | the <emphasis role="bold">"host key".</emphasis> By default, this is the
|
---|
912 | <emphasis>right Control key</emphasis> on your keyboard; on a Mac host,
|
---|
913 | the default host key is the left Command key. You can change this
|
---|
914 | default in the VirtualBox Global Settings. In any case, the current
|
---|
915 | setting for the host key is always displayed <emphasis>at the bottom
|
---|
916 | right of your VM window,</emphasis> should you have forgotten about
|
---|
917 | it:</para>
|
---|
918 |
|
---|
919 | <para><mediaobject>
|
---|
920 | <imageobject>
|
---|
921 | <imagedata align="center" fileref="images/vm-hostkey.png"
|
---|
922 | width="7cm" />
|
---|
923 | </imageobject>
|
---|
924 | </mediaobject>In detail, all this translates into the
|
---|
925 | following:</para>
|
---|
926 |
|
---|
927 | <para><itemizedlist>
|
---|
928 | <listitem>
|
---|
929 | <para>Your <emphasis role="bold">keyboard</emphasis> is owned by
|
---|
930 | the VM if the VM window on your host desktop has the keyboard
|
---|
931 | focus (and then, if you have many windows open in your guest
|
---|
932 | operating system as well, the window that has the focus in your
|
---|
933 | VM). This means that if you want to type within your VM, click on
|
---|
934 | the title bar of your VM window first.</para>
|
---|
935 |
|
---|
936 | <para>To release keyboard ownership, press the Host key (as
|
---|
937 | explained above, typically the right Control key).</para>
|
---|
938 |
|
---|
939 | <para>Note that while the VM owns the keyboard, some key sequences
|
---|
940 | (like Alt-Tab for example) will no longer be seen by the host, but
|
---|
941 | will go to the guest instead. After you press the host key to
|
---|
942 | re-enable the host keyboard, all key presses will go through the
|
---|
943 | host again, so that sequences like Alt-Tab will no longer reach
|
---|
944 | the guest.</para>
|
---|
945 | </listitem>
|
---|
946 |
|
---|
947 | <listitem>
|
---|
948 | <para>Your <emphasis role="bold">mouse</emphasis> is owned by the
|
---|
949 | VM only after you have clicked in the VM window. The host mouse
|
---|
950 | pointer will disappear, and your mouse will drive the guest's
|
---|
951 | pointer instead of your normal mouse pointer.</para>
|
---|
952 |
|
---|
953 | <para>Note that mouse ownership is independent of that of the
|
---|
954 | keyboard: even after you have clicked on a titlebar to be able to
|
---|
955 | type into the VM window, your mouse is not necessarily owned by
|
---|
956 | the VM yet.</para>
|
---|
957 |
|
---|
958 | <para>To release ownership of your mouse by the VM, also press the
|
---|
959 | Host key.</para>
|
---|
960 | </listitem>
|
---|
961 | </itemizedlist></para>
|
---|
962 |
|
---|
963 | <para>As this behavior can be inconvenient, VirtualBox provides a set of
|
---|
964 | tools and device drivers for guest systems called the "VirtualBox Guest
|
---|
965 | Additions" which make VM keyboard and mouse operation a lot more
|
---|
966 | seamless. Most importantly, the Additions will get rid of the second
|
---|
967 | "guest" mouse pointer and make your host mouse pointer work directly in
|
---|
968 | the guest.</para>
|
---|
969 |
|
---|
970 | <para>This will be described later in <xref
|
---|
971 | linkend="guestadditions" />.</para>
|
---|
972 | </sect2>
|
---|
973 |
|
---|
974 | <sect2>
|
---|
975 | <title>Typing special characters</title>
|
---|
976 |
|
---|
977 | <para>Operating systems expect certain key combinations to initiate
|
---|
978 | certain procedures. Some of these key combinations may be difficult to
|
---|
979 | enter into a virtual machine, as there are three candidates as to who
|
---|
980 | receives keyboard input: the host operating system, VirtualBox, or the
|
---|
981 | guest operating system. Who of these three receives keypresses depends
|
---|
982 | on a number of factors, including the key itself.</para>
|
---|
983 |
|
---|
984 | <itemizedlist>
|
---|
985 | <listitem>
|
---|
986 | <para>Host operating systems reserve certain key combinations for
|
---|
987 | themselves. For example, it is impossible to enter the <emphasis
|
---|
988 | role="bold">Ctrl+Alt+Delete</emphasis> combination if you want to
|
---|
989 | reboot the guest operating system in your virtual machine, because
|
---|
990 | this key combination is usually hard-wired into the host OS (both
|
---|
991 | Windows and Linux intercept this), and pressing this key combination
|
---|
992 | will therefore reboot your <emphasis>host</emphasis>.</para>
|
---|
993 |
|
---|
994 | <para>Also, on Linux and Solaris hosts, which use the X Window
|
---|
995 | System, the key combination <emphasis
|
---|
996 | role="bold">Ctrl+Alt+Backspace</emphasis> normally resets the X
|
---|
997 | server (to restart the entire graphical user interface in case it
|
---|
998 | got stuck). As the X server intercepts this combination, pressing it
|
---|
999 | will usually restart your <emphasis>host</emphasis> graphical user
|
---|
1000 | interface (and kill all running programs, including VirtualBox, in
|
---|
1001 | the process).</para>
|
---|
1002 |
|
---|
1003 | <para>Third, on Linux hosts supporting virtual terminals, the key
|
---|
1004 | combination <emphasis role="bold">Ctrl+Alt+Fx</emphasis> (where Fx
|
---|
1005 | is one of the function keys from F1 to F12) normally allows to
|
---|
1006 | switch between virtual terminals. As with Ctrl+Alt+Delete, these
|
---|
1007 | combinations are intercepted by the host operating system and
|
---|
1008 | therefore always switch terminals on the
|
---|
1009 | <emphasis>host</emphasis>.</para>
|
---|
1010 |
|
---|
1011 | <para>If, instead, you want to send these key combinations to the
|
---|
1012 | <emphasis>guest</emphasis> operating system in the virtual machine,
|
---|
1013 | you will need to use one of the following methods:</para>
|
---|
1014 |
|
---|
1015 | <itemizedlist>
|
---|
1016 | <listitem>
|
---|
1017 | <para>Use the items in the "Machine" menu of the virtual machine
|
---|
1018 | window. There you will find "Insert Ctrl+Alt+Delete" and
|
---|
1019 | "Ctrl+Alt+Backspace"; the latter will only have an effect with
|
---|
1020 | Linux or Solaris guests, however.</para>
|
---|
1021 | </listitem>
|
---|
1022 |
|
---|
1023 | <listitem>
|
---|
1024 | <para>Press special key combinations with the Host key (normally
|
---|
1025 | the right Control key), which VirtualBox will then translate for
|
---|
1026 | the virtual machine:<itemizedlist>
|
---|
1027 | <listitem>
|
---|
1028 | <para><emphasis role="bold">Host key + Del</emphasis> to
|
---|
1029 | send Ctrl+Alt+Del (to reboot the guest);</para>
|
---|
1030 | </listitem>
|
---|
1031 |
|
---|
1032 | <listitem>
|
---|
1033 | <para><emphasis role="bold">Host key +
|
---|
1034 | Backspace</emphasis> to send Ctrl+Alt+Backspace (to
|
---|
1035 | restart the graphical user interface of a Linux or Solaris
|
---|
1036 | guest);</para>
|
---|
1037 | </listitem>
|
---|
1038 |
|
---|
1039 | <listitem>
|
---|
1040 | <para><emphasis role="bold">Host key + F1</emphasis> (or
|
---|
1041 | other function keys) to simulate Ctrl+Alt+F1 (or other
|
---|
1042 | function keys, i.e. to switch between virtual terminals in
|
---|
1043 | a Linux guest).</para>
|
---|
1044 | </listitem>
|
---|
1045 | </itemizedlist></para>
|
---|
1046 | </listitem>
|
---|
1047 | </itemizedlist>
|
---|
1048 | </listitem>
|
---|
1049 |
|
---|
1050 | <listitem>
|
---|
1051 | <para>For some other keyboard combinations such as <emphasis
|
---|
1052 | role="bold">Alt-Tab</emphasis> (to switch between open windows),
|
---|
1053 | VirtualBox allows you to configure whether these combinations will
|
---|
1054 | affect the host or the guest, if a virtual machine currently has the
|
---|
1055 | focus. This is a global setting for all virtual machines and can be
|
---|
1056 | found under "File" -> "Preferences" -> "Input" ->
|
---|
1057 | "Auto-capture keyboard".</para>
|
---|
1058 | </listitem>
|
---|
1059 | </itemizedlist>
|
---|
1060 | </sect2>
|
---|
1061 |
|
---|
1062 | <sect2>
|
---|
1063 | <title>Changing removable media</title>
|
---|
1064 |
|
---|
1065 | <para>While a virtual machine is running, you can change removable media
|
---|
1066 | in the "Devices" menu of the VM's window. Here you can select in detail
|
---|
1067 | what VirtualBox presents to your VM as a CD, DVD, or floppy.</para>
|
---|
1068 |
|
---|
1069 | <para>The settings are the same as would be available for the VM in the
|
---|
1070 | "Settings" dialog of the VirtualBox main window, but since that dialog
|
---|
1071 | is disabled while the VM is in the "running" or "saved" state, this
|
---|
1072 | extra menu saves you from having to shut down and restart the VM every
|
---|
1073 | time you want to change media.</para>
|
---|
1074 |
|
---|
1075 | <para>Hence, in the "Devices" menu, VirtualBox allows you to attach the
|
---|
1076 | host drive to the guest or select a floppy or DVD image using the Disk
|
---|
1077 | Image Manager, all as described in <xref
|
---|
1078 | linkend="configbasics" />.</para>
|
---|
1079 | </sect2>
|
---|
1080 |
|
---|
1081 | <sect2 id="intro-resize-window">
|
---|
1082 | <title>Resizing the machine's window</title>
|
---|
1083 |
|
---|
1084 | <para>You can resize the virtual machine's window when it is running. In
|
---|
1085 | that case, one of three things will happen:<orderedlist>
|
---|
1086 | <listitem>
|
---|
1087 | <para>If you have <emphasis role="bold">"scale mode"</emphasis>
|
---|
1088 | enabled, then the virtual machine's screen will be scaled to the
|
---|
1089 | size of the window. This can be useful if you have many machines
|
---|
1090 | running and want to have a look at one of them while it is running
|
---|
1091 | in the background. Alternatively, it might be useful to enlarge a
|
---|
1092 | window if the VM's output screen is very small, for example
|
---|
1093 | because you are running an old operating system in it.</para>
|
---|
1094 |
|
---|
1095 | <para>To enable scale mode, press the <emphasis role="bold">host
|
---|
1096 | key + C</emphasis>, or select "Scale mode" from the "Machine" menu
|
---|
1097 | in the VM window. To leave scale mode, press the host key + C
|
---|
1098 | again.</para>
|
---|
1099 |
|
---|
1100 | <para>Please see <xref linkend="KnownIssues" /> for additional
|
---|
1101 | remarks.</para>
|
---|
1102 | </listitem>
|
---|
1103 |
|
---|
1104 | <listitem>
|
---|
1105 | <para>If you have the Guest Additions installed and they support
|
---|
1106 | automatic <emphasis role="bold">resizing</emphasis>, the Guest
|
---|
1107 | Additions will automatically adjust the screen resolution of the
|
---|
1108 | guest operating system. For example, if you are running a Windows
|
---|
1109 | guest with a resolution of 1024x768 pixels and you then resize the
|
---|
1110 | VM window to make it 100 pixels wider, the Guest Additions will
|
---|
1111 | change the Windows display resolution to 1124x768.</para>
|
---|
1112 |
|
---|
1113 | <para>Please see <xref linkend="guestadditions" /> for more
|
---|
1114 | information about the Guest Additions.</para>
|
---|
1115 | </listitem>
|
---|
1116 |
|
---|
1117 | <listitem>
|
---|
1118 | <para>Otherwise, if the window is bigger than the VM's screen, the
|
---|
1119 | screen will be centered. If it is smaller, then scroll bars will
|
---|
1120 | be added to the machine window.</para>
|
---|
1121 | </listitem>
|
---|
1122 | </orderedlist></para>
|
---|
1123 | </sect2>
|
---|
1124 |
|
---|
1125 | <sect2>
|
---|
1126 | <title>Saving the state of the machine</title>
|
---|
1127 |
|
---|
1128 | <para>When you click on the "Close" button of your virtual machine
|
---|
1129 | window (at the top right of the window, just like you would close any
|
---|
1130 | other window on your system), VirtualBox asks you whether you want to
|
---|
1131 | "save" or "power off" the VM. (As a shortcut, you can also press the
|
---|
1132 | Host key together with "Q".)</para>
|
---|
1133 |
|
---|
1134 | <para><mediaobject>
|
---|
1135 | <imageobject>
|
---|
1136 | <imagedata align="center" fileref="images/vm-close.png"
|
---|
1137 | width="11cm" />
|
---|
1138 | </imageobject>
|
---|
1139 | </mediaobject>The difference between these three options is crucial.
|
---|
1140 | They mean:</para>
|
---|
1141 |
|
---|
1142 | <itemizedlist>
|
---|
1143 | <listitem>
|
---|
1144 | <para><emphasis role="bold">Save the machine state:</emphasis> With
|
---|
1145 | this option, VirtualBox "freezes" the virtual machine by completely
|
---|
1146 | saving its state to your local disk.</para>
|
---|
1147 |
|
---|
1148 | <para>When you start the VM again later, you will find that the VM
|
---|
1149 | continues exactly where it was left off. All your programs will
|
---|
1150 | still be open, and your computer resumes operation. Saving the state
|
---|
1151 | of a virtual machine is thus in some ways similar to suspending a
|
---|
1152 | laptop computer (e.g. by closing its lid).</para>
|
---|
1153 | </listitem>
|
---|
1154 |
|
---|
1155 | <listitem>
|
---|
1156 | <para><emphasis role="bold">Send the shutdown signal.</emphasis>
|
---|
1157 | This will send an ACPI shutdown signal to the virtual machine, which
|
---|
1158 | has the same effect as if you had pressed the power button on a real
|
---|
1159 | computer. So long as the VM is running a fairly modern operating
|
---|
1160 | system, this should trigger a proper shutdown mechanism from within
|
---|
1161 | the VM.</para>
|
---|
1162 | </listitem>
|
---|
1163 |
|
---|
1164 | <listitem>
|
---|
1165 | <para><emphasis role="bold">Power off the machine:</emphasis> With
|
---|
1166 | this option, VirtualBox also stops running the virtual machine, but
|
---|
1167 | <emphasis>without</emphasis> saving its state.<warning>
|
---|
1168 | <para>This is equivalent to pulling the power plug on a real
|
---|
1169 | computer without shutting it down properly. If you start the
|
---|
1170 | machine again after powering it off, your operating system will
|
---|
1171 | have to reboot completely and may begin a lengthy check of its
|
---|
1172 | (virtual) system disks. As a result, this should not normally be
|
---|
1173 | done, since it can potentially cause data loss or an
|
---|
1174 | inconsistent state of the guest system on disk.</para>
|
---|
1175 | </warning></para>
|
---|
1176 |
|
---|
1177 | <para>As an exception, if your virtual machine has any snapshots
|
---|
1178 | (see the next chapter), you can use this option to quickly <emphasis
|
---|
1179 | role="bold">restore the current snapshot</emphasis> of the virtual
|
---|
1180 | machine. In that case, powering off the machine will not disrupt its
|
---|
1181 | state, but any changes made since that snapshot was taken will be
|
---|
1182 | lost.</para>
|
---|
1183 | </listitem>
|
---|
1184 | </itemizedlist>
|
---|
1185 |
|
---|
1186 | <para>The <emphasis role="bold">"Discard"</emphasis> button in the
|
---|
1187 | VirtualBox Manager window discards a virtual machine's saved state. This
|
---|
1188 | has the same effect as powering it off, and the same warnings
|
---|
1189 | apply.</para>
|
---|
1190 | </sect2>
|
---|
1191 | </sect1>
|
---|
1192 |
|
---|
1193 | <sect1 id="snapshots">
|
---|
1194 | <title>Snapshots</title>
|
---|
1195 |
|
---|
1196 | <para>With snapshots, you can save a particular state of a virtual machine
|
---|
1197 | for later use. At any later time, you can revert to that state, even
|
---|
1198 | though you may have changed the VM considerably since then. A snapshot of
|
---|
1199 | a virtual machine is thus similar to a machine in "saved" state, as
|
---|
1200 | described above, but there can be many of them, and these saved states are
|
---|
1201 | preserved.</para>
|
---|
1202 |
|
---|
1203 | <para>You can see the snapshots of a virtual machine by first selecting a
|
---|
1204 | machine in the VirtualBox Manager and then clicking on the "Snapshots"
|
---|
1205 | button at the top right. Until you take a snapshot of the machine, the
|
---|
1206 | list of snapshots will be empty except for the "Current state" item, which
|
---|
1207 | represents the "Now" point in the lifetime of the virtual machine.</para>
|
---|
1208 |
|
---|
1209 | <sect2>
|
---|
1210 | <title>Taking, restoring and deleting snapshots</title>
|
---|
1211 |
|
---|
1212 | <para>There are three operations related to snapshots:<orderedlist>
|
---|
1213 | <listitem>
|
---|
1214 | <para>You can <emphasis role="bold">take a snapshot</emphasis>.
|
---|
1215 | This makes a copy of the machine's current state, to which you can
|
---|
1216 | go back at any given time later.<itemizedlist>
|
---|
1217 | <listitem>
|
---|
1218 | <para>If your VM is currently running, select "Take
|
---|
1219 | snapshot" from the "Machine" pull-down menu of the VM
|
---|
1220 | window.</para>
|
---|
1221 | </listitem>
|
---|
1222 |
|
---|
1223 | <listitem>
|
---|
1224 | <para>If your VM is currently in either the "saved" or the
|
---|
1225 | "powered off" state (as displayed next to the VM in the
|
---|
1226 | VirtualBox main window), click on the "Snapshots" tab on the
|
---|
1227 | top right of the main window, and then<itemizedlist>
|
---|
1228 | <listitem>
|
---|
1229 | <para>either on the small camera icon (for "Take
|
---|
1230 | snapshot") or</para>
|
---|
1231 | </listitem>
|
---|
1232 |
|
---|
1233 | <listitem>
|
---|
1234 | <para>right-click on the "Current State" item in the
|
---|
1235 | list and select "Take snapshot" from the menu.</para>
|
---|
1236 | </listitem>
|
---|
1237 | </itemizedlist></para>
|
---|
1238 | </listitem>
|
---|
1239 | </itemizedlist></para>
|
---|
1240 |
|
---|
1241 | <para>In any case, a window will pop up and ask you for a snapshot
|
---|
1242 | name. This name is purely for reference purposes to help you
|
---|
1243 | remember the state of the snapshot. For example, a useful name
|
---|
1244 | would be "Fresh installation from scratch, no Guest Additions", or
|
---|
1245 | "Service Pack 3 just installed". You can also add a longer text in
|
---|
1246 | the "Description" field if you want.</para>
|
---|
1247 |
|
---|
1248 | <para>Your new snapshot will then appear in the snapshots list.
|
---|
1249 | Underneath your new snapshot, you will see an item called "Current
|
---|
1250 | state", signifying that the current state of your VM is a
|
---|
1251 | variation based on the snapshot you took earlier. If you later
|
---|
1252 | take another snapshot, you will see that they will be displayed in
|
---|
1253 | sequence, and each subsequent snapshot is derived from an earlier
|
---|
1254 | one:<mediaobject>
|
---|
1255 | <imageobject>
|
---|
1256 | <imagedata align="center" fileref="images/snapshots-1.png"
|
---|
1257 | width="12cm" />
|
---|
1258 | </imageobject>
|
---|
1259 | </mediaobject></para>
|
---|
1260 |
|
---|
1261 | <para>VirtualBox imposes no limits on the number of snapshots you
|
---|
1262 | can take. The only practical limitation is disk space on your
|
---|
1263 | host: each snapshot stores the state of the virtual machine and
|
---|
1264 | thus occupies some disk space. (See the next section for details
|
---|
1265 | on what exactly is stored in a snapshot.)</para>
|
---|
1266 | </listitem>
|
---|
1267 |
|
---|
1268 | <listitem>
|
---|
1269 | <para>You can <emphasis role="bold">restore a snapshot</emphasis>
|
---|
1270 | by right-clicking on any snapshot you have taken in the list of
|
---|
1271 | snapshots. By restoring a snapshot, you go back (or forward) in
|
---|
1272 | time: the current state of the machine is lost, and the machine is
|
---|
1273 | restored to the exact state it was in when the snapshot was
|
---|
1274 | taken.<footnote>
|
---|
1275 | <para>Both the terminology and the functionality of restoring
|
---|
1276 | snapshots has changed with VirtualBox 3.1. Before that
|
---|
1277 | version, it was only possible to go back to the very last
|
---|
1278 | snapshot taken -- not earlier ones, and the operation was
|
---|
1279 | called "Discard current state" instead of "Restore last
|
---|
1280 | snapshot". The limitation has been lifted with version 3.1. It
|
---|
1281 | is now possible to restore <emphasis>any</emphasis> snapshot,
|
---|
1282 | going backward and forward in time.</para>
|
---|
1283 | </footnote></para>
|
---|
1284 |
|
---|
1285 | <note>
|
---|
1286 | <para>Restoring a snapshot will affect the virtual hard drives
|
---|
1287 | that are connected to your VM, as the entire state of the
|
---|
1288 | virtual hard drive will be reverted as well. This means also
|
---|
1289 | that all files that have been created since the snapshot and all
|
---|
1290 | other file changes <emphasis>will be lost. </emphasis>In order
|
---|
1291 | to prevent such data loss while still making use of the snapshot
|
---|
1292 | feature, it is possible to add a second hard drive in
|
---|
1293 | "write-through" mode using the
|
---|
1294 | <computeroutput>VBoxManage</computeroutput> interface and use it
|
---|
1295 | to store your data. As write-through hard drives are
|
---|
1296 | <emphasis>not</emphasis> included in snapshots, they remain
|
---|
1297 | unaltered when a machine is reverted. See <xref
|
---|
1298 | linkend="hdimagewrites" os="" /> for details.</para>
|
---|
1299 | </note>
|
---|
1300 |
|
---|
1301 | <para>To avoid losing the current state when restoring a snapshot,
|
---|
1302 | you can create a new snapshot before the restore.</para>
|
---|
1303 |
|
---|
1304 | <para>By restoring an earlier snapshot and taking more snapshots
|
---|
1305 | from there, it is even possible to create a kind of alternate
|
---|
1306 | reality and to switch between these different histories of the
|
---|
1307 | virtual machine. This can result in a whole tree of virtual
|
---|
1308 | machine snapshots, as shown in the screenshot above.</para>
|
---|
1309 | </listitem>
|
---|
1310 |
|
---|
1311 | <listitem>
|
---|
1312 | <para>You can also <emphasis role="bold">delete a
|
---|
1313 | snapshot</emphasis>, which will not affect the state of the
|
---|
1314 | virtual machine, but only release the files on disk that
|
---|
1315 | VirtualBox used to store the snapshot data, thus freeing disk
|
---|
1316 | space. To delete a snapshot, right-click on it in the snapshots
|
---|
1317 | tree and select "Delete". As of VirtualBox 3.2, snapshots can be
|
---|
1318 | deleted even while a machine is running.<note>
|
---|
1319 | <para>Whereas taking and restoring snapshots are fairly quick
|
---|
1320 | operations, deleting a snapshot can take a considerable amount
|
---|
1321 | of time since large amounts of data may need to be copied
|
---|
1322 | between several disk image files. Temporary disk files may
|
---|
1323 | also need large amounts of disk space while the operation is
|
---|
1324 | in progress.</para>
|
---|
1325 | </note></para>
|
---|
1326 |
|
---|
1327 | <para>There are some situations which cannot be handled while a VM
|
---|
1328 | is running, and you will get an appropriate message that you need
|
---|
1329 | to perform this snapshot deletion when the VM is shut down.</para>
|
---|
1330 | </listitem>
|
---|
1331 | </orderedlist></para>
|
---|
1332 | </sect2>
|
---|
1333 |
|
---|
1334 | <sect2>
|
---|
1335 | <title>Snapshot contents</title>
|
---|
1336 |
|
---|
1337 | <para>Think of a snapshot as a point in time that you have preserved.
|
---|
1338 | More formally, a snapshot consists of three things:<itemizedlist>
|
---|
1339 | <listitem>
|
---|
1340 | <para>It contains a complete copy of the VM settings, including
|
---|
1341 | the hardware configuration, so that when you restore a snapshot,
|
---|
1342 | the VM settings are restored as well. (For example, if you changed
|
---|
1343 | the hard disk configuration or the VM's system settings, that
|
---|
1344 | change is undone when you restore the snapshot.)</para>
|
---|
1345 |
|
---|
1346 | <para>The copy of the settings is stored in the machine
|
---|
1347 | configuration, an XML text file, and thus occupies very little
|
---|
1348 | space.</para>
|
---|
1349 | </listitem>
|
---|
1350 |
|
---|
1351 | <listitem>
|
---|
1352 | <para>The complete state of all the virtual disks attached to the
|
---|
1353 | machine is preserved. Going back to a snapshot means that all
|
---|
1354 | changes that had been made to the machine's disks -- file by file,
|
---|
1355 | bit by bit -- will be undone as well. Files that were since
|
---|
1356 | created will disappear, files that were deleted will be restored,
|
---|
1357 | changes to files will be reverted.</para>
|
---|
1358 |
|
---|
1359 | <para>(Strictly speaking, this is only true for virtual hard disks
|
---|
1360 | in "normal" mode. As mentioned above, you can configure disks to
|
---|
1361 | behave differently with snapshots; see <xref
|
---|
1362 | linkend="hdimagewrites" />. Even more formally and technically
|
---|
1363 | correct, it is not the virtual disk itself that is restored when a
|
---|
1364 | snapshot is restored. Instead, when a snapshot is taken,
|
---|
1365 | VirtualBox creates differencing images which contain only the
|
---|
1366 | changes since the snapshot were taken, and when the snapshot is
|
---|
1367 | restored, VirtualBox throws away that differencing image, thus
|
---|
1368 | going back to the previous state. This is both faster and uses
|
---|
1369 | less disk space. For the details, which can be complex, please see
|
---|
1370 | <xref linkend="diffimages" />.)</para>
|
---|
1371 |
|
---|
1372 | <para>Creating the differencing image as such does not occupy much
|
---|
1373 | space on the host disk initially, since the differencing image
|
---|
1374 | will initially be empty (and grow dynamically later with each
|
---|
1375 | write operation to the disk). The longer you use the machine after
|
---|
1376 | having created the snapshot, however, the more the differencing
|
---|
1377 | image will grow in size.</para>
|
---|
1378 | </listitem>
|
---|
1379 |
|
---|
1380 | <listitem>
|
---|
1381 | <para>Finally, if you took a snapshot while the machine was
|
---|
1382 | running, the memory state of the machine is also saved in the
|
---|
1383 | snapshot (the same way the memory can be saved when you close the
|
---|
1384 | VM window). When you restore such a snapshot, execution resumes at
|
---|
1385 | exactly the point when the snapshot was taken.</para>
|
---|
1386 |
|
---|
1387 | <para>The memory state file can be as large as the memory size of
|
---|
1388 | the virtual machine and will therefore occupy quite some disk
|
---|
1389 | space as well.</para>
|
---|
1390 | </listitem>
|
---|
1391 | </itemizedlist></para>
|
---|
1392 | </sect2>
|
---|
1393 | </sect1>
|
---|
1394 |
|
---|
1395 | <sect1>
|
---|
1396 | <title id="configbasics">Virtual machine configuration</title>
|
---|
1397 |
|
---|
1398 | <para>When you select a virtual machine from the list in the Manager
|
---|
1399 | window, you will see a summary of that machine's settings on the
|
---|
1400 | right.</para>
|
---|
1401 |
|
---|
1402 | <para>Clicking on the "Settings" button in the toolbar at the top brings
|
---|
1403 | up a detailed window where you can configure many of the properties of the
|
---|
1404 | selected VM. But be careful: even though it is possible to change all VM
|
---|
1405 | settings after installing a guest operating system, certain changes might
|
---|
1406 | prevent a guest operating system from functioning correctly if done after
|
---|
1407 | installation.</para>
|
---|
1408 |
|
---|
1409 | <note>
|
---|
1410 | <para>The "Settings" button is disabled while a VM is either in the
|
---|
1411 | "running" or "saved" state. This is simply because the settings dialog
|
---|
1412 | allows you to change fundamental characteristics of the virtual computer
|
---|
1413 | that is created for your guest operating system, and this operating
|
---|
1414 | system may not take it well when, for example, half of its memory is
|
---|
1415 | taken away from under its feet. As a result, if the "Settings" button is
|
---|
1416 | disabled, shut down the current VM first.</para>
|
---|
1417 | </note>
|
---|
1418 |
|
---|
1419 | <para>VirtualBox provides a plethora of parameters that can be changed for
|
---|
1420 | a virtual machine. The various settings that can be changed in the
|
---|
1421 | "Settings" window are described in detail in <xref
|
---|
1422 | linkend="BasicConcepts" />. Even more parameters are available with the
|
---|
1423 | VirtualBox command line interface; see <xref
|
---|
1424 | linkend="vboxmanage" />.</para>
|
---|
1425 | </sect1>
|
---|
1426 |
|
---|
1427 | <sect1>
|
---|
1428 | <title>Removing virtual machines</title>
|
---|
1429 |
|
---|
1430 | <para>To remove a virtual machine which you no longer need, right-click on
|
---|
1431 | it in the Manager's VM list select "Remove" from the context menu that
|
---|
1432 | comes up.</para>
|
---|
1433 |
|
---|
1434 | <para>A confirmation window will come up that allows you to select whether
|
---|
1435 | the machine should only be removed from the list of machines or whether
|
---|
1436 | the files associated with it should also be deleted.</para>
|
---|
1437 |
|
---|
1438 | <para>The "Remove" menu item is disabled while a machine is
|
---|
1439 | running.</para>
|
---|
1440 | </sect1>
|
---|
1441 |
|
---|
1442 | <sect1 id="ovf">
|
---|
1443 | <title>Importing and exporting virtual machines</title>
|
---|
1444 |
|
---|
1445 | <para>VirtualBox can import and export virtual machines in the
|
---|
1446 | industry-standard Open Virtualization Format (OVF).<footnote>
|
---|
1447 | <para>OVF support was originally introduced with VirtualBox 2.2 and
|
---|
1448 | has seen major improvements with every version since.</para>
|
---|
1449 | </footnote></para>
|
---|
1450 |
|
---|
1451 | <para>OVF is a cross-platform standard supported by many virtualization
|
---|
1452 | products which allows for creating ready-made virtual machines that can
|
---|
1453 | then be imported into a virtualizer such as VirtualBox. VirtualBox makes
|
---|
1454 | OVF import and export easy to access and supports it from the Manager
|
---|
1455 | window as well as its command-line interface. This allows for packaging
|
---|
1456 | so-called <emphasis role="bold">virtual appliances</emphasis>: disk images
|
---|
1457 | together with configuration settings that can be distributed easily. This
|
---|
1458 | way one can offer complete ready-to-use software packages (operating
|
---|
1459 | systems with applications) that need no configuration or installation
|
---|
1460 | except for importing into VirtualBox.<note>
|
---|
1461 | <para>The OVF standard is complex, and support in VirtualBox is an
|
---|
1462 | ongoing process. In particular, no guarantee is made that VirtualBox
|
---|
1463 | supports all appliances created by other virtualization software. For
|
---|
1464 | a list of known limitations, please see <xref
|
---|
1465 | linkend="KnownIssues" />.</para>
|
---|
1466 | </note></para>
|
---|
1467 |
|
---|
1468 | <para>Appliances in OVF format can appear in two variants:<orderedlist>
|
---|
1469 | <listitem>
|
---|
1470 | <para>They can come in several files, as one or several disk images,
|
---|
1471 | typically in the widely-used VMDK format (see <xref
|
---|
1472 | linkend="vdidetails" />) and a textual description file in an XML
|
---|
1473 | dialect with an <computeroutput>.ovf</computeroutput> extension.
|
---|
1474 | These files must then reside in the same directory for VirtualBox to
|
---|
1475 | be able to import them.</para>
|
---|
1476 | </listitem>
|
---|
1477 |
|
---|
1478 | <listitem>
|
---|
1479 | <para>Alternatively, the above files can be packed together into a
|
---|
1480 | single archive file, typically with an
|
---|
1481 | <computeroutput>.ova</computeroutput> extension. (Such archive files
|
---|
1482 | use a variant of the TAR archive format and can therefore be
|
---|
1483 | unpacked outside of VirtualBox with any utility that can unpack
|
---|
1484 | standard TAR files.)</para>
|
---|
1485 | </listitem>
|
---|
1486 | </orderedlist></para>
|
---|
1487 |
|
---|
1488 | <para>To <emphasis role="bold">import</emphasis> an appliance in one of
|
---|
1489 | the above formats, simply double-click on the OVF/OVA file.<footnote>
|
---|
1490 | <para>Starting with version 4.0, VirtualBox creates file type
|
---|
1491 | associations for OVF and OVA files on your host operating
|
---|
1492 | system.</para>
|
---|
1493 | </footnote> Alternatively, select "File" -> "Import appliance" from
|
---|
1494 | the Manager window. In the file dialog that comes up, navigate to the file
|
---|
1495 | with either the <computeroutput>.ovf</computeroutput> or the
|
---|
1496 | <computeroutput>.ova</computeroutput> file extension.</para>
|
---|
1497 |
|
---|
1498 | <para>If VirtualBox can handle the file, a dialog similar to the following
|
---|
1499 | will appear:</para>
|
---|
1500 |
|
---|
1501 | <para><mediaobject>
|
---|
1502 | <imageobject>
|
---|
1503 | <imagedata align="center" fileref="images/ovf-import.png"
|
---|
1504 | width="12cm" />
|
---|
1505 | </imageobject>
|
---|
1506 | </mediaobject>This presents the virtual machines described in the OVF
|
---|
1507 | file and allows you to change the virtual machine settings by
|
---|
1508 | double-clicking on the description items. Once you click on <emphasis
|
---|
1509 | role="bold">"Import"</emphasis>, VirtualBox will copy the disk images and
|
---|
1510 | create local virtual machines with the settings described in the dialog.
|
---|
1511 | These will then show up in the Manager's list of virtual machines.</para>
|
---|
1512 |
|
---|
1513 | <para>Note that since disk images tend to be big, and VMDK images that
|
---|
1514 | come with virtual appliances are typically shipped in a special compressed
|
---|
1515 | format that is unsuitable for being used by virtual machines directly, the
|
---|
1516 | images will need to be unpacked and copied first, which can take a few
|
---|
1517 | minutes.</para>
|
---|
1518 |
|
---|
1519 | <para>For how to import an image at the command line, please see <xref
|
---|
1520 | linkend="vboxmanage-import" />.</para>
|
---|
1521 |
|
---|
1522 | <para>Conversely, to <emphasis role="bold">export</emphasis> virtual
|
---|
1523 | machines that you already have in VirtualBox, select "File" -> "Export
|
---|
1524 | appliance". A different dialog window shows up that allows you to combine
|
---|
1525 | several virtual machines into an OVF appliance. Then, select the target
|
---|
1526 | location where the target files should be stored, and the conversion
|
---|
1527 | process begins. This can again take a while.</para>
|
---|
1528 |
|
---|
1529 | <para>For how to export an image at the command line, please see <xref
|
---|
1530 | linkend="vboxmanage-export" />.<note>
|
---|
1531 | <para>OVF cannot describe snapshots that were taken for a virtual
|
---|
1532 | machine. As a result, when you export a virtual machine that has
|
---|
1533 | snapshots, only the current state of the machine will be exported, and
|
---|
1534 | the disk images in the export will have a "flattened" state identical
|
---|
1535 | to the current state of the virtual machine.</para>
|
---|
1536 | </note></para>
|
---|
1537 | </sect1>
|
---|
1538 |
|
---|
1539 | <sect1 id="frontends">
|
---|
1540 | <title>Alternative front-ends</title>
|
---|
1541 |
|
---|
1542 | <para>As briefly mentioned in <xref linkend="features-overview" />,
|
---|
1543 | VirtualBox has a very flexible internal design that allows for using
|
---|
1544 | multiple interfaces to control the same virtual machines. To illustrate,
|
---|
1545 | you can, for example, start a virtual machine with the VirtualBox Manager
|
---|
1546 | window and then stop it from the command line. With VirtualBox's support
|
---|
1547 | for the Remote Desktop Protocol (RDP), you can even run virtual machines
|
---|
1548 | remotely on a headless server and have all the graphical output redirected
|
---|
1549 | over the network.</para>
|
---|
1550 |
|
---|
1551 | <para>In detail, the following front-ends are shipped in the standard
|
---|
1552 | VirtualBox package:</para>
|
---|
1553 |
|
---|
1554 | <para><orderedlist>
|
---|
1555 | <listitem>
|
---|
1556 | <para><computeroutput>VirtualBox</computeroutput> is the VirtualBox
|
---|
1557 | Manager. This graphical user interface uses the Qt toolkit; most of
|
---|
1558 | this User Manual is dedicated to describing it. While this is the
|
---|
1559 | easiest to use, some of the more advanced VirtualBox features are
|
---|
1560 | kept away from it to keep it simple.</para>
|
---|
1561 | </listitem>
|
---|
1562 |
|
---|
1563 | <listitem>
|
---|
1564 | <para><computeroutput>VBoxManage</computeroutput> is our
|
---|
1565 | command-line interface for automated and very detailed control of
|
---|
1566 | every aspect of VirtualBox. It is described in <xref
|
---|
1567 | linkend="vboxmanage" />.</para>
|
---|
1568 | </listitem>
|
---|
1569 |
|
---|
1570 | <listitem>
|
---|
1571 | <para><computeroutput>VBoxSDL</computeroutput> is an alternative,
|
---|
1572 | simple graphical front-end with an intentionally limited feature
|
---|
1573 | set, designed to only display virtual machines that are controlled
|
---|
1574 | in detail with <computeroutput>VBoxManage</computeroutput>. This is
|
---|
1575 | interesting for business environments where displaying all the bells
|
---|
1576 | and whistles of the full GUI is not feasible.
|
---|
1577 | <computeroutput>VBoxSDL</computeroutput> is described in <xref
|
---|
1578 | linkend="vboxsdl" />.</para>
|
---|
1579 | </listitem>
|
---|
1580 |
|
---|
1581 | <listitem>
|
---|
1582 | <para>Finally, <computeroutput>VBoxHeadless</computeroutput> is yet
|
---|
1583 | another front-end that produces no visible output on the host at
|
---|
1584 | all, but merely acts as a RDP server if the VirtualBox Remote
|
---|
1585 | Desktop Extension (VRDE) is installed. As opposed to the other
|
---|
1586 | graphical interfaces, the headless front-end requires no graphics
|
---|
1587 | support. This is useful, for example, if you want to host your
|
---|
1588 | virtual machines on a headless Linux server that has no X Window
|
---|
1589 | system installed. For details, see <xref
|
---|
1590 | linkend="vboxheadless" />.</para>
|
---|
1591 | </listitem>
|
---|
1592 | </orderedlist>If the above front-ends still do not satisfy your
|
---|
1593 | particular needs, it is possible to create yet another front-end to the
|
---|
1594 | complex virtualization engine that is the core of VirtualBox, as the
|
---|
1595 | VirtualBox core neatly exposes all of its features in a clean API; please
|
---|
1596 | refer to <xref linkend="VirtualBoxAPI" />.</para>
|
---|
1597 | </sect1>
|
---|
1598 | </chapter>
|
---|