VirtualBox

source: vbox/trunk/doc/manual/en_US/user_Introduction.xml@ 31735

最後變更 在這個檔案從31735是 31735,由 vboxsync 提交於 14 年 前

export the manual to OSE

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette