VirtualBox

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

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

Mods to user manual reflecting mds in 4.2.x 6417

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

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