VirtualBox

source: vbox/trunk/doc/manual/en_US/user_GuestAdditions.xml@ 43696

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

doc/manual: Added certificate installation for Windows Guest Additions.

檔案大小: 77.2 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="guestadditions">Guest Additions</title>
6
7 <para>The previous chapter covered getting started with VirtualBox and
8 installing operating systems in a virtual machine. For any serious and
9 interactive use, the VirtualBox Guest Additions will make your life much
10 easier by providing closer integration between host and guest and improving
11 the interactive performance of guest systems. This chapter describes the
12 Guest Additions in detail.</para>
13
14 <sect1>
15 <title>Introduction</title>
16
17 <para>As mentioned in <xref linkend="virtintro" />, the Guest Additions
18 are designed to be installed <emphasis>inside</emphasis> a virtual machine
19 after the guest operating system has been installed. They consist of
20 device drivers and system applications that optimize the guest operating
21 system for better performance and usability. Please see <xref
22 linkend="guestossupport" /> for details on what guest operating systems
23 are fully supported with Guest Additions by VirtualBox.</para>
24
25 <para>The VirtualBox Guest Additions for all supported guest operating
26 systems are provided as a single CD-ROM image file which is called
27 <computeroutput>VBoxGuestAdditions.iso</computeroutput>. This image file
28 is located in the installation directory of VirtualBox. To install the
29 Guest Additions for a particular VM, you mount this ISO file in your VM as
30 a virtual CD-ROM and install from there.</para>
31
32 <para>The Guest Additions offer the following features:<glosslist>
33 <glossentry>
34 <glossterm>Mouse pointer integration</glossterm>
35
36 <glossdef>
37 <para>To overcome the limitations for mouse support that were
38 described in <xref linkend="keyb_mouse_normal" />, this provides
39 you with seamless mouse support. You will only have one mouse
40 pointer and pressing the Host key is no longer required to "free"
41 the mouse from being captured by the guest OS. To make this work,
42 a special mouse driver is installed in the guest that communicates
43 with the "real" mouse driver on your host and moves the guest
44 mouse pointer accordingly.</para>
45 </glossdef>
46 </glossentry>
47
48 <glossentry>
49 <glossterm>Shared folders</glossterm>
50
51 <glossdef>
52 <para>These provide an easy way to exchange files between the host
53 and the guest. Much like ordinary Windows network shares, you can
54 tell VirtualBox to treat a certain host directory as a shared
55 folder, and VirtualBox will make it available to the guest
56 operating system as a network share, irrespective of whether guest
57 actually has a network. For details, please refer to <xref
58 linkend="sharedfolders" />.</para>
59 </glossdef>
60 </glossentry>
61
62 <glossentry>
63 <glossterm>Better video support</glossterm>
64
65 <glossdef>
66 <para>While the virtual graphics card which VirtualBox emulates
67 for any guest operating system provides all the basic features,
68 the custom video drivers that are installed with the Guest
69 Additions provide you with extra high and non-standard video modes
70 as well as accelerated video performance.</para>
71
72 <para>In addition, with Windows, Linux and Solaris guests, you can
73 resize the virtual machine's window if the Guest Additions are
74 installed. The video resolution in the guest will be automatically
75 adjusted (as if you had manually entered an arbitrary resolution
76 in the guest's display settings). Please see <xref
77 linkend="intro-resize-window" /> also.</para>
78
79 <para>Finally, if the Guest Additions are installed, 3D graphics
80 and 2D video for guest applications can be accelerated; see <xref
81 linkend="guestadd-video" />.</para>
82 </glossdef>
83 </glossentry>
84
85 <glossentry>
86 <glossterm>Seamless windows</glossterm>
87
88 <glossdef>
89 <para>With this feature, the individual windows that are displayed
90 on the desktop of the virtual machine can be mapped on the host's
91 desktop, as if the underlying application was actually running on
92 the host. See <xref linkend="seamlesswindows" /> for
93 details.</para>
94 </glossdef>
95 </glossentry>
96
97 <glossentry>
98 <glossterm>Generic host/guest communication channels</glossterm>
99
100 <glossdef>
101 <para>The Guest Additions enable you to control and monitor guest
102 execution in ways other than those mentioned above. The so-called
103 "guest properties" provide a generic string-based mechanism to
104 exchange data bits between a guest and a host, some of which have
105 special meanings for controlling and monitoring the guest; see
106 <xref linkend="guestadd-guestprops" /> for details.</para>
107
108 <para>Additionally, applications can be started in a guest from
109 the host; see <xref linkend="guestadd-guestcontrol" />.</para>
110 </glossdef>
111 </glossentry>
112
113 <glossentry>
114 <glossterm>Time synchronization</glossterm>
115
116 <glossdef>
117 <para>With the Guest Additions installed, VirtualBox can ensure
118 that the guest's system time is better synchronized with that of
119 the host.</para>
120
121 <para>For various reasons, the time in the guest might run at a
122 slightly different rate than the time on the host. The host could
123 be receiving updates via NTP and its own time might not run
124 linearly. A VM could also be paused, which stops the flow of time
125 in the guest for a shorter or longer period of time. When the wall
126 clock time between the guest and host only differs slightly, the
127 time synchronization service attempts to gradually and smoothly
128 adjust the guest time in small increments to either "catch up" or
129 "lose" time. When the difference is too great (e.g., a VM paused
130 for hours or restored from saved state), the guest time is changed
131 immediately, without a gradual adjustment.</para>
132
133 <para>The Guest Additions will re-synchronize the time regularly.
134 See <xref linkend="changetimesync" /> for how to configure the
135 parameters of the time synchronization mechanism.</para>
136 </glossdef>
137 </glossentry>
138
139 <glossentry>
140 <glossterm>Shared clipboard</glossterm>
141
142 <glossdef>
143 <para>With the Guest Additions installed, the clipboard of the
144 guest operating system can optionally be shared with your host
145 operating system; see <xref linkend="generalsettings" />.</para>
146 </glossdef>
147 </glossentry>
148
149 <glossentry>
150 <glossterm>Automated logons (credentials passing)</glossterm>
151
152 <glossdef>
153 <para>For details, please see <xref linkend="autologon" />.</para>
154 </glossdef>
155 </glossentry>
156 </glosslist></para>
157
158 <para>Each version of VirtualBox, even minor releases, ship with their own
159 version of the Guest Additions. While the interfaces through which the
160 VirtualBox core communicates with the Guest Additions are kept stable so
161 that Guest Additions already installed in a VM should continue to work
162 when VirtualBox is upgraded on the host, for best results, it is
163 recommended to keep the Guest Additions at the same version.</para>
164
165 <para>Starting with VirtualBox 3.1, the Windows and Linux Guest Additions
166 therefore check automatically whether they have to be updated. If the host
167 is running a newer VirtualBox version than the Guest Additions, a
168 notification with further instructions is displayed in the guest.</para>
169
170 <para>To disable this update check for the Guest Additions of a given
171 virtual machine, set the value of its
172 <computeroutput>/VirtualBox/GuestAdd/CheckHostVersion</computeroutput>
173 guest property to <computeroutput>0</computeroutput>; see <xref
174 linkend="guestadd-guestprops" /> for details.</para>
175 </sect1>
176
177 <sect1>
178 <title>Installing and Maintaining Guest Additions</title>
179
180 <para>Guest Additions are available for virtual machines running Windows,
181 Linux, Solaris or OS/2. The following sections describe the specifics of
182 each variant in detail.</para>
183
184 <sect2 id="additions-windows">
185 <title>Guest Additions for Windows</title>
186
187 <para>The VirtualBox Windows Guest Additions are designed to be
188 installed in a virtual machine running a Windows operating system. The
189 following versions of Windows guests are supported:</para>
190
191 <itemizedlist>
192 <listitem>
193 <para>Microsoft Windows NT 4.0 (any service pack)</para>
194 </listitem>
195
196 <listitem>
197 <para>Microsoft Windows 2000 (any service pack)</para>
198 </listitem>
199
200 <listitem>
201 <para>Microsoft Windows XP (any service pack)</para>
202 </listitem>
203
204 <listitem>
205 <para>Microsoft Windows Server 2003 (any service pack)</para>
206 </listitem>
207
208 <listitem>
209 <para>Microsoft Windows Server 2008</para>
210 </listitem>
211
212 <listitem>
213 <para>Microsoft Windows Vista (all editions)</para>
214 </listitem>
215
216 <listitem>
217 <para>Microsoft Windows 7 (all editions)</para>
218 </listitem>
219
220 <listitem>
221 <para>Microsoft Windows 8 (all editions)</para>
222 </listitem>
223
224 <listitem>
225 <para>Microsoft Windows Server 2012</para>
226 </listitem>
227
228 </itemizedlist>
229
230 <sect3 id="mountingadditionsiso">
231 <title>Installation</title>
232
233 <para>In the "Devices" menu in the virtual machine's menu bar,
234 VirtualBox has a handy menu item named "Install guest additions",
235 which mounts the Guest Additions ISO file inside your virtual machine.
236 A Windows guest should then automatically start the Guest Additions
237 installer, which installs the Guest Additions into your Windows
238 guest.</para>
239
240 <note>
241 <para>For the basic Direct3D acceleration to work in a Windows Guest, you
242 have to install the Guest Additions in "Safe Mode".
243 This does <emphasis role="bold">not</emphasis> apply to the experimental
244 WDDM Direct3D video driver available
245 for Vista and Windows 7 guests, see <xref linkend="KnownIssues" /> for
246 details.<footnote><para>The experimental WDDM driver was added with
247 VirtualBox 4.1.</para></footnote></para>
248 </note>
249
250 <para>If you prefer to mount the additions manually, you can perform
251 the following steps:</para>
252
253 <orderedlist>
254 <listitem>
255 <para>Start the virtual machine in which you have installed
256 Windows.</para>
257 </listitem>
258
259 <listitem>
260 <para>Select "Mount CD/DVD-ROM" from the "Devices" menu in the
261 virtual machine's menu bar and then "CD/DVD-ROM image". This
262 brings up the Virtual Media Manager described in <xref
263 linkend="vdis" />.</para>
264 </listitem>
265
266 <listitem>
267 <para>In the Virtual Media Manager, press the "Add" button and
268 browse your host file system for the
269 <computeroutput>VBoxGuestAdditions.iso</computeroutput>
270 file:<itemizedlist>
271 <listitem>
272 <para>On a Windows host, you can find this file in the
273 VirtualBox installation directory (usually under
274 <computeroutput>C:\Program
275 files\Oracle\VirtualBox</computeroutput> ).</para>
276 </listitem>
277
278 <listitem>
279 <para>On Mac OS X hosts, you can find this file in the
280 application bundle of VirtualBox. (Right click on the
281 VirtualBox icon in Finder and choose <emphasis>Show Package
282 Contents</emphasis>. There it is located in the
283 <computeroutput>Contents/MacOS</computeroutput>
284 folder.)</para>
285 </listitem>
286
287 <listitem>
288 <para>On a Linux host, you can find this file in the
289 <computeroutput>additions</computeroutput> folder under
290 where you installed VirtualBox (normally
291 <computeroutput>/opt/VirtualBox/</computeroutput>).</para>
292 </listitem>
293
294 <listitem>
295 <para>On Solaris hosts, you can find this file in the
296 <computeroutput>additions</computeroutput> folder under
297 where you installed VirtualBox (normally
298 <computeroutput>/opt/VirtualBox</computeroutput>).</para>
299 </listitem>
300 </itemizedlist></para>
301 </listitem>
302
303 <listitem>
304 <para>Back in the Virtual Media Manager, select that ISO file and
305 press the "Select" button. This will mount the ISO file and
306 present it to your Windows guest as a CD-ROM.</para>
307 </listitem>
308 </orderedlist>
309
310 <para>Unless you have the Autostart feature disabled in your Windows
311 guest, Windows will now autostart the VirtualBox Guest Additions
312 installation program from the Additions ISO. If the Autostart feature
313 has been turned off, choose
314 <computeroutput>VBoxWindowsAdditions.exe</computeroutput> from the
315 CD/DVD drive inside the guest to start the installer.</para>
316
317 <para>The installer will add several device drivers to the Windows
318 driver database and then invoke the hardware detection wizard.</para>
319
320 <para>Depending on your configuration, it might display warnings that
321 the drivers are not digitally signed. You must confirm these in order
322 to continue the installation and properly install the
323 Additions.</para>
324
325 <para>After installation, reboot your guest operating system to
326 activate the Additions.</para>
327 </sect3>
328
329 <sect3>
330 <title>Updating the Windows Guest Additions</title>
331
332 <para>Windows Guest Additions can be updated by running the
333 installation program again, as previously described. This will then
334 replace the previous Additions drivers with updated versions.</para>
335
336 <para>Alternatively, you may also open the Windows Device Manager and
337 select "Update driver..." for two devices:</para>
338
339 <orderedlist>
340 <listitem>
341 <para>the VirtualBox Graphics Adapter and</para>
342 </listitem>
343
344 <listitem>
345 <para>the VirtualBox System Device.</para>
346 </listitem>
347 </orderedlist>
348
349 <para>For each, choose to provide your own driver and use "Have Disk"
350 to point the wizard to the CD-ROM drive with the Guest
351 Additions.</para>
352 </sect3>
353
354 <sect3>
355 <title>Unattended Installation</title>
356
357 <para>As a prerequiste for performing an unattended installation of the
358 VirtualBox Guest Additions on a Windows guest, there need to be
359 Oracle CA (Certificate Authority)
360 certificates installed in order to prevent user intervention popus which
361 will undermine a silent installation.</para>
362
363 <note>On some Windows versions like Windows 2000 and Windows XP the user intervention
364 popups mentioned above always will be displayed, even after importing the Oracle certificates.</note>
365
366 <para>Since VirtualBox 4.2 installing those CA certificates on a Windows
367 guest can be done in an automated fashion using the
368 <computeroutput>VBoxCertUtil.exe</computeroutput> utility found on the Guest
369 Additions installation CD in the <computeroutput>cert</computeroutput>
370 folder:</para>
371
372 <itemizedlist>
373 <listitem>
374 <para>Log in as Administrator on the guest.</para>
375 </listitem>
376
377 <listitem>
378 <para>Mount the VirtualBox Guest Additions .ISO.</para>
379 </listitem>
380
381 <listitem>
382 <para>Open a command line window on the guest and change to
383 the <computeroutput>cert</computeroutput> folder on the VirtualBox
384 Guest Additions CD.</para>
385 </listitem>
386
387 <listitem>
388 <para>Do a <computeroutput>VBoxCertUtil add-trusted-publisher oracle-vbox.cer --root oracle-vbox.cer</computeroutput>.</para>
389 <para>This will install the certificates to the certificate store. When installing the same certificate
390 more than once, an appropriate error will be displayed.</para>
391 </listitem>
392 </itemizedlist>
393
394 <para>Prior to VirtualBox 4.2 the Oracle CA certificates need to be imported in more manual style
395 using the <computeroutput>certutil.exe</computeroutput> utility, which is shipped since Windows
396 Vista. For Windows versions before Vista you need to download and install <computeroutput>certutil.exe</computeroutput>
397 manually. Since the certificates are not accompanied on the VirtualBox Guest Additions CD-ROM
398 prior to 4.2, these need to get extracted from a signed VirtualBox executable first.</para>
399
400 <para>In the following example the needed certificates will be extracted from the VirtualBox
401 Windows Guest Additions installer on the CD-ROM:</para>
402
403 <sect4>
404 <title>VeriSign Code Signing CA</title>
405 <itemizedlist>
406 <listitem>
407 <para>In the Windows Explorer, right click on VBoxWindowsAdditions-&lt;Architecture&gt;.exe,
408 click on "Properties"</para>
409 </listitem>
410 <listitem>
411 <para>Go to tab "Digital Signatures", choose "Oracle Corporation" and click on "Details"</para>
412 </listitem>
413 <listitem>
414 <para>In tab "General" click on "View Certificate"</para>
415 </listitem>
416 <listitem>
417 <para>In tab "Certification Path" select "VeriSign Class 3 Public Primary CA"</para>
418 </listitem>
419 <listitem>
420 <para>Click on "View Certificate"</para>
421 </listitem>
422 <listitem>
423 <para>In tab "Details" click on "Copy to File ..."</para>
424 </listitem>
425 <listitem>
426 <para>In the upcoming wizard choose "DER encoded binary X.509 (.CER)"
427 and save the certificate file to a local path, finish the wizard</para>
428 </listitem>
429 <listitem>
430 <para>Close certificate dialog for "Verisign Class 3 Code Signing
431 2010 CA"</para>
432 </listitem>
433 </itemizedlist>
434 </sect4>
435
436 <sect4>
437 <title>Oracle Corporation</title>
438 <itemizedlist>
439 <listitem>
440 <para>In the Windows Explorer, right click on VBoxWindowsAdditions-&lt;Architecture&gt;.exe,
441 click on "Properties"</para>
442 </listitem>
443 <listitem>
444 <para>Go to tab "Digital Signatures", choose "Oracle Corporation" and click on "Details"</para>
445 </listitem>
446 <listitem>
447 <para>In tab "General" click on "View Certificate"</para>
448 </listitem>
449 <listitem>
450 <para>In tab "Details" click on "Copy to File ..."</para>
451 </listitem>
452 <listitem>
453 <para>In the upcoming wizard choose "DER encoded binary X.509 (.CER)"
454 and save the certificate file to a local path, finish the wizard</para>
455 </listitem>
456 <listitem>
457 <para>Close certificate dialog for "Oracle Corporation"</para>
458 </listitem>
459 </itemizedlist>
460 </sect4>
461
462 <para>After exporting the two certificates above they can be imported into the
463 certificate store using the <computeroutput>certutil.exe</computeroutput>
464 utility:</para>
465
466 <para><computeroutput>certutil -addstore -f Root "&lt;Path to exported
467 certificate file&gt;"</computeroutput></para>
468
469 <para>In order to allow for completely unattended guest installations,
470 you can specify a command line parameter to the install
471 launcher:</para>
472
473 <screen>VBoxWindowsAdditions.exe /S</screen>
474
475 <para>This automatically installs the right files and drivers for the
476 corresponding platform (32- or 64-bit).</para>
477
478 <para>For more options regarding unattended guest installations,
479 consult the command line help by using the command:</para>
480
481 <screen>VBoxWindowsAdditions.exe /?</screen>
482 </sect3>
483
484 <sect3 id="windows-guest-file-extraction">
485 <title>Manual file extraction</title>
486
487 <para>If you would like to install the files and drivers manually, you
488 can extract the files from the Windows Guest Additions setup by
489 typing:</para>
490
491 <screen>VBoxWindowsAdditions.exe /extract</screen>
492
493 <para>To explicitly extract the Windows Guest Additions for another
494 platform than the current running one (e.g. 64-bit files on a 32-bit
495 system), you have to execute the appropriate platform installer
496 (<computeroutput>VBoxWindowsAdditions-x86.exe</computeroutput> or
497 <computeroutput>VBoxWindowsAdditions-amd64.exe</computeroutput>) with
498 the <computeroutput>/extract</computeroutput> parameter.</para>
499 </sect3>
500
501 </sect2>
502
503 <sect2>
504 <title>Guest Additions for Linux</title>
505
506 <para>Like the Windows Guest Additions, the VirtualBox Guest Additions
507 for Linux are a set of device drivers and system applications which may
508 be installed in the guest operating system.</para>
509
510 <para>The following Linux distributions are officially supported:</para>
511
512 <itemizedlist>
513 <listitem>
514 <para>Fedora as of Fedora Core 4;</para>
515 </listitem>
516
517 <listitem>
518 <para>Redhat Enterprise Linux as of version 3;</para>
519 </listitem>
520
521 <listitem>
522 <para>SUSE and openSUSE Linux as of version 9;</para>
523 </listitem>
524
525 <listitem>
526 <para>Ubuntu as of version 5.10.</para>
527 </listitem>
528 </itemizedlist>
529
530 <para>Many other distributions are known to work with the Guest
531 Additions.</para>
532
533 <para>The version of the Linux kernel supplied by default in SUSE and
534 openSUSE 10.2, Ubuntu 6.10 (all versions) and Ubuntu 6.06 (server
535 edition) contains a bug which can cause it to crash during startup when
536 it is run in a virtual machine. The Guest Additions work in those
537 distributions.</para>
538
539 <para>Note that some Linux distributions already come with all or part of
540 the VirtualBox Guest Additions. You may choose to keep the distribution's
541 version of the Guest Additions but these are often not up to date and
542 limited in functionality, so we recommend replacing them with the
543 Guest Additions that come with VirtualBox. The VirtualBox Linux Guest
544 Additions installer tries to detect existing installation and replace
545 them but depending on how the distribution integrates the Guest
546 Additions, this may require some manual interaction. It is highly
547 recommended to take a snapshot of the virtual machine before replacing
548 pre-installed Guest Additions.</para>
549
550 <sect3>
551 <title>Installing the Linux Guest Additions</title>
552
553 <para>The VirtualBox Guest Additions for Linux are provided on the
554 same virtual CD-ROM file as the Guest Additions for Windows described
555 above. They also come with an installation program guiding you through
556 the setup process, although, due to the significant differences between
557 Linux distributions, installation may be slightly more complex.</para>
558
559 <para>Installation generally involves the following steps:</para>
560
561 <orderedlist>
562 <listitem>
563 <para>Before installing the Guest Additions, you will have to
564 prepare your guest system for building external kernel modules.
565 This works similarly as described in <xref
566 linkend="externalkernelmodules" />, except that this step must now
567 be performed in your Linux <emphasis>guest</emphasis> instead of
568 on a Linux host system, as described there.</para>
569
570 <para>Again, as with Linux hosts, we recommend using DKMS if it is
571 available for the guest system. If it is not installed, use this
572 command for Ubuntu/Debian systems:
573 <screen>sudo apt-get install dkms</screen>
574 or for Fedora systems: <screen>yum install dkms</screen></para>
575
576 <para>Be sure to install DKMS <emphasis>before</emphasis>
577 installing the Linux Guest Additions. If DKMS is not available
578 or not installed, the guest kernel modules will need to be
579 recreated manually whenever the guest kernel is updated using
580 the command <screen>/etc/init.d/vboxadd setup</screen> as root.
581 </para>
582 </listitem>
583
584 <listitem>
585 <para>Insert the
586 <computeroutput>VBoxGuestAdditions.iso</computeroutput> CD file
587 into your Linux guest's virtual CD-ROM drive, exactly the same way
588 as described for a Windows guest in <xref
589 linkend="mountingadditionsiso" />.</para>
590 </listitem>
591
592 <listitem>
593 <para>Change to the directory where your CD-ROM drive is mounted
594 and execute as root:</para>
595
596 <screen>sh ./VBoxLinuxAdditions.run</screen>
597
598 </listitem>
599 </orderedlist>
600
601 <para>For your convenience, we provide the following step-by-step
602 instructions for freshly installed copies of recent versions of the most
603 popular Linux distributions. After these preparational steps, you can
604 execute the VirtualBox Guest Additions installer as described
605 above.</para>
606
607 <sect4>
608 <title>Ubuntu</title>
609
610 <para><orderedlist>
611 <listitem>
612 <para>In order to fully update your guest system, open a
613 terminal and run <screen>apt-get update</screen> as root
614 followed by <screen>apt-get upgrade</screen></para>
615 </listitem>
616
617 <listitem>
618 <para>Install DKMS using <screen>apt-get install dkms</screen></para>
619 </listitem>
620
621 <listitem>
622 <para>Reboot your guest system in order to activate the
623 updates and then proceed as described above.</para>
624 </listitem>
625 </orderedlist></para>
626 </sect4>
627
628 <sect4>
629 <title>Fedora</title>
630
631 <para><orderedlist>
632 <listitem>
633 <para>In order to fully update your guest system, open a
634 terminal and run <screen>yum update</screen></para> as root.
635 </listitem>
636
637 <listitem>
638 <para>Install DKMS and the GNU C compiler using <screen>yum install dkms</screen>
639 followed by <screen>yum install gcc</screen></para>
640 </listitem>
641
642 <listitem>
643 <para>Reboot your guest system in order to activate the
644 updates and then proceed as described above.</para>
645 </listitem>
646 </orderedlist></para>
647 </sect4>
648
649 <sect4>
650 <title>openSUSE</title>
651
652 <para><orderedlist>
653 <listitem>
654 <para>In order to fully update your guest system, open a
655 terminal and run <screen>zypper update</screen></para> as root.
656 </listitem>
657
658 <listitem>
659 <para>Install the make tool and the GNU C compiler using
660 <screen>zypper install make gcc</screen></para>
661 </listitem>
662
663 <listitem>
664 <para>Reboot your guest system in order to activate the
665 updates.</para>
666 </listitem>
667
668 <listitem>
669 <para>Find out which kernel you are running using <screen>uname -a</screen>
670 An example would be
671 <computeroutput>2.6.31.12-0.2-default</computeroutput> which
672 refers to the "default" kernel. Then install the correct
673 kernel development package. In the above example this would be
674 <screen>zypper install kernel-default-devel</screen></para>
675 </listitem>
676
677 <listitem>
678 <para>Make sure that your running kernel
679 (<computeroutput>uname -a</computeroutput>) and the kernel
680 packages you have installed (<computeroutput>rpm -qa
681 kernel\*</computeroutput>) have the exact same version number.
682 Proceed with the installation as described above.</para>
683 </listitem>
684 </orderedlist></para>
685 </sect4>
686
687 <sect4>
688 <title>SuSE Linux Enterprise Desktop (SLED)</title>
689
690 <para><orderedlist>
691 <listitem>
692 <para>In order to fully update your guest system, open a
693 terminal and run <screen>zypper update</screen></para> as root.
694 </listitem>
695
696 <listitem>
697 <para>Install the GNU C compiler using <screen>zypper install gcc</screen></para>
698 </listitem>
699
700 <listitem>
701 <para>Reboot your guest system in order to activate the
702 updates.</para>
703 </listitem>
704
705 <listitem>
706 <para>Find out which kernel you are running using <screen>uname -a</screen>
707 An example would be
708 <computeroutput>2.6.27.19-5.1-default</computeroutput> which
709 refers to the "default" kernel. Then install the correct
710 kernel development package. In the above example this would be
711 <screen>zypper install kernel-syms kernel-source</screen></para>
712 </listitem>
713
714 <listitem>
715 <para>Make sure that your running kernel
716 (<computeroutput>uname -a</computeroutput>) and the kernel
717 packages you have installed (<computeroutput>rpm -qa
718 kernel\*</computeroutput>) have the exact same version number.
719 Proceed with the installation as described above.</para>
720 </listitem>
721 </orderedlist></para>
722 </sect4>
723
724 <sect4>
725 <title>Mandrake</title>
726
727 <para><orderedlist>
728 <listitem>
729 <para>Mandrake ships with the VirtualBox Guest Additions which
730 will be replaced if you follow these steps.</para>
731 </listitem>
732
733 <listitem>
734 <para>In order to fully update your guest system, open a
735 terminal and run <screen>urpmi --auto-update</screen></para>
736 as root.
737 </listitem>
738
739 <listitem>
740 <para>Reboot your system in order to activate the
741 updates.</para>
742 </listitem>
743
744 <listitem>
745 <para>Install DKMS using <screen>urpmi dkms</screen> and make
746 sure to choose the correct kernel-devel package when asked by
747 the installer (use <computeroutput>uname -a</computeroutput>
748 to compare).</para>
749 </listitem>
750 </orderedlist></para>
751 </sect4>
752
753 <sect4>
754 <title>CentOS, Red Hat Enterprise Linux and Oracle
755 Enterprise Linux</title>
756
757 <para><orderedlist>
758 <listitem>
759 <para>For versions prior to 6, add <computeroutput>divider=10</computeroutput>
760 to the kernel boot options in
761 <computeroutput>/etc/grub.conf</computeroutput> to reduce the
762 idle CPU load.</para>
763 </listitem>
764
765 <listitem>
766 <para>In order to fully update your guest system, open a
767 terminal and run <screen>yum update</screen></para> as root.
768 </listitem>
769
770 <listitem>
771 <para>Install the GNU C compiler and the kernel development
772 packages using <screen>yum install gcc</screen> followed by
773 <screen>yum install kernel-devel</screen></para>
774 </listitem>
775
776 <listitem>
777 <para>Reboot your guest system in order to activate the
778 updates and then proceed as described above.</para>
779 </listitem>
780
781 <listitem>
782 <para>In case Oracle Enterprise Linux does not find the
783 required packages, you either have to install them from a
784 different source (e.g. DVD) or use Oracle's public Yum server
785 located at <ulink
786 url="http://public-yum.oracle.com/">http://public-yum.oracle.com</ulink>.</para>
787 </listitem>
788 </orderedlist></para>
789 </sect4>
790
791 <sect4>
792 <title>Debian</title>
793
794 <para><orderedlist>
795 <listitem>
796 <para>In order to fully update your guest system, open a
797 terminal and run <screen>apt-get update</screen> as root
798 followed by <screen>apt-get upgrade</screen></para>
799 </listitem>
800
801 <listitem>
802 <para>Install the make tool and the GNU C compiler using
803 <screen>apt-get install make gcc</screen></para>
804 </listitem>
805
806 <listitem>
807 <para>Reboot your guest system in order to activate the
808 updates.</para>
809 </listitem>
810
811 <listitem>
812 <para>Determine the exact version of your kernel using
813 <computeroutput>uname -a</computeroutput> and install the
814 correct version of the linux-headers package, e.g. using
815 <screen>apt-get install linux-headers-2.6.26-2-686</screen></para>
816 </listitem>
817 </orderedlist></para>
818 </sect4>
819 </sect3>
820
821 <sect3>
822 <title>Graphics and mouse integration</title>
823
824 <para>In Linux and Solaris guests, VirtualBox graphics and mouse
825 integration goes through the X Window System. VirtualBox can use
826 the X.Org variant of the system (or XFree86 version 4.3 which is
827 identical to the first X.Org release). During the installation process,
828 the X.Org display server will be set up to use the graphics and mouse
829 drivers which come with the Guest Additions.</para>
830
831 <para>After installing the Guest Additions into a fresh installation of
832 a supported Linux distribution or Solaris system (many unsupported
833 systems will work correctly too), the guest's graphics
834 mode will change to fit the size of the VirtualBox window
835 on the host when it is resized. You can also ask the guest system to
836 switch to a particular resolution by sending a "video mode hint" using
837 the <computeroutput>VBoxManage</computeroutput> tool.</para>
838
839 <para>Multiple guest monitors are supported in guests using the X.Org
840 server version 1.3 (which is part of release 7.3 of the X Window System
841 version 11) or a later version. The layout of the guest screens can
842 be adjusted as needed using the tools which come with the guest
843 operating system.</para>
844
845 <para>If you want to understand more about the details of how the
846 X.Org drivers are set up (in particular if you wish to use them in a
847 setting which our installer doesn't handle correctly), you should read
848 <xref linkend="guestxorgsetup" />.</para>
849 </sect3>
850
851 <sect3>
852 <title>Updating the Linux Guest Additions</title>
853
854 <para>The Guest Additions can simply be updated by going through the
855 installation procedure again with an updated CD-ROM image. This will
856 replace the drivers with updated versions. You should reboot after
857 updating the Guest Additions.</para>
858 </sect3>
859
860 <sect3>
861 <title>Uninstalling the Linux Guest Additions</title>
862
863 <para>If you have a version of the Guest Additions installed on your
864 virtual machine and wish to remove it without installing new ones, you
865 can do so by inserting the Guest Additions CD image into the virtual
866 CD-ROM drive as described above and running the installer for the
867 current Guest Additions with the "uninstall" parameter from the path
868 that the CD image is mounted on in the guest: <screen>sh ./VBoxLinuxAdditions.run uninstall</screen></para>
869
870 <para>While this will normally work without issues, you may need to do some
871 manual cleanup of the guest (particularly of the XFree86Config or
872 xorg.conf file) in some cases, particularly if the Additions version
873 installed or the guest operating system were very old, or if you made
874 your own changes to the Guest Additions setup after you installed
875 them.</para>
876
877 <para>Starting with version 3.1.0, you can uninstall the Additions by
878 invoking <screen>/opt/VBoxGuestAdditions-$VBOX_VERSION_STRING/uninstall.sh</screen>Please
879 replace
880 <computeroutput>/opt/VBoxGuestAdditions-$VBOX_VERSION_STRING</computeroutput>
881 with the correct Guest Additions installation directory.</para>
882 </sect3>
883 </sect2>
884
885 <sect2>
886 <title>Guest Additions for Solaris</title>
887
888 <para>Like the Windows Guest Additions, the VirtualBox Guest Additions
889 for Solaris take the form of a set of device drivers and system
890 applications which may be installed in the guest operating
891 system.</para>
892
893 <para>The following Solaris distributions are officially
894 supported:</para>
895
896 <itemizedlist>
897 <listitem>
898 <para>Solaris 11 including Solaris 11 Express;</para>
899 </listitem>
900
901 <listitem>
902 <para>Solaris 10 (u5 and higher);</para>
903 </listitem>
904 </itemizedlist>
905
906 <para>Other distributions may work if they are based on comparable
907 software releases.</para>
908
909 <sect3>
910 <title>Installing the Solaris Guest Additions</title>
911
912 <para>The VirtualBox Guest Additions for Solaris are provided on the
913 same ISO CD-ROM as the Additions for Windows and Linux described
914 above. They also come with an installation program guiding you through
915 the setup process.</para>
916
917 <para>Installation involves the following steps:</para>
918
919 <orderedlist>
920 <listitem>
921 <para>Mount the
922 <computeroutput>VBoxGuestAdditions.iso</computeroutput> file as
923 your Solaris guest's virtual CD-ROM drive, exactly the same way as
924 described for a Windows guest in <xref
925 linkend="mountingadditionsiso" />.</para>
926
927 <para>If in case the CD-ROM drive on the guest doesn't get mounted
928 (observed on some versions of Solaris 10), execute as root:</para>
929
930 <screen>svcadm restart volfs</screen>
931 </listitem>
932
933 <listitem>
934 <para>Change to the directory where your CD-ROM drive is mounted
935 and execute as root:</para>
936
937 <screen>pkgadd -G -d ./VBoxSolarisAdditions.pkg</screen>
938 </listitem>
939
940 <listitem>
941 <para>Choose "1" and confirm installation of the Guest Additions
942 package. After the installation is complete, re-login to X server
943 on your guest to activate the X11 Guest Additions.</para>
944 </listitem>
945 </orderedlist>
946 </sect3>
947
948 <sect3>
949 <title>Uninstalling the Solaris Guest Additions</title>
950
951 <para>The Solaris Guest Additions can be safely removed by removing
952 the package from the guest. Open a root terminal session and
953 execute:</para>
954
955 <para><screen>pkgrm SUNWvboxguest</screen></para>
956 </sect3>
957
958 <sect3>
959 <title>Updating the Solaris Guest Additions</title>
960
961 <para>The Guest Additions should be updated by first uninstalling the
962 existing Guest Additions and then installing the new ones. Attempting
963 to install new Guest Additions without removing the existing ones is
964 not possible.</para>
965 </sect3>
966 </sect2>
967
968 <sect2>
969 <title>Guest Additions for OS/2</title>
970
971 <para>VirtualBox also ships with a set of drivers that improve running
972 OS/2 in a virtual machine. Due to restrictions of OS/2 itself, this
973 variant of the Guest Additions has a limited feature set; see <xref
974 linkend="KnownIssues" /> for details.</para>
975
976 <para>The OS/2 Guest Additions are provided on the same ISO CD-ROM as
977 those for the other platforms. As a result, mount the ISO in OS/2 as
978 described previously. The OS/2 Guest Additions are located in the
979 directory <computeroutput>\32bit\OS2</computeroutput>.</para>
980
981 <para>As we do not provide an automatic installer at this time, please
982 refer to the <computeroutput>readme.txt</computeroutput> file in that
983 directory, which describes how to install the OS/2 Guest Additions
984 manually.</para>
985 </sect2>
986 </sect1>
987
988 <sect1 id="sharedfolders">
989 <title>Shared folders</title>
990
991 <para>With the "shared folders" feature of VirtualBox, you can access
992 files of your host system from within the guest system. This is similar
993 how you would use network shares in Windows networks -- except that shared
994 folders do not need require networking, only the Guest Additions. Shared
995 Folders are supported with Windows (2000 or newer), Linux and Solaris
996 guests.</para>
997
998 <para>Shared folders must physically reside on the
999 <emphasis>host</emphasis> and are then shared with the guest, which uses a
1000 special file system driver in the Guest Addition to talk to the host. For
1001 Windows guests, shared folders are implemented as a pseudo-network
1002 redirector; for Linux and Solaris guests, the Guest Additions provide a
1003 virtual file system.</para>
1004
1005 <para>To share a host folder with a virtual machine in VirtualBox, you
1006 must specify the path of that folder and choose for it a "share name" that
1007 the guest can use to access it. Hence, first create the shared folder on
1008 the host; then, within the guest, connect to it.</para>
1009
1010 <para>There are several ways in which shared folders can be set up for a
1011 particular virtual machine:<itemizedlist>
1012 <listitem>
1013 <para>In the window of a running VM, you can select "Shared folders"
1014 from the "Devices" menu, or click on the folder icon on the status
1015 bar in the bottom right corner.</para>
1016 </listitem>
1017
1018 <listitem>
1019 <para>If a VM is not currently running, you can configure shared
1020 folders in each virtual machine's "Settings" dialog.</para>
1021 </listitem>
1022
1023 <listitem>
1024 <para>From the command line, you can create shared folders using
1025 VBoxManage, as follows: <screen>VBoxManage sharedfolder add "VM name" --name "sharename" --hostpath "C:\test"</screen></para>
1026
1027 <para>See <xref linkend="vboxmanage-sharedfolder" /> for
1028 details.</para>
1029 </listitem>
1030 </itemizedlist></para>
1031
1032 <para>There are two types of shares:</para>
1033
1034 <orderedlist>
1035 <listitem>
1036 <para>VM shares which are only available to the VM for which they have
1037 been defined;</para>
1038 </listitem>
1039
1040 <listitem>
1041 <para>transient VM shares, which can be added and removed at runtime
1042 and do not persist after a VM has stopped; for these, add the
1043 <computeroutput>--transient</computeroutput> option to the above
1044 command line.</para>
1045 </listitem>
1046 </orderedlist>
1047
1048 <para>Shared folders have read/write access to the files at the host path
1049 by default. To restrict the guest to have read-only access, create a
1050 read-only shared folder. This can either be achieved using the GUI or by
1051 appending the parameter <computeroutput>--readonly</computeroutput> when
1052 creating the shared folder with VBoxManage.</para>
1053
1054 <para>Starting with version 4.0, VirtualBox shared folders also support
1055 symbolic links (<emphasis role="bold">symlinks</emphasis>), under the
1056 following conditions:<orderedlist>
1057 <listitem>
1058 <para>The host operating system must support symlinks (i.e. a Mac,
1059 Linux or Solaris host is required).</para>
1060 </listitem>
1061
1062 <listitem>
1063 <para>Currently only Linux and Solaris Guest Additions support
1064 symlinks.</para>
1065 </listitem>
1066 </orderedlist></para>
1067
1068 <sect2 id="sf_mount_manual">
1069 <title>Manual mounting</title>
1070
1071 <para>You can mount the shared folder from inside a VM the same way as
1072 you would mount an ordinary network share:</para>
1073
1074 <para><itemizedlist>
1075 <listitem>
1076 <para>In a Windows guest, shared folders are browseable and
1077 therefore visible in Windows Explorer. So, to attach the host's
1078 shared folder to your Windows guest, open Windows Explorer and
1079 look for it under "My Networking Places" -&gt; "Entire Network"
1080 -&gt; "VirtualBox Shared Folders". By right-clicking on a shared
1081 folder and selecting "Map network drive" from the menu that pops
1082 up, you can assign a drive letter to that shared folder.</para>
1083
1084 <para>Alternatively, on the Windows command line, use the
1085 following:</para>
1086
1087 <screen>net use x: \\vboxsvr\sharename</screen>
1088
1089 <para>While <computeroutput>vboxsvr</computeroutput> is a fixed
1090 name (note that <computeroutput>vboxsrv</computeroutput> would
1091 also work), replace "x:" with the drive letter that you want to
1092 use for the share, and <computeroutput>sharename</computeroutput>
1093 with the share name specified with
1094 <computeroutput>VBoxManage</computeroutput>.</para>
1095 </listitem>
1096
1097 <listitem>
1098 <para>In a Linux guest, use the following command:</para>
1099
1100 <screen>mount -t vboxsf [-o OPTIONS] sharename mountpoint</screen>
1101
1102 <para>To mount a shared folder during boot, add the following
1103 entry to /etc/fstab:</para>
1104
1105 <screen>sharename mountpoint vboxsf defaults 0 0</screen>
1106 </listitem>
1107
1108 <listitem>
1109 <para>In a Solaris guest, use the following command:</para>
1110
1111 <screen>mount -F vboxfs [-o OPTIONS] sharename mountpoint</screen>
1112
1113 <para>Replace <computeroutput>sharename</computeroutput> (use
1114 lowercase) with the share name specified with
1115 <computeroutput>VBoxManage</computeroutput> or the GUI, and
1116 <computeroutput>mountpoint</computeroutput> with the path where
1117 you want the share to be mounted on the guest (e.g.
1118 <computeroutput>/mnt/share</computeroutput>). The usual mount
1119 rules apply, that is, create this directory first if it does not
1120 exist yet.</para>
1121
1122 <para>Here is an example of mounting the shared folder for the
1123 user "jack" on Solaris:</para>
1124
1125 <screen>$ id
1126uid=5000(jack) gid=1(other)
1127$ mkdir /export/home/jack/mount
1128$ pfexec mount -F vboxfs -o uid=5000,gid=1 jackshare /export/home/jack/mount
1129$ cd ~/mount
1130$ ls
1131sharedfile1.mp3 sharedfile2.txt
1132$</screen>
1133
1134 <para>Beyond the standard options supplied by the
1135 <computeroutput>mount</computeroutput> command, the following are
1136 available:</para>
1137
1138 <screen>iocharset CHARSET</screen>
1139
1140 <para>to set the character set used for I/O operations (utf8 by
1141 default) and</para>
1142
1143 <screen>convertcp CHARSET</screen>
1144
1145 <para>to specify the character set used for the shared folder name
1146 (utf8 by default).</para>
1147
1148 <para>The generic mount options (documented in the mount manual
1149 page) apply also. Especially useful are the options
1150 <computeroutput>uid</computeroutput>,
1151 <computeroutput>gid</computeroutput> and
1152 <computeroutput>mode</computeroutput>, as they allow access by
1153 normal users (in read/write mode, depending on the settings) even
1154 if root has mounted the filesystem.</para>
1155 </listitem>
1156 </itemizedlist></para>
1157 </sect2>
1158
1159 <sect2 id="sf_mount_auto">
1160 <title>Automatic mounting</title>
1161
1162 <para>Starting with version 4.0, VirtualBox can mount shared folders
1163 automatically, at your option. If automatic mounting is enabled for a
1164 specific shared folder, the Guest Additions will automatically mount
1165 that folder as soon as a user logs into the guest OS. The details depend
1166 on the guest OS type:<itemizedlist>
1167 <listitem>
1168 <para>With <emphasis role="bold">Windows guests,</emphasis> any
1169 auto-mounted shared folder will receive its own drive letter (e.g.
1170 <computeroutput>E:</computeroutput>) depending on the free drive
1171 letters remaining in the guest.</para>
1172
1173 <para>If there no free drive letters left, auto-mounting will
1174 fail; as a result, the number of auto-mounted shared folders is
1175 typically limited to 22 or less with Windows guests.</para>
1176 </listitem>
1177
1178 <listitem>
1179 <para>With <emphasis role="bold">Linux guests,</emphasis>
1180 auto-mounted shared folders are mounted into the
1181 <computeroutput>/media</computeroutput> directory, along with the
1182 prefix <computeroutput>sf_</computeroutput>. For example, the
1183 shared folder <computeroutput>myfiles</computeroutput> would be
1184 mounted to <computeroutput>/media/sf_myfiles</computeroutput> on
1185 Linux and <computeroutput>/mnt/sf_myfiles</computeroutput> on
1186 Solaris.</para>
1187
1188 <para>The guest property
1189 <computeroutput>/VirtualBox/GuestAdd/SharedFolders/MountPrefix</computeroutput>
1190 determines the prefix that is used. Change that guest property to
1191 a value other than "sf" to change that prefix; see <xref
1192 linkend="guestadd-guestprops" /> for details.<note>
1193 <para>Access to auto-mounted shared folders is only
1194 granted to the user group
1195 <computeroutput>vboxsf</computeroutput>, which is created by
1196 the VirtualBox Guest Additions installer. Hence guest users
1197 have to be member of that group to have read/write
1198 access or to have read-only access in case the folder is not
1199 mapped writable.</para>
1200 </note></para>
1201
1202 <para>To change the mount directory to something other than
1203 <computeroutput>/media</computeroutput>, you can set the guest
1204 property
1205 <computeroutput>/VirtualBox/GuestAdd/SharedFolders/MountDir</computeroutput>.</para>
1206 </listitem>
1207
1208 <listitem>
1209 <para><emphasis role="bold">Solaris guests</emphasis> behave like
1210 Linux guests except that <computeroutput>/mnt</computeroutput> is
1211 used as the default mount directory instead of
1212 <computeroutput>/media</computeroutput>.</para>
1213 </listitem>
1214 </itemizedlist></para>
1215
1216 <para>To have any changes to auto-mounted shared folders applied while a
1217 VM is running, the guest OS needs to be rebooted. (This applies only to
1218 auto-mounted shared folders, not the ones which are mounted
1219 manually.)</para>
1220 </sect2>
1221 </sect1>
1222
1223 <sect1 id="guestadd-video">
1224 <title>Hardware-accelerated graphics</title>
1225
1226 <sect2 id="guestadd-3d">
1227 <title>Hardware 3D acceleration (OpenGL and Direct3D 8/9)</title>
1228
1229 <para>The VirtualBox Guest Additions contain experimental hardware 3D
1230 support for Windows, Linux and Solaris guests.<footnote>
1231 <para>OpenGL support for Windows guests was added with VirtualBox
1232 2.1; support for Linux and Solaris followed with VirtualBox 2.2.
1233 With VirtualBox 3.0, Direct3D 8/9 support was added for Windows
1234 guests. OpenGL 2.0 is now supported as well.
1235 With VirtualBox 4.1 Windows Aero theme support is added for
1236 Windows Vista and Windows 7 guests (experimental)</para>
1237 </footnote></para>
1238
1239 <para>With this feature, if an application inside your virtual machine
1240 uses 3D features through the OpenGL or Direct3D 8/9 programming
1241 interfaces, instead of emulating them in software (which would be slow),
1242 VirtualBox will attempt to use your host's 3D hardware. This works for
1243 all supported host platforms (Windows, Mac, Linux, Solaris), provided
1244 that your host operating system can make use of your accelerated 3D
1245 hardware in the first place.</para>
1246
1247 <para>The 3D acceleration currently has the following
1248 preconditions:<orderedlist>
1249 <listitem>
1250 <para>It is only available for certain Windows, Linux and Solaris
1251 guests. In particular:<itemizedlist>
1252 <listitem>
1253 <para>3D acceleration with Windows guests requires Windows
1254 2000, Windows XP, Vista or Windows 7. Both OpenGL and
1255 Direct3D 8/9 (not with Windows 2000) are supported
1256 (experimental).</para>
1257 </listitem>
1258
1259 <listitem>
1260 <para>OpenGL on Linux requires kernel 2.6.27 and higher as
1261 well as X.org server version 1.5 and higher. Ubuntu 10.10
1262 and Fedora 14 have been tested and confirmed as
1263 working.</para>
1264 </listitem>
1265
1266 <listitem>
1267 <para>OpenGL on Solaris guests requires X.org server version
1268 1.5 and higher.</para>
1269 </listitem>
1270 </itemizedlist></para>
1271 </listitem>
1272
1273 <listitem>
1274 <para>The Guest Additions must be installed.<note>
1275 <para>For the basic Direct3D acceleration to work in a Windows Guest,
1276 VirtualBox needs to replace Windows system files in the
1277 virtual machine. As a result, the Guest Additions installation
1278 program offers Direct3D acceleration as an option that must
1279 be explicitly enabled. Also, you must install the Guest
1280 Additions in "Safe Mode". This does <emphasis role="bold">not</emphasis>
1281 apply to the experimental WDDM Direct3D video
1282 driver available for Vista and Windows 7 guests,
1283 see <xref linkend="KnownIssues" />
1284 for details.</para></note>
1285 </para>
1286 </listitem>
1287
1288 <listitem>
1289 <para>Because 3D support is still experimental at this time, it is
1290 disabled by default and must be <emphasis role="bold">manually
1291 enabled</emphasis> in the VM settings (see <xref
1292 linkend="generalsettings" />).<note>
1293 <para>
1294 Untrusted guest systems should not be allowed to use
1295 VirtualBox's 3D acceleration features, just as untrusted host
1296 software should not be allowed to use 3D acceleration. Drivers
1297 for 3D hardware are generally too complex to be made properly
1298 secure and any software which is allowed to access them may be
1299 able to compromise the operating system running them. In
1300 addition, enabling 3D acceleration gives the guest direct access
1301 to a large body of additional program code in the VirtualBox
1302 host process which it might conceivably be able to use to crash
1303 the virtual machine.
1304 </para>
1305 </note></para>
1306 </listitem>
1307 </orderedlist></para>
1308
1309 <para>With VirtualBox 4.1, Windows Aero theme support is added for
1310 Windows Vista and Windows 7 guests. To enable Aero theme support,
1311 the experimental VirtualBox WDDM video driver must be installed,
1312 which is available with the Guest Additions installation.
1313 Since the WDDM video driver is still experimental at this time, it is
1314 not installed by default and must be <emphasis role="bold">manually
1315 selected</emphasis> in the Guest Additions installer by answering "No"
1316 int the "Would you like to install basic Direct3D support" dialog
1317 displayed when the Direct3D feature is selected.
1318 <note><para>Unlike the current basic Direct3D support, the WDDM video
1319 driver installation does <emphasis role="bold">not</emphasis> require
1320 the "Safe Mode".</para></note>
1321 <para>The Aero theme is not enabled by default. To enable it<itemizedlist>
1322 <listitem>
1323 <para>In Windows Vista guest: right-click on the desktop, in the
1324 contect menu select "Personalize", then select "Windows Color and Appearance"
1325 in the "Personalization" window, in the "Appearance Settings" dialog select
1326 "Windows Aero" and press "OK"</para></listitem>
1327 <listitem>
1328 <para>In Windows 7 guest: right-click on the desktop, in the
1329 contect menu select "Personalize" and select any Aero theme
1330 in the "Personalization" window</para></listitem>
1331 </itemizedlist>
1332 </para>
1333 </para>
1334
1335 <para>Technically, VirtualBox implements this by installing an
1336 additional hardware 3D driver inside your guest when the Guest Additions
1337 are installed. This driver acts as a hardware 3D driver and reports to
1338 the guest operating system that the (virtual) hardware is capable of 3D
1339 hardware acceleration. When an application in the guest then requests
1340 hardware acceleration through the OpenGL or Direct3D programming
1341 interfaces, these are sent to the host through a special communication
1342 tunnel implemented by VirtualBox, and then the <emphasis>host</emphasis>
1343 performs the requested 3D operation via the host's programming
1344 interfaces.</para>
1345 </sect2>
1346
1347 <sect2 id="guestadd-2d">
1348 <title>Hardware 2D video acceleration for Windows guests</title>
1349
1350 <para>Starting with version 3.1, the VirtualBox Guest Additions contain
1351 experimental hardware 2D video acceleration support for Windows
1352 guests.</para>
1353
1354 <para>With this feature, if an application (e.g. a video player) inside
1355 your Windows VM uses 2D video overlays to play a movie clip, then
1356 VirtualBox will attempt to use your host's video acceleration hardware
1357 instead of performing overlay stretching and color conversion in
1358 software (which would be slow). This currently works for Windows, Linux
1359 and Mac host platforms, provided that your host operating system can
1360 make use of 2D video acceleration in the first place.</para>
1361
1362 <para>The 2D video acceleration currently has the following
1363 preconditions:<orderedlist>
1364 <listitem>
1365 <para>It is only available for Windows guests (XP or
1366 later).</para>
1367 </listitem>
1368
1369 <listitem>
1370 <para>The Guest Additions must be installed.</para>
1371 </listitem>
1372
1373 <listitem>
1374 <para>Because 2D support is still experimental at this time, it is
1375 disabled by default and must be <emphasis role="bold">manually
1376 enabled</emphasis> in the VM settings (see <xref
1377 linkend="generalsettings" />).</para>
1378 </listitem>
1379 </orderedlist></para>
1380
1381 <para>Technically, VirtualBox implements this by exposing video overlay
1382 DirectDraw capabilities in the Guest Additions video driver. The driver
1383 sends all overlay commands to the host through a special communication
1384 tunnel implemented by VirtualBox. On the host side, OpenGL is then used
1385 to implement color space transformation and scaling</para>
1386 </sect2>
1387 </sect1>
1388
1389 <sect1 id="seamlesswindows">
1390 <title>Seamless windows</title>
1391
1392 <para>With the "seamless windows" feature of VirtualBox, you can have the
1393 windows that are displayed within a virtual machine appear side by side
1394 next to the windows of your host. This feature is supported for the
1395 following guest operating systems (provided that the Guest Additions are
1396 installed):<itemizedlist>
1397 <listitem>
1398 <para>Windows guests (support added with VirtualBox 1.5);</para>
1399 </listitem>
1400
1401 <listitem>
1402 <para>Supported Linux or Solaris guests running the X Window System
1403 (added with VirtualBox 1.6).</para>
1404 </listitem>
1405 </itemizedlist></para>
1406
1407 <para>After seamless windows are enabled (see below), VirtualBox
1408 suppresses the display of the Desktop background of your guest, allowing
1409 you to run the windows of your guest operating system seamlessly next to
1410 the windows of your host:</para>
1411
1412 <para><mediaobject>
1413 <imageobject>
1414 <imagedata align="center" fileref="images/seamless.png" width="14cm" />
1415 </imageobject>
1416 </mediaobject>To enable seamless mode, after starting the virtual
1417 machine, press the Host key (normally the right control key) together with
1418 "L". This will enlarge the size of the VM's display to the size of your
1419 host screen and mask out the guest operating system's background. To go
1420 back to the "normal" VM display (i.e. to disable seamless windows), press
1421 the Host key and "L" again.</para>
1422 </sect1>
1423
1424 <sect1 id="guestadd-guestprops">
1425 <title>Guest properties</title>
1426
1427 <para>Starting with version 2.1, VirtualBox allows for requesting certain
1428 properties from a running guest, provided that the VirtualBox Guest
1429 Additions are installed and the VM is running. This is good for two
1430 things:<orderedlist>
1431 <listitem>
1432 <para>A number of predefined VM characteristics are automatically
1433 maintained by VirtualBox and can be retrieved on the host, e.g. to
1434 monitor VM performance and statistics.</para>
1435 </listitem>
1436
1437 <listitem>
1438 <para>In addition, arbitrary string data can be exchanged between
1439 guest and host. This works in both directions.</para>
1440 </listitem>
1441 </orderedlist></para>
1442
1443 <para>To accomplish this, VirtualBox establishes a private communication
1444 channel between the VirtualBox Guest Additions and the host, and software
1445 on both sides can use this channel to exchange string data for arbitrary
1446 purposes. Guest properties are simply string keys to which a value is
1447 attached. They can be set (written to) by either the host and the guest,
1448 and they can also be read from both sides.</para>
1449
1450 <para>In addition to establishing the general mechanism of reading and
1451 writing values, a set of predefined guest properties is automatically
1452 maintained by the VirtualBox Guest Additions to allow for retrieving
1453 interesting guest data such as the guest's exact operating system and
1454 service pack level, the installed version of the Guest Additions, users
1455 that are currently logged into the guest OS, network statistics and more.
1456 These predefined properties are all prefixed with
1457 <computeroutput>/VirtualBox/</computeroutput> and organized into a
1458 hierarchical tree of keys.</para>
1459
1460 <para>Some of this runtime information is shown when you select "Session
1461 Information Dialog" from a virtual machine's "Machine" menu.</para>
1462
1463 <para>A more flexible way to use this channel is via the
1464 <computeroutput>VBoxManage guestproperty</computeroutput> command set; see
1465 <xref linkend="vboxmanage-guestproperty" /> for details. For example, to
1466 have <emphasis>all</emphasis> the available guest properties for a given
1467 running VM listed with their respective values, use this:<screen>$ VBoxManage guestproperty enumerate "Windows Vista III"
1468VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
1469(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
1470All rights reserved.
1471
1472Name: /VirtualBox/GuestInfo/OS/Product, value: Windows Vista Business Edition,
1473 timestamp: 1229098278843087000, flags:
1474Name: /VirtualBox/GuestInfo/OS/Release, value: 6.0.6001,
1475 timestamp: 1229098278950553000, flags:
1476Name: /VirtualBox/GuestInfo/OS/ServicePack, value: 1,
1477 timestamp: 1229098279122627000, flags:
1478Name: /VirtualBox/GuestAdd/InstallDir,
1479 value: C:/Program Files/Oracle/VirtualBox
1480 Guest Additions, timestamp: 1229098279269739000, flags:
1481Name: /VirtualBox/GuestAdd/Revision, value: 40720,
1482 timestamp: 1229098279345664000, flags:
1483Name: /VirtualBox/GuestAdd/Version, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD,
1484 timestamp: 1229098279479515000, flags:
1485Name: /VirtualBox/GuestAdd/Components/VBoxControl.exe, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1486 timestamp: 1229098279651731000, flags:
1487Name: /VirtualBox/GuestAdd/Components/VBoxHook.dll, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1488 timestamp: 1229098279804835000, flags:
1489Name: /VirtualBox/GuestAdd/Components/VBoxDisp.dll, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1490 timestamp: 1229098279880611000, flags:
1491Name: /VirtualBox/GuestAdd/Components/VBoxMRXNP.dll, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1492 timestamp: 1229098279882618000, flags:
1493Name: /VirtualBox/GuestAdd/Components/VBoxService.exe, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1494 timestamp: 1229098279883195000, flags:
1495Name: /VirtualBox/GuestAdd/Components/VBoxTray.exe, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1496 timestamp: 1229098279885027000, flags:
1497Name: /VirtualBox/GuestAdd/Components/VBoxGuest.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1498 timestamp: 1229098279886838000, flags:
1499Name: /VirtualBox/GuestAdd/Components/VBoxMouse.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1500 timestamp: 1229098279890600000, flags:
1501Name: /VirtualBox/GuestAdd/Components/VBoxSF.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1502 timestamp: 1229098279893056000, flags:
1503Name: /VirtualBox/GuestAdd/Components/VBoxVideo.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1504 timestamp: 1229098279895767000, flags:
1505Name: /VirtualBox/GuestInfo/OS/LoggedInUsers, value: 1,
1506 timestamp: 1229099826317660000, flags:
1507Name: /VirtualBox/GuestInfo/OS/NoLoggedInUsers, value: false,
1508 timestamp: 1229098455580553000, flags:
1509Name: /VirtualBox/GuestInfo/Net/Count, value: 1,
1510 timestamp: 1229099826299785000, flags:
1511Name: /VirtualBox/HostInfo/GUI/LanguageID, value: C,
1512 timestamp: 1229098151272771000, flags:
1513Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 192.168.2.102,
1514 timestamp: 1229099826300088000, flags:
1515Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 255.255.255.255,
1516 timestamp: 1229099826300220000, flags:
1517Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0,
1518 timestamp: 1229099826300350000, flags:
1519Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up,
1520 timestamp: 1229099826300524000, flags:
1521Name: /VirtualBox/GuestInfo/OS/LoggedInUsersList, value: username,
1522 timestamp: 1229099826317386000, flags:</screen></para>
1523
1524 <para>To query the value of a single property, use the "get" subcommand
1525 like this:<screen>$ VBoxManage guestproperty get "Windows Vista III"
1526 "/VirtualBox/GuestInfo/OS/Product"
1527VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
1528(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
1529All rights reserved.
1530
1531Value: Windows Vista Business Edition
1532</screen></para>
1533
1534 <para>To add or change guest properties from the guest, use the tool
1535 <computeroutput>VBoxControl</computeroutput>. This tool is included in the
1536 Guest Additions of VirtualBox 2.2 or later. When started from a Linux
1537 guest, this tool requires root privileges for security reasons:<screen>$ sudo VBoxControl guestproperty enumerate
1538VirtualBox Guest Additions Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
1539(C) 2009-$VBOX_C_YEAR $VBOX_VENDOR
1540All rights reserved.
1541
1542Name: /VirtualBox/GuestInfo/OS/Release, value: 2.6.28-18-generic,
1543 timestamp: 1265813265835667000, flags: &lt;NULL&gt;
1544Name: /VirtualBox/GuestInfo/OS/Version, value: #59-Ubuntu SMP Thu Jan 28 01:23:03 UTC 2010,
1545 timestamp: 1265813265836305000, flags: &lt;NULL&gt;
1546 ...</screen></para>
1547
1548 <para>For more complex needs, you can use the VirtualBox programming
1549 interfaces; see <xref linkend="VirtualBoxAPI" />.</para>
1550 </sect1>
1551
1552 <sect1 id="guestadd-guestcontrol">
1553 <title>Guest control</title>
1554
1555 <para>Starting with version 3.2, the Guest Additions of VirtualBox allow
1556 starting applications inside a VM from the host system.</para>
1557
1558 <para>For this to work, the application needs to be installed inside the
1559 guest; no additional software needs to be installed on the host.
1560 Additionally, text mode output (to stdout and stderr) can be shown on the
1561 host for further processing along with options to specify user credentials
1562 and a timeout value (in milliseconds) to limit time the application is
1563 able to run.</para>
1564
1565 <para>This feature can be used to automate deployment of software within
1566 the guest.</para>
1567
1568 <para>Starting with version 4.0, the Guest Additions for Windows allow for
1569 automatic updating (only already installed Guest Additions 4.0 or later).
1570 Also, copying files from host to the guest as well as remotely creating
1571 guest directories is available.</para>
1572
1573 <para>To use these features, use the VirtualBox command line, see <xref
1574 linkend="vboxmanage-guestcontrol" />.</para>
1575 </sect1>
1576
1577 <sect1>
1578 <title>Memory overcommitment</title>
1579
1580 <para>In server environments with many VMs; the Guest Additions can be
1581 used to share physical host memory between several VMs, reducing the total
1582 amount of memory in use by the VMs. If memory usage is the limiting factor
1583 and CPU resources are still available, this can help with packing more VMs
1584 on each host.</para>
1585
1586 <sect2 id="guestadd-balloon">
1587 <title>Memory ballooning</title>
1588
1589 <para>Starting with version 3.2, the Guest Additions of VirtualBox can
1590 change the amount of host memory that a VM uses while the machine is
1591 running. Because of how this is implemented, this feature is called
1592 "memory ballooning".</para>
1593
1594 <note>
1595 <para>VirtualBox supports memory ballooning only on 64-bit hosts, and
1596 it is not supported on Mac OS X hosts.</para>
1597 </note>
1598
1599 <para>Normally, to change the amount of memory allocated to a virtual
1600 machine, one has to shut down the virtual machine entirely and modify
1601 its settings. With memory ballooning, memory that was allocated for a
1602 virtual machine can be given to another virtual machine without having
1603 to shut the machine down.</para>
1604
1605 <para>When memory ballooning is requested, the VirtualBox Guest
1606 Additions (which run inside the guest) allocate physical memory from the
1607 guest operating system on the kernel level and lock this memory down in
1608 the guest. This ensures that the guest will not use that memory any
1609 longer: no guest applications can allocate it, and the guest kernel will
1610 not use it either. VirtualBox can then re-use this memory and give it to
1611 another virtual machine.</para>
1612
1613 <para>The memory made available through the ballooning mechanism is only
1614 available for re-use by VirtualBox. It is <emphasis>not</emphasis>
1615 returned as free memory to the host. Requesting balloon memory from a
1616 running guest will therefore not increase the amount of free,
1617 unallocated memory on the host. Effectively, memory ballooning is
1618 therefore a memory overcommitment mechanism for multiple virtual
1619 machines while they are running. This can be useful to temporarily start
1620 another machine, or in more complicated environments, for sophisticated
1621 memory management of many virtual machines that may be running in
1622 parallel depending on how memory is used by the guests.</para>
1623
1624 <para>At this time, memory ballooning is only supported through
1625 VBoxManage. Use the following command to increase or decrease the size
1626 of the memory balloon within a running virtual machine that has Guest
1627 Additions installed: <screen>VBoxManage controlvm "VM name" guestmemoryballoon &lt;n&gt;</screen>where
1628 <computeroutput>"VM name"</computeroutput> is the name or UUID of the
1629 virtual machine in question and
1630 <computeroutput>&lt;n&gt;</computeroutput> is the amount of memory to
1631 allocate from the guest in megabytes. See <xref
1632 linkend="vboxmanage-controlvm" /> for more information.</para>
1633
1634 <para>You can also set a default balloon that will automatically be
1635 requested from the VM every time after it has started up with the
1636 following command: <screen>VBoxManage modifyvm "VM name" --guestmemoryballoon &lt;n&gt;</screen></para>
1637
1638 <para>By default, no balloon memory is allocated. This is a VM setting,
1639 like other <computeroutput>modifyvm</computeroutput> settings, and
1640 therefore can only be set while the machine is shut down; see <xref
1641 linkend="vboxmanage-modifyvm" />.</para>
1642 </sect2>
1643
1644 <sect2 id="guestadd-pagefusion">
1645 <title>Page Fusion</title>
1646
1647 <para>Whereas memory ballooning simply reduces the amount of RAM that is
1648 available to a VM, Page Fusion works differently: it avoids memory
1649 duplication between several similar running VMs.</para>
1650
1651 <para>In a server environment running several similar VMs (e.g. with
1652 identical operating systems) on the same host, lots of memory pages are
1653 identical. VirtualBox's Page Fusion technology, introduced with
1654 VirtualBox 3.2, is a novel technique to efficiently identify these
1655 identical memory pages and share them between multiple VMs.<note>
1656 <para>VirtualBox supports Page Fusion only on 64-bit hosts, and it
1657 is not supported on Mac OS X hosts. Page Fusion currently works only
1658 with Windows guests (2000 and later).</para>
1659 </note></para>
1660
1661 <para>The more similar the VMs on a given host are, the more efficiently
1662 Page Fusion can reduce the amount of host memory that is in use. It
1663 therefore works best if all VMs on a host run identical operating
1664 systems (e.g. Windows XP Service Pack 2). Instead of having a complete
1665 copy of each operating system in each VM, Page Fusion identifies the
1666 identical memory pages in use by these operating systems and eliminates
1667 the duplicates, sharing host memory between several machines
1668 ("deduplication"). If a VM tries to modify a page that has been shared
1669 with other VMs, a new page is allocated again for that VM with a copy of
1670 the shared page ("copy on write"). All this is fully transparent to the
1671 virtual machine.</para>
1672
1673 <para>You may be familiar with this kind of memory overcommitment from
1674 other hypervisor products, which call this feature "page sharing" or
1675 "same page merging". However, Page Fusion differs significantly from
1676 those other solutions, whose approaches have several
1677 drawbacks:<orderedlist>
1678 <listitem>
1679 <para>Traditional hypervisors scan <emphasis>all</emphasis> guest
1680 memory and compute checksums (hashes) for every single memory
1681 page. Then, they look for pages with identical hashes and compare
1682 the entire content of those pages; if two pages produce the same
1683 hash, it is very likely that the pages are identical in content.
1684 This, of course, can take rather long, especially if the system is
1685 not idling. As a result, the additional memory only becomes
1686 available after a significant amount of time (this can be hours or
1687 even days!). Even worse, this kind of page sharing algorithm
1688 generally consumes significant CPU resources and increases the
1689 virtualization overhead by 10-20%.</para>
1690
1691 <para>Page Fusion in VirtualBox uses logic in the VirtualBox Guest
1692 Additions to quickly identify memory cells that are most likely
1693 identical across VMs. It can therefore achieve most of the
1694 possible savings of page sharing almost immediately and with
1695 almost no overhead.</para>
1696 </listitem>
1697
1698 <listitem>
1699 <para>Page Fusion is also much less likely to be confused by
1700 identical memory that it will eliminate just to learn seconds
1701 later that the memory will now change and having to perform a
1702 highly expensive and often service-disrupting reallocation.</para>
1703 </listitem>
1704 </orderedlist></para>
1705
1706 <para>At this time, Page Fusion can only be controlled with VBoxManage,
1707 and only while a VM is shut down. To enable Page Fusion for a VM, use
1708 the following command:<screen>VBoxManage modifyvm "VM name" --pagefusion on</screen></para>
1709
1710 <para>You can observe Page Fusion operation using some metrics.
1711 <computeroutput>RAM/VMM/Shared</computeroutput> shows the total amount
1712 of fused pages, whereas the per-VM metric
1713 <computeroutput>Guest/RAM/Usage/Shared</computeroutput> will return the
1714 amount of fused memory for a given VM. Please refer to <xref
1715 linkend="metrics" /> for information on how to query metrics.</para>
1716 </sect2>
1717 </sect1>
1718</chapter>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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