VirtualBox

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

Last change on this file since 86692 was 86093, checked in by vboxsync, 4 years ago

Docs/GAs: Correcting tab widths.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 84.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
4<!ENTITY % all.entities SYSTEM "all-entities.ent">
5%all.entities;
6]>
7<chapter id="guestadditions">
8
9 <title>Guest Additions</title>
10
11 <para>
12 The previous chapter covered getting started with &product-name; and
13 installing operating systems in a virtual machine. For any serious
14 and interactive use, the &product-name; Guest Additions will make
15 your life much easier by providing closer integration between host
16 and guest and improving the interactive performance of guest
17 systems. This chapter describes the Guest Additions in detail.
18 </para>
19
20 <sect1 id="guestadd-intro">
21
22 <title>Introduction to Guest Additions</title>
23
24 <para>
25 As mentioned in <xref linkend="virtintro" />, the Guest Additions
26 are designed to be installed <emphasis>inside</emphasis> a virtual
27 machine after the guest operating system has been installed. They
28 consist of device drivers and system applications that optimize
29 the guest operating system for better performance and usability.
30 See <xref linkend="guestossupport" /> for details on what guest
31 operating systems are fully supported with Guest Additions by
32 &product-name;.
33 </para>
34
35 <para>
36 The &product-name; Guest Additions for all supported guest
37 operating systems are provided as a single CD-ROM image file which
38 is called <filename>VBoxGuestAdditions.iso</filename>. This image
39 file is located in the installation directory of &product-name;.
40 To install the Guest Additions for a particular VM, you mount this
41 ISO file in your VM as a virtual CD-ROM and install from there.
42 </para>
43
44 <para>
45 The Guest Additions offer the following features:
46 </para>
47
48 <itemizedlist>
49
50 <listitem>
51 <para>
52 <emphasis role="bold">Mouse pointer integration</emphasis>. To
53 overcome the limitations for mouse support described in
54 <xref linkend="keyb_mouse_normal" />, this feature provides
55 you with seamless mouse support. You will only have one mouse
56 pointer and pressing the Host key is no longer required to
57 <emphasis>free</emphasis> the mouse from being captured by the
58 guest OS. To make this work, a special mouse driver is
59 installed in the guest that communicates with the physical
60 mouse driver on your host and moves the guest mouse pointer
61 accordingly.
62 </para>
63 </listitem>
64
65 <listitem>
66 <para>
67 <emphasis role="bold">Shared folders.</emphasis> These provide
68 an easy way to exchange files between the host and the guest.
69 Much like ordinary Windows network shares, you can tell
70 &product-name; to treat a certain host directory as a shared
71 folder, and &product-name; will make it available to the guest
72 operating system as a network share, irrespective of whether
73 the guest actually has a network. See
74 <xref linkend="sharedfolders" />.
75 </para>
76 </listitem>
77
78 <listitem>
79 <para>
80 <emphasis role="bold">Better video support.</emphasis> While
81 the virtual graphics card which &product-name; emulates for
82 any guest operating system provides all the basic features,
83 the custom video drivers that are installed with the Guest
84 Additions provide you with extra high and non-standard video
85 modes, as well as accelerated video performance.
86 </para>
87
88 <para>
89 In addition, with Windows, Linux, and Oracle Solaris guests,
90 you can resize the virtual machine's window if the Guest
91 Additions are installed. The video resolution in the guest
92 will be automatically adjusted, as if you had manually entered
93 an arbitrary resolution in the guest's
94 <emphasis role="bold">Display</emphasis> settings. See
95 <xref linkend="intro-resize-window" />.
96 </para>
97
98 <para>
99 If the Guest Additions are installed, 3D graphics and 2D video
100 for guest applications can be accelerated. See
101 <xref linkend="guestadd-video" />.
102 </para>
103 </listitem>
104
105 <listitem>
106 <para>
107 <emphasis role="bold">Seamless windows.</emphasis> With this
108 feature, the individual windows that are displayed on the
109 desktop of the virtual machine can be mapped on the host's
110 desktop, as if the underlying application was actually running
111 on the host. See <xref linkend="seamlesswindows" />.
112 </para>
113 </listitem>
114
115 <listitem>
116 <para>
117 <emphasis role="bold">Generic host/guest communication
118 channels.</emphasis> The Guest Additions enable you to control
119 and monitor guest execution. The <emphasis>guest
120 properties</emphasis> provide a generic string-based mechanism
121 to exchange data bits between a guest and a host, some of
122 which have special meanings for controlling and monitoring the
123 guest. See <xref linkend="guestadd-guestprops" />.
124 </para>
125
126 <para>
127 Additionally, applications can be started in a guest from the
128 host. See <xref linkend="guestadd-guestcontrol" />.
129 </para>
130 </listitem>
131
132 <listitem>
133 <para>
134 <emphasis role="bold">Time synchronization.</emphasis> With
135 the Guest Additions installed, &product-name; can ensure that
136 the guest's system time is better synchronized with that of
137 the host.
138 </para>
139
140 <para>
141 For various reasons, the time in the guest might run at a
142 slightly different rate than the time on the host. The host
143 could be receiving updates through NTP and its own time might
144 not run linearly. A VM could also be paused, which stops the
145 flow of time in the guest for a shorter or longer period of
146 time. When the wall clock time between the guest and host only
147 differs slightly, the time synchronization service attempts to
148 gradually and smoothly adjust the guest time in small
149 increments to either catch up or lose time. When the
150 difference is too great, for example if a VM paused for hours
151 or restored from saved state, the guest time is changed
152 immediately, without a gradual adjustment.
153 </para>
154
155 <para>
156 The Guest Additions will resynchronize the time regularly. See
157 <xref linkend="changetimesync" /> for how to configure the
158 parameters of the time synchronization mechanism.
159 </para>
160 </listitem>
161
162 <listitem>
163 <para>
164 <emphasis role="bold">Shared clipboard.</emphasis> With the
165 Guest Additions installed, the clipboard of the guest
166 operating system can optionally be shared with your host
167 operating system. See <xref linkend="generalsettings" />.
168 </para>
169 </listitem>
170
171 <listitem>
172 <para>
173 <emphasis role="bold">Automated logins.</emphasis> Also called
174 credentials passing. See <xref linkend="autologon" />.
175 </para>
176 </listitem>
177
178 </itemizedlist>
179
180 <para>
181 Each version of &product-name;, even minor releases, ship with
182 their own version of the Guest Additions. While the interfaces
183 through which the &product-name; core communicates with the Guest
184 Additions are kept stable so that Guest Additions already
185 installed in a VM should continue to work when &product-name; is
186 upgraded on the host, for best results, it is recommended to keep
187 the Guest Additions at the same version.
188 </para>
189
190 <para>
191 The Windows and Linux Guest Additions therefore check
192 automatically whether they have to be updated. If the host is
193 running a newer &product-name; version than the Guest Additions, a
194 notification with further instructions is displayed in the guest.
195 </para>
196
197 <para>
198 To disable this update check for the Guest Additions of a given
199 virtual machine, set the value of its
200 <literal>/VirtualBox/GuestAdd/CheckHostVersion</literal> guest
201 property to <literal>0</literal>. See
202 <xref
203 linkend="guestadd-guestprops" />.
204 </para>
205
206 </sect1>
207
208 <sect1 id="guestadd-install">
209
210 <title>Installing and Maintaining Guest Additions</title>
211
212 <para>
213 Guest Additions are available for virtual machines running
214 Windows, Linux, Oracle Solaris, or OS/2. The following sections
215 describe the specifics of each variant in detail.
216 </para>
217
218 <sect2 id="additions-windows">
219
220 <title>Guest Additions for Windows</title>
221
222 <para>
223 The &product-name; Windows Guest Additions are designed to be
224 installed in a virtual machine running a Windows operating
225 system. The following versions of Windows guests are supported:
226 </para>
227
228 <itemizedlist>
229
230 <listitem>
231 <para>
232 Microsoft Windows NT 4.0 (any service pack)
233 </para>
234 </listitem>
235
236 <listitem>
237 <para>
238 Microsoft Windows 2000 (any service pack)
239 </para>
240 </listitem>
241
242 <listitem>
243 <para>
244 Microsoft Windows XP (any service pack)
245 </para>
246 </listitem>
247
248 <listitem>
249 <para>
250 Microsoft Windows Server 2003 (any service pack)
251 </para>
252 </listitem>
253
254 <listitem>
255 <para>
256 Microsoft Windows Server 2008
257 </para>
258 </listitem>
259
260 <listitem>
261 <para>
262 Microsoft Windows Vista (all editions)
263 </para>
264 </listitem>
265
266 <listitem>
267 <para>
268 Microsoft Windows 7 (all editions)
269 </para>
270 </listitem>
271
272 <listitem>
273 <para>
274 Microsoft Windows 8 (all editions)
275 </para>
276 </listitem>
277
278 <listitem>
279 <para>
280 Microsoft Windows 10 RTM build 10240
281 </para>
282 </listitem>
283
284 <listitem>
285 <para>
286 Microsoft Windows Server 2012
287 </para>
288 </listitem>
289
290 </itemizedlist>
291
292 <sect3 id="mountingadditionsiso">
293
294 <title>Installing the Windows Guest Additions</title>
295
296 <para>
297 In the <emphasis role="bold">Devices</emphasis> menu in the
298 virtual machine's menu bar, &product-name; has a menu item
299 <emphasis role="bold">Insert Guest Additions CD
300 Image</emphasis>, which mounts the Guest Additions ISO file
301 inside your virtual machine. A Windows guest should then
302 automatically start the Guest Additions installer, which
303 installs the Guest Additions on your Windows guest.
304 </para>
305
306 <para>
307 For other guest operating systems, or if automatic start of
308 software on a CD is disabled, you need to do a manual start of
309 the installer.
310 </para>
311
312 <note>
313 <para>
314 For the basic Direct3D acceleration to work in a Windows
315 guest, you have to install the WDDM video driver available
316 for Windows Vista or later.
317 </para>
318
319 <para>
320 For Windows 8 and later, only the WDDM Direct3D video driver
321 is available. For basic Direct3D acceleration to work in
322 Windows XP guests, you have to install the Guest Additions
323 in Safe Mode. See <xref linkend="KnownIssues" /> for
324 details.
325 </para>
326 </note>
327
328 <para>
329 If you prefer to mount the Guest Additions manually, you can
330 perform the following steps:
331 </para>
332
333 <orderedlist>
334
335 <listitem>
336 <para>
337 Start the virtual machine in which you have installed
338 Windows.
339 </para>
340 </listitem>
341
342 <listitem>
343 <para>
344 Select <emphasis role="bold">Optical Drives</emphasis>
345 from the <emphasis role="bold">Devices</emphasis> menu in
346 the virtual machine's menu bar and then
347 <emphasis role="bold">Choose/Create a Disk
348 Image</emphasis>. This displays the Virtual Media Manager,
349 described in <xref linkend="vdis" />.
350 </para>
351 </listitem>
352
353 <listitem>
354 <para>
355 In the Virtual Media Manager, click
356 <emphasis role="bold">Add</emphasis> and browse your host
357 file system for the
358 <filename>VBoxGuestAdditions.iso</filename> file.
359 </para>
360
361 <itemizedlist>
362
363 <listitem>
364 <para>
365 On a Windows host, this file is in the &product-name;
366 installation directory, usually in
367 <filename>C:\Program
368 files\Oracle\VirtualBox</filename>.
369 </para>
370 </listitem>
371
372 <listitem>
373 <para>
374 On Mac OS X hosts, this file is in the application
375 bundle of &product-name;. Right-click on the
376 &product-name; icon in Finder and choose
377 <emphasis role="bold">Show Package
378 Contents</emphasis>. The file is located in the
379 <filename>Contents/MacOS</filename> folder.
380 </para>
381 </listitem>
382
383 <listitem>
384 <para>
385 On a Linux host, this file is in the
386 <filename>additions</filename> folder where you
387 installed &product-name;, usually
388 <filename>/opt/VirtualBox/</filename>.
389 </para>
390 </listitem>
391
392 <listitem>
393 <para>
394 On Oracle Solaris hosts, this file is in the
395 <filename>additions</filename> folder where you
396 installed &product-name;, usually
397 <filename>/opt/VirtualBox</filename>.
398 </para>
399 </listitem>
400
401 </itemizedlist>
402 </listitem>
403
404 <listitem>
405 <para>
406 In the Virtual Media Manager, select the ISO file and
407 click the <emphasis role="bold">Add</emphasis> button.
408 This mounts the ISO file and presents it to your Windows
409 guest as a CD-ROM.
410 </para>
411 </listitem>
412
413 </orderedlist>
414
415 <para>
416 Unless you have the Autostart feature disabled in your Windows
417 guest, Windows will now autostart the &product-name; Guest
418 Additions installation program from the Additions ISO. If the
419 Autostart feature has been turned off, choose
420 <filename>VBoxWindowsAdditions.exe</filename> from the CD/DVD
421 drive inside the guest to start the installer.
422 </para>
423
424 <para>
425 The installer will add several device drivers to the Windows
426 driver database and then invoke the hardware detection wizard.
427 </para>
428
429 <para>
430 Depending on your configuration, it might display warnings
431 that the drivers are not digitally signed. You must confirm
432 these in order to continue the installation and properly
433 install the Additions.
434 </para>
435
436 <para>
437 After installation, reboot your guest operating system to
438 activate the Additions.
439 </para>
440
441 </sect3>
442
443 <sect3 id="additions-windows-updating">
444
445 <title>Updating the Windows Guest Additions</title>
446
447 <para>
448 Windows Guest Additions can be updated by running the
449 installation program again. This replaces the previous
450 Additions drivers with updated versions.
451 </para>
452
453 <para>
454 Alternatively, you can also open the Windows Device Manager
455 and select <emphasis role="bold">Update Driver...</emphasis>
456 for the following devices:
457 </para>
458
459 <itemizedlist>
460
461 <listitem>
462 <para>
463 &product-name; Graphics Adapter
464 </para>
465 </listitem>
466
467 <listitem>
468 <para>
469 &product-name; System Device
470 </para>
471 </listitem>
472
473 </itemizedlist>
474
475 <para>
476 For each, choose the option to provide your own driver, click
477 <emphasis role="bold">Have Disk</emphasis> and navigate to the
478 CD-ROM drive with the Guest Additions.
479 </para>
480
481 </sect3>
482
483 <sect3 id="additions-windows-install-unattended">
484
485 <title>Unattended Installation</title>
486
487 <para>
488 To avoid popups when performing an unattended installation of
489 the &product-name; Guest Additions, the code signing
490 certificates used to sign the drivers needs to be installed in
491 the correct certificate stores on the guest operating system.
492 Failure to do this will cause a typical Windows installation
493 to display multiple dialogs asking whether you want to install
494 a particular driver.
495 </para>
496
497 <note>
498 <para>
499 On some Windows versions, such as Windows 2000 and Windows
500 XP, the user intervention popups mentioned above are always
501 displayed, even after importing the Oracle certificates.
502 </para>
503 </note>
504
505 <para>
506 Installing the code signing certificates on a Windows guest
507 can be done automatically. Use the
508 <filename>VBoxCertUtil.exe</filename> utility from the
509 <filename>cert</filename> folder on the Guest Additions
510 installation CD.
511 </para>
512
513 <para>
514 Use the following steps:
515 </para>
516
517 <orderedlist>
518
519 <listitem>
520 <para>
521 Log in as Administrator on the guest.
522 </para>
523 </listitem>
524
525 <listitem>
526 <para>
527 Mount the &product-name; Guest Additions .ISO.
528 </para>
529 </listitem>
530
531 <listitem>
532 <para>
533 Open a command line window on the guest and change to the
534 <filename>cert</filename> folder on the &product-name;
535 Guest Additions CD.
536 </para>
537 </listitem>
538
539 <listitem>
540 <para>
541 Run the following command:
542 </para>
543
544<screen>VBoxCertUtil.exe add-trusted-publisher vbox*.cer --root vbox*.cer</screen>
545
546 <para>
547 This command installs the certificates to the certificate
548 store. When installing the same certificate more than
549 once, an appropriate error will be displayed.
550 </para>
551 </listitem>
552
553 </orderedlist>
554
555 <para>
556 To allow for completely unattended guest installations, you
557 can specify a command line parameter to the install launcher:
558 </para>
559
560<screen>VBoxWindowsAdditions.exe /S</screen>
561
562 <para>
563 This automatically installs the right files and drivers for
564 the corresponding platform, either 32-bit or 64-bit.
565 </para>
566
567 <note>
568 <para>
569 By default on an unattended installation on a Vista or
570 Windows 7 guest, there will be the XPDM graphics driver
571 installed. This graphics driver does not support Windows
572 Aero / Direct3D on the guest. Instead, the WDDM graphics
573 driver needs to be installed. To select this driver by
574 default, add the command line parameter
575 <literal>/with_wddm</literal> when invoking the Windows
576 Guest Additions installer. This is only required for Vista
577 and Windows 7.
578 </para>
579 </note>
580
581 <note>
582 <para>
583 For Windows Aero to run correctly on a guest, the guest's
584 VRAM size needs to be configured to at least 128 MB.
585 </para>
586 </note>
587
588 <para>
589 For more options regarding unattended guest installations,
590 consult the command line help by using the command:
591 </para>
592
593<screen>VBoxWindowsAdditions.exe /?</screen>
594
595 </sect3>
596
597 <sect3 id="windows-guest-file-extraction">
598
599 <title>Manual File Extraction</title>
600
601 <para>
602 If you would like to install the files and drivers manually,
603 you can extract the files from the Windows Guest Additions
604 setup as follows:
605 </para>
606
607<screen>VBoxWindowsAdditions.exe /extract</screen>
608
609 <para>
610 To explicitly extract the Windows Guest Additions for another
611 platform than the current running one, such as 64-bit files on
612 a 32-bit system, you must use the appropriate platform
613 installer. Use
614 <filename>VBoxWindowsAdditions-x86.exe</filename> or
615 <filename>VBoxWindowsAdditions-amd64.exe</filename> with the
616 <literal>/extract</literal> parameter.
617 </para>
618
619 </sect3>
620
621 </sect2>
622
623 <sect2 id="additions-linux">
624
625 <title>Guest Additions for Linux</title>
626
627 <para>
628 Like the Windows Guest Additions, the &product-name; Guest
629 Additions for Linux are a set of device drivers and system
630 applications which may be installed in the guest operating
631 system.
632 </para>
633
634 <para>
635 The following Linux distributions are officially supported:
636 </para>
637
638 <itemizedlist>
639
640 <listitem>
641 <para>
642 Oracle Linux as of version 5, including UEK kernels
643 </para>
644 </listitem>
645
646 <listitem>
647 <para>
648 Fedora as of Fedora Core 4
649 </para>
650 </listitem>
651
652 <listitem>
653 <para>
654 Red Hat Enterprise Linux as of version 3
655 </para>
656 </listitem>
657
658 <listitem>
659 <para>
660 SUSE and openSUSE Linux as of version 9
661 </para>
662 </listitem>
663
664 <listitem>
665 <para>
666 Ubuntu as of version 5.10
667 </para>
668 </listitem>
669
670 </itemizedlist>
671
672 <para>
673 Many other distributions are known to work with the Guest
674 Additions.
675 </para>
676
677 <para>
678 The version of the Linux kernel supplied by default in SUSE and
679 openSUSE 10.2, Ubuntu 6.10 (all versions) and Ubuntu 6.06
680 (server edition) contains a bug which can cause it to crash
681 during startup when it is run in a virtual machine. The Guest
682 Additions work in those distributions.
683 </para>
684
685 <para>
686 Note that some Linux distributions already come with all or part
687 of the &product-name; Guest Additions. You may choose to keep
688 the distribution's version of the Guest Additions but these are
689 often not up to date and limited in functionality, so we
690 recommend replacing them with the Guest Additions that come with
691 &product-name;. The &product-name; Linux Guest Additions
692 installer tries to detect an existing installation and replace
693 them but depending on how the distribution integrates the Guest
694 Additions, this may require some manual interaction. It is
695 highly recommended to take a snapshot of the virtual machine
696 before replacing preinstalled Guest Additions.
697 </para>
698
699 <sect3 id="additions-linux-install">
700
701 <title>Installing the Linux Guest Additions</title>
702
703 <para>
704 The &product-name; Guest Additions for Linux are provided on
705 the same virtual CD-ROM file as the Guest Additions for
706 Windows. See <xref linkend="mountingadditionsiso"/>. They also
707 come with an installation program that guides you through the
708 setup process. However, due to the significant differences
709 between Linux distributions, installation may be slightly more
710 complex when compared to Windows.
711 </para>
712
713 <para>
714 Installation generally involves the following steps:
715 </para>
716
717 <orderedlist>
718
719 <listitem>
720 <para>
721 Before installing the Guest Additions, you prepare your
722 guest system for building external kernel modules. This
723 works as described in
724 <xref linkend="externalkernelmodules" />, except that this
725 step must be performed in your Linux
726 <emphasis>guest</emphasis> instead of on a Linux host
727 system.
728 </para>
729
730 <para>
731 If you suspect that something has gone wrong, check that
732 your guest is set up correctly and run the following
733 command as root:
734 </para>
735
736<screen>rcvboxadd setup</screen>
737 </listitem>
738
739 <listitem>
740 <para>
741 Insert the <filename>VBoxGuestAdditions.iso</filename> CD
742 file into your Linux guest's virtual CD-ROM drive, as
743 described for a Windows guest in
744 <xref linkend="mountingadditionsiso" />.
745 </para>
746 </listitem>
747
748 <listitem>
749 <para>
750 Change to the directory where your CD-ROM drive is mounted
751 and run the following command as root:
752 </para>
753
754<screen>sh ./VBoxLinuxAdditions.run</screen>
755 </listitem>
756
757 </orderedlist>
758
759 </sect3>
760
761 <sect3 id="additions-linux-graphics-mouse">
762
763 <title>Graphics and Mouse Integration</title>
764
765 <para>
766 In Linux and Oracle Solaris guests, &product-name; graphics
767 and mouse integration goes through the X Window System.
768 &product-name; can use the X.Org variant of the system, or
769 XFree86 version 4.3 which is identical to the first X.Org
770 release. During the installation process, the X.Org display
771 server will be set up to use the graphics and mouse drivers
772 which come with the Guest Additions.
773 </para>
774
775 <para>
776 After installing the Guest Additions into a fresh installation
777 of a supported Linux distribution or Oracle Solaris system,
778 many unsupported systems will work correctly too, the guest's
779 graphics mode will change to fit the size of the
780 &product-name; window on the host when it is resized. You can
781 also ask the guest system to switch to a particular resolution
782 by sending a video mode hint using the
783 <command>VBoxManage</command> tool.
784 </para>
785
786 <para>
787 Multiple guest monitors are supported in guests using the
788 X.Org server version 1.3, which is part of release 7.3 of the
789 X Window System version 11, or a later version. The layout of
790 the guest screens can be adjusted as needed using the tools
791 which come with the guest operating system.
792 </para>
793
794 <para>
795 If you want to understand more about the details of how the
796 X.Org drivers are set up, in particular if you wish to use
797 them in a setting which our installer does not handle
798 correctly, see <xref linkend="guestxorgsetup" />.
799 </para>
800
801 </sect3>
802
803 <sect3 id="additions-linux-updating">
804
805 <title>Updating the Linux Guest Additions</title>
806
807 <para>
808 The Guest Additions can simply be updated by going through the
809 installation procedure again with an updated CD-ROM image.
810 This will replace the drivers with updated versions. You
811 should reboot after updating the Guest Additions.
812 </para>
813
814 </sect3>
815
816 <sect3 id="additions-linux-uninstall">
817
818 <title>Uninstalling the Linux Guest Additions</title>
819
820 <para>
821 If you have a version of the Guest Additions installed on your
822 virtual machine and wish to remove it without installing new
823 ones, you can do so by inserting the Guest Additions CD image
824 into the virtual CD-ROM drive as described above. Then run the
825 installer for the current Guest Additions with the
826 <literal>uninstall</literal> parameter from the path that the
827 CD image is mounted on in the guest, as follows:
828 </para>
829
830<screen>sh ./VBoxLinuxAdditions.run uninstall</screen>
831
832 <para>
833 While this will normally work without issues, you may need to
834 do some manual cleanup of the guest in some cases, especially
835 of the XFree86Config or xorg.conf file. In particular, if the
836 Additions version installed or the guest operating system were
837 very old, or if you made your own changes to the Guest
838 Additions setup after you installed them.
839 </para>
840
841 <para>
842 You can uninstall the Additions as follows:
843 </para>
844
845<screen>/opt/VBoxGuestAdditions-<replaceable>version</replaceable>/uninstall.sh</screen>
846
847 <para>
848 Replace
849 <filename>/opt/VBoxGuestAdditions-<replaceable>version</replaceable></filename>
850 with the correct Guest Additions installation directory.
851 </para>
852
853 </sect3>
854
855 </sect2>
856
857 <sect2 id="additions-solaris">
858
859 <title>Guest Additions for Oracle Solaris</title>
860
861 <para>
862 Like the Windows Guest Additions, the &product-name; Guest
863 Additions for Oracle Solaris take the form of a set of device
864 drivers and system applications which may be installed in the
865 guest operating system.
866 </para>
867
868 <para>
869 The following Oracle Solaris distributions are officially
870 supported:
871 </para>
872
873 <itemizedlist>
874
875 <listitem>
876 <para>
877 Oracle Solaris 11, including Oracle Solaris 11 Express
878 </para>
879 </listitem>
880
881 <listitem>
882 <para>
883 Oracle Solaris 10 4/08 and later
884 </para>
885 </listitem>
886
887 </itemizedlist>
888
889 <para>
890 Other distributions may work if they are based on comparable
891 software releases.
892 </para>
893
894 <sect3 id="additions-solaris-install">
895
896 <title>Installing the Oracle Solaris Guest Additions</title>
897
898 <para>
899 The &product-name; Guest Additions for Oracle Solaris are
900 provided on the same ISO CD-ROM as the Additions for Windows
901 and Linux. They come with an installation program that guides
902 you through the setup process.
903 </para>
904
905 <para>
906 Installation involves the following steps:
907 </para>
908
909 <orderedlist>
910
911 <listitem>
912 <para>
913 Mount the <filename>VBoxGuestAdditions.iso</filename> file
914 as your Oracle Solaris guest's virtual CD-ROM drive,
915 exactly the same way as described for a Windows guest in
916 <xref
917 linkend="mountingadditionsiso" />.
918 </para>
919
920 <para>
921 If the CD-ROM drive on the guest does not get mounted, as
922 seen with some versions of Oracle Solaris 10, run the
923 following command as root:
924 </para>
925
926<screen>svcadm restart volfs</screen>
927 </listitem>
928
929 <listitem>
930 <para>
931 Change to the directory where your CD-ROM drive is mounted
932 and run the following command as root:
933 </para>
934
935<screen>pkgadd -G -d ./VBoxSolarisAdditions.pkg</screen>
936 </listitem>
937
938 <listitem>
939 <para>
940 Choose <emphasis role="bold">1</emphasis> and confirm
941 installation of the Guest Additions package. After the
942 installation is complete, log out and log in to X server
943 on your guest, to activate the X11 Guest Additions.
944 </para>
945 </listitem>
946
947 </orderedlist>
948
949 </sect3>
950
951 <sect3 id="additions-solaris-uninstall">
952
953 <title>Uninstalling the Oracle Solaris Guest Additions</title>
954
955 <para>
956 The Oracle Solaris Guest Additions can be safely removed by
957 removing the package from the guest. Open a root terminal
958 session and run the following command:
959 </para>
960
961<screen>pkgrm SUNWvboxguest</screen>
962
963 </sect3>
964
965 <sect3 id="additions-solaris-updating">
966
967 <title>Updating the Oracle Solaris Guest Additions</title>
968
969 <para>
970 The Guest Additions should be updated by first uninstalling
971 the existing Guest Additions and then installing the new ones.
972 Attempting to install new Guest Additions without removing the
973 existing ones is not possible.
974 </para>
975
976 </sect3>
977
978 </sect2>
979
980 <sect2 id="additions-os2">
981
982 <title>Guest Additions for OS/2</title>
983
984 <para>
985 &product-name; also ships with a set of drivers that improve
986 running OS/2 in a virtual machine. Due to restrictions of OS/2
987 itself, this variant of the Guest Additions has a limited
988 feature set. See <xref
989 linkend="KnownIssues" /> for
990 details.
991 </para>
992
993 <para>
994 The OS/2 Guest Additions are provided on the same ISO CD-ROM as
995 those for the other platforms. Mount the ISO in OS/2 as
996 described previously. The OS/2 Guest Additions are located in
997 the directory <filename>\OS2</filename>.
998 </para>
999
1000 <para>
1001 We do not provide an automatic installer at this time. See the
1002 <filename>readme.txt</filename> file in the CD-ROM directory,
1003 which describes how to install the OS/2 Guest Additions
1004 manually.
1005 </para>
1006
1007 </sect2>
1008
1009 </sect1>
1010
1011 <sect1 id="sharedfolders">
1012
1013 <title>Shared Folders</title>
1014
1015 <para>
1016 With the <emphasis>shared folders</emphasis> feature of
1017 &product-name;, you can access files of your host system from
1018 within the guest system. This is similar to how you would use
1019 network shares in Windows networks, except that shared folders do
1020 not require networking, only the Guest Additions. Shared folders
1021 are supported with Windows 2000 or later, Linux, and Oracle
1022 Solaris guests. &product-name; includes experimental support for
1023 Mac OS X and OS/2 guests.
1024 </para>
1025
1026 <para>
1027 Shared folders physically reside on the <emphasis>host</emphasis>
1028 and are then shared with the guest, which uses a special file
1029 system driver in the Guest Additions to talk to the host. For
1030 Windows guests, shared folders are implemented as a pseudo-network
1031 redirector. For Linux and Oracle Solaris guests, the Guest
1032 Additions provide a virtual file system.
1033 </para>
1034
1035 <para>
1036 To share a host folder with a virtual machine in &product-name;,
1037 you must specify the path of the folder and choose a
1038 <emphasis>share name</emphasis> that the guest can use to access
1039 the shared folder. This happens on the host. In the guest you can
1040 then use the share name to connect to it and access files.
1041 </para>
1042
1043 <para>
1044 There are several ways in which shared folders can be set up for a
1045 virtual machine:
1046 </para>
1047
1048 <itemizedlist>
1049
1050 <listitem>
1051 <para>
1052 In the window of a running VM, you select
1053 <emphasis role="bold">Shared Folders</emphasis> from the
1054 <emphasis role="bold">Devices</emphasis> menu, or click on the
1055 folder icon on the status bar in the bottom right corner.
1056 </para>
1057 </listitem>
1058
1059 <listitem>
1060 <para>
1061 If a VM is not currently running, you can configure shared
1062 folders in the virtual machine's
1063 <emphasis role="bold">Settings</emphasis> dialog.
1064 </para>
1065 </listitem>
1066
1067 <listitem>
1068 <para>
1069 From the command line, you can create shared folders using
1070 <command>VBoxManage</command>, as follows:
1071 </para>
1072
1073<screen>VBoxManage sharedfolder add "VM name" --name "sharename" --hostpath "C:\test"</screen>
1074
1075 <para>
1076 See <xref linkend="vboxmanage-sharedfolder" />.
1077 </para>
1078 </listitem>
1079
1080 </itemizedlist>
1081
1082 <para>
1083 There are two types of shares:
1084 </para>
1085
1086 <itemizedlist>
1087
1088 <listitem>
1089 <para>
1090 Permanent shares, that are saved with the VM settings.
1091 </para>
1092 </listitem>
1093
1094 <listitem>
1095 <para>
1096 Transient shares, that are added at runtime and disappear when
1097 the VM is powered off. These can be created using a checkbox
1098 in the VirtualBox Manager, or by using the
1099 <option>--transient</option> option of the <command>VBoxManage
1100 sharedfolder add</command> command.
1101 </para>
1102 </listitem>
1103
1104 </itemizedlist>
1105
1106 <para>
1107 Shared folders can either be read-write or read-only. This means
1108 that the guest is either allowed to both read and write, or just
1109 read files on the host. By default, shared folders are read-write.
1110 Read-only folders can be created using a checkbox in the
1111 VirtualBox Manager, or with the <option>--readonly</option> option
1112 of the <command>VBoxManage sharedfolder add</command> command.
1113 </para>
1114
1115 <para>
1116 &product-name; shared folders also support symbolic links, also
1117 called <emphasis>symlinks</emphasis>, under the following
1118 conditions:
1119 </para>
1120
1121 <itemizedlist>
1122
1123 <listitem>
1124 <para>
1125 The host operating system must support symlinks. For example,
1126 a Mac OS X, Linux, or Oracle Solaris host is required.
1127 </para>
1128 </listitem>
1129
1130 <listitem>
1131 <para>
1132 Currently only Linux and Oracle Solaris Guest Additions
1133 support symlinks.
1134 </para>
1135 </listitem>
1136
1137 <listitem>
1138 <para>
1139 For security reasons the guest OS is not allowed to create
1140 symlinks by default. If you trust the guest OS to not abuse
1141 the functionality, you can enable creation of symlinks for a
1142 shared folder as follows:
1143 </para>
1144
1145<screen>VBoxManage setextradata "VM name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/<replaceable>sharename</replaceable> 1</screen>
1146 </listitem>
1147
1148 </itemizedlist>
1149
1150 <sect2 id="sf_mount_manual">
1151
1152 <title>Manual Mounting</title>
1153
1154 <para>
1155 You can mount the shared folder from inside a VM, in the same
1156 way as you would mount an ordinary network share:
1157 </para>
1158
1159 <itemizedlist>
1160
1161 <listitem>
1162 <para>
1163 In a Windows guest, shared folders are browseable and
1164 therefore visible in Windows Explorer. To attach the host's
1165 shared folder to your Windows guest, open Windows Explorer
1166 and look for the folder in <emphasis role="bold">My
1167 Networking Place</emphasis>s, <emphasis role="bold">Entire
1168 Network</emphasis>, <emphasis role="bold">&product-name;
1169 Shared Folders</emphasis>. By right-clicking on a shared
1170 folder and selecting <emphasis role="bold">Map Network
1171 Drive</emphasis> from the menu that pops up, you can assign
1172 a drive letter to that shared folder.
1173 </para>
1174
1175 <para>
1176 Alternatively, on the Windows command line, use the
1177 following command:
1178 </para>
1179
1180<screen>net use x: \\vboxsvr\sharename</screen>
1181
1182 <para>
1183 While <literal>vboxsvr</literal> is a fixed name, note that
1184 <literal>vboxsrv</literal> would also work, replace
1185 <replaceable>x:</replaceable> with the drive letter that you
1186 want to use for the share, and
1187 <replaceable>sharename</replaceable> with the share name
1188 specified with <command>VBoxManage</command>.
1189 </para>
1190 </listitem>
1191
1192 <listitem>
1193 <para>
1194 In a Linux guest, use the following command:
1195 </para>
1196
1197<screen>mount -t vboxsf [-o OPTIONS] sharename mountpoint</screen>
1198
1199 <para>
1200 To mount a shared folder during boot, add the following
1201 entry to <filename>/etc/fstab</filename>:
1202 </para>
1203
1204<screen>sharename mountpoint vboxsf defaults 0 0</screen>
1205 </listitem>
1206
1207 <listitem>
1208 <para>
1209 In a Oracle Solaris guest, use the following command:
1210 </para>
1211
1212<screen>mount -F vboxfs [-o OPTIONS] sharename mountpoint</screen>
1213
1214 <para>
1215 Replace <replaceable>sharename</replaceable>, use a
1216 lowercase string, with the share name specified with
1217 <command>VBoxManage</command> or the VirtualBox Manager.
1218 Replace <replaceable>mountpoint</replaceable> with the path
1219 where you want the share to be mounted on the guest, such as
1220 <filename>/mnt/share</filename>. The usual mount rules
1221 apply. For example, create this directory first if it does
1222 not exist yet.
1223 </para>
1224
1225 <para>
1226 Here is an example of mounting the shared folder for the
1227 user jack on Oracle Solaris:
1228 </para>
1229
1230<screen>$ id
1231uid=5000(jack) gid=1(other)
1232$ mkdir /export/home/jack/mount
1233$ pfexec mount -F vboxfs -o uid=5000,gid=1 jackshare /export/home/jack/mount
1234$ cd ~/mount
1235$ ls
1236sharedfile1.mp3 sharedfile2.txt
1237$</screen>
1238
1239 <para>
1240 Beyond the standard options supplied by the
1241 <command>mount</command> command, the following are
1242 available:
1243 </para>
1244
1245<screen>iocharset CHARSET</screen>
1246
1247 <para>
1248 This option sets the character set used for I/O operations.
1249 Note that on Linux guests, if the
1250 <literal>iocharset</literal> option is not specified, then
1251 the Guest Additions driver will attempt to use the character
1252 set specified by the CONFIG_NLS_DEFAULT kernel option. If
1253 this option is not set either, then UTF-8 is used.
1254 </para>
1255
1256<screen>convertcp CHARSET</screen>
1257
1258 <para>
1259 This option specifies the character set used for the shared
1260 folder name. This is UTF-8 by default.
1261 </para>
1262
1263 <para>
1264 The generic mount options, documented in the
1265 <command>mount</command> manual page, apply also. Especially
1266 useful are the options <literal>uid</literal>,
1267 <literal>gid</literal> and <literal>mode</literal>, as they
1268 can allow access by normal users in read/write mode,
1269 depending on the settings, even if root has mounted the
1270 filesystem.
1271 </para>
1272 </listitem>
1273
1274 <listitem>
1275 <para>
1276 In an OS/2 guest, use the <command>VBoxControl</command>
1277 command to manage shared folders. For example:
1278 </para>
1279
1280<screen>VBoxControl sharedfolder use D: MyShareName
1281VBoxControl sharedfolder unuse D:
1282VBoxControl sharedfolder list</screen>
1283
1284 <para>
1285 As with Windows guests, shared folders can also be accessed
1286 via UNC using <filename>\\VBoxSF\</filename>,
1287 <filename>\\VBoxSvr\</filename> or
1288 <filename>\\VBoxSrv\</filename> as the server name and the
1289 shared folder name as <replaceable>sharename</replaceable>.
1290 </para>
1291 </listitem>
1292
1293 </itemizedlist>
1294
1295 </sect2>
1296
1297 <sect2 id="sf_mount_auto">
1298
1299 <title>Automatic Mounting</title>
1300
1301 <para>
1302 &product-name; provides the option to mount shared folders
1303 automatically. When automatic mounting is enabled for a shared
1304 folder, the Guest Additions service will mount it for you
1305 automatically. For Windows or OS/2, a preferred drive letter can
1306 also be specified. For Linux or Oracle Solaris, a mount point
1307 directory can also be specified.
1308 </para>
1309
1310 <para>
1311 If a drive letter or mount point is not specified, or is in use
1312 already, an alternative location is found by the Guest Additions
1313 service. The service searches for an alternative location
1314 depending on the guest OS, as follows:
1315 </para>
1316
1317 <itemizedlist>
1318
1319 <listitem>
1320 <para>
1321 <emphasis role="bold">Windows and OS/2 guests.</emphasis>
1322 Search for a free drive letter, starting at
1323 <filename>Z:</filename>. If all drive letters are assigned,
1324 the folder is not mounted.
1325 </para>
1326 </listitem>
1327
1328 <listitem>
1329 <para>
1330 <emphasis role="bold">Linux and Oracle Solaris
1331 guests.</emphasis> Folders are mounted under the
1332 <filename>/media</filename> directory. The folder name is
1333 normalized (no spaces, slashes or colons) and is prefixed
1334 with <filename>sf_</filename>.
1335 </para>
1336
1337 <para>
1338 For example, if you have a shared folder called
1339 <filename>myfiles</filename>, it will appear as
1340 <filename>/media/sf_myfiles</filename> in the guest.
1341 </para>
1342
1343 <para>
1344 The guest properties
1345 <literal>/VirtualBox/GuestAdd/SharedFolders/MountDir</literal>
1346 and the more generic
1347 <literal>/VirtualBox/GuestAdd/SharedFolders/MountPrefix</literal>
1348 can be used to override the automatic mount directory and
1349 prefix. See <xref linkend="guestadd-guestprops" />.
1350 </para>
1351 </listitem>
1352
1353 </itemizedlist>
1354
1355 <para>
1356 Access to an automatically mounted shared folder is granted to
1357 everyone in a Windows guest, including the guest user. For Linux
1358 and Oracle Solaris guests, access is restricted to members of
1359 the group <literal>vboxsf</literal> and the
1360 <literal>root</literal> user.
1361 </para>
1362
1363 </sect2>
1364
1365 </sect1>
1366
1367 <sect1 id="guestadd-dnd">
1368
1369 <title>Drag and Drop</title>
1370
1371 <para>
1372 &product-name; enables you to drag and drop content from the host
1373 to the guest, and vice versa. For this to work the latest version
1374 of the Guest Additions must be installed on the guest.
1375 </para>
1376
1377 <para>
1378 Drag and drop transparently allows copying or opening files,
1379 directories, and even certain clipboard formats from one end to
1380 the other. For example, from the host to the guest or from the
1381 guest to the host. You then can perform drag and drop operations
1382 between the host and a VM, as it would be a native drag and drop
1383 operation on the host OS.
1384 </para>
1385
1386 <para>
1387 At the moment drag and drop is implemented for Windows-based and
1388 X-Windows-based systems, both on the host and guest side. As
1389 X-Windows supports many different drag and drop protocols only the
1390 most common one, XDND, is supported for now. Applications using
1391 other protocols, such as Motif or OffiX, will not be recognized by
1392 &product-name;.
1393 </para>
1394
1395 <para>
1396 In the context of using drag and drop, the origin of the data is
1397 called the <emphasis>source</emphasis>. That is, where the actual
1398 data comes from and is specified. The <emphasis>destination</emphasis>
1399 specifies where the data from the source should go to.
1400 Transferring data from the source to the destination can be done in
1401 various ways, such as copying, moving, or linking.
1402 </para>
1403
1404 <note>
1405 <para>
1406 At the moment only copying of data is supported. Moving or
1407 linking is not yet implemented.
1408 </para>
1409 </note>
1410
1411 <para>
1412 When transferring data from the host to the guest OS, the host in
1413 this case is the source, whereas the guest OS is the destination.
1414 However, when transferring data from the guest OS to the host, the
1415 guest OS this time became the source and the host is the destination.
1416 </para>
1417
1418 <para>
1419 For security reasons drag and drop can be configured at runtime on
1420 a per-VM basis either using the <emphasis role="bold">Drag and
1421 Drop</emphasis> menu item in the
1422 <emphasis role="bold">Devices</emphasis> menu of the virtual
1423 machine, as shown below, or the <command>VBoxManage</command>
1424 command.
1425 </para>
1426
1427 <figure id="fig-drag-drop-options">
1428 <title>Drag and Drop Menu Options</title>
1429 <mediaobject>
1430 <imageobject>
1431 <imagedata align="center" fileref="images/dnd-modes.png"
1432 width="10cm" />
1433 </imageobject>
1434 </mediaobject>
1435 </figure>
1436
1437 <para>
1438 The following drag and drop modes are available:
1439 </para>
1440
1441 <itemizedlist>
1442
1443 <listitem>
1444 <para>
1445 <emphasis role="bold">Disabled.</emphasis> Disables the drag
1446 and drop feature entirely. This is the default when creating a
1447 new VM.
1448 </para>
1449 </listitem>
1450
1451 <listitem>
1452 <para>
1453 <emphasis role="bold">Host To Guest.</emphasis> Enables drag
1454 and drop operations from the host to the guest only.
1455 </para>
1456 </listitem>
1457
1458 <listitem>
1459 <para>
1460 <emphasis role="bold">Guest To Host.</emphasis> Enables drag
1461 and drop operations from the guest to the host only.
1462 </para>
1463 </listitem>
1464
1465 <listitem>
1466 <para>
1467 <emphasis role="bold">Bidirectional.</emphasis> Enables drag
1468 and drop operations in both directions: from the host to the
1469 guest, and from the guest to the host.
1470 </para>
1471 </listitem>
1472
1473 </itemizedlist>
1474
1475 <note>
1476 <para>
1477 Drag and drop support depends on the frontend being used. At the
1478 moment, only the VirtualBox Manager frontend provides this
1479 functionality.
1480 </para>
1481 </note>
1482
1483 <para>
1484 To use the <command>VBoxManage</command> command to control the
1485 current drag and drop mode, see <xref linkend="vboxmanage" />. The
1486 <command>modifyvm</command> and <command>controlvm</command>
1487 commands enable setting of a VM's current drag and drop mode from
1488 the command line.
1489 </para>
1490
1491 <sect2 id="guestadd-dnd-formats">
1492
1493 <title>Supported Formats</title>
1494
1495 <para>
1496 As &product-name; can run on a variety of host operating systems
1497 and also supports a wide range of guests, certain data formats
1498 must be translated after transfer. This is so that the destination
1499 operating system, which receiving the data, is able to handle
1500 them in an appropriate manner.
1501 </para>
1502
1503 <note>
1504 <para>
1505 When dragging files no data conversion is done in any way. For
1506 example, when transferring a file from a Linux guest to a
1507 Windows host the Linux-specific line endings are not converted
1508 to Windows line endings.
1509 </para>
1510 </note>
1511
1512 <para>
1513 The following formats are handled by the &product-name; drag and
1514 drop service:
1515 </para>
1516
1517 <itemizedlist>
1518
1519 <listitem>
1520 <para>
1521 <emphasis role="bold">Plain text:</emphasis> From
1522 applications such as text editors, internet browsers and
1523 terminal windows.
1524 </para>
1525 </listitem>
1526
1527 <listitem>
1528 <para>
1529 <emphasis role="bold">Files:</emphasis> From file managers
1530 such as Windows Explorer, Nautilus, and Finder.
1531 </para>
1532 </listitem>
1533
1534 <listitem>
1535 <para>
1536 <emphasis role="bold">Directories:</emphasis> For
1537 directories, the same formats apply as for files.
1538 </para>
1539 </listitem>
1540
1541 </itemizedlist>
1542
1543 </sect2>
1544
1545 <sect2 id="guestadd-dnd-limitations">
1546
1547 <title>Known Limitations</title>
1548
1549 <para>
1550 The following limitations are known for drag and drop:
1551 </para>
1552
1553 <para>
1554 On Windows hosts, dragging and dropping content between
1555 UAC-elevated (User Account Control) programs and
1556 non-UAC-elevated programs is not allowed. If you start
1557 &product-name; with Administrator privileges then drag and drop
1558 will not work with Windows Explorer, which runs with regular
1559 user privileges by default.
1560 </para>
1561
1562 <para>
1563 On Linux hosts and guests, programs can query for drag and drop
1564 data while the drag operation still is in progress (e.g. on LXDE
1565 using the PCManFM file manager). This currently is not supported.
1566
1567 As a workaround, a different file manager (e.g. Nautilus) can
1568 be used instead.
1569 </para>
1570
1571 </sect2>
1572
1573 </sect1>
1574
1575 <sect1 id="guestadd-video">
1576
1577 <title>Hardware-Accelerated Graphics</title>
1578
1579 <sect2 id="guestadd-3d">
1580
1581 <title>Hardware 3D Acceleration (OpenGL and Direct3D 8/9)</title>
1582
1583 <para>
1584 The &product-name; Guest Additions contain experimental hardware
1585 3D support for Windows, Linux, and Oracle Solaris guests.
1586 </para>
1587
1588 <para>
1589 With this feature, if an application inside your virtual machine
1590 uses 3D features through the OpenGL or Direct3D 8/9 programming
1591 interfaces, instead of emulating them in software, which would
1592 be slow, &product-name; will attempt to use your host's 3D
1593 hardware. This works for all supported host platforms, provided
1594 that your host operating system can make use of your accelerated
1595 3D hardware in the first place.
1596 </para>
1597
1598 <para>
1599 The 3D acceleration feature currently has the following
1600 preconditions:
1601 </para>
1602
1603 <itemizedlist>
1604
1605 <listitem>
1606 <para>
1607 It is only available for certain Windows, Linux, and Oracle
1608 Solaris guests. In particular:
1609 </para>
1610
1611 <itemizedlist>
1612
1613 <listitem>
1614 <para>
1615 3D acceleration with Windows guests requires Windows
1616 2000 or later. Apart from on Windows 2000 guests, both
1617 OpenGL and Direct3D 8/9 are supported on an experimental
1618 basis.
1619 </para>
1620 </listitem>
1621
1622 <listitem>
1623 <para>
1624 OpenGL on Linux requires kernel 2.6.27 or later, as well
1625 as X.org server version 1.5 or later. Ubuntu 10.10 and
1626 Fedora 14 have been tested and confirmed as working.
1627 </para>
1628 </listitem>
1629
1630 <listitem>
1631 <para>
1632 OpenGL on Oracle Solaris guests requires X.org server
1633 version 1.5 or later.
1634 </para>
1635 </listitem>
1636
1637 </itemizedlist>
1638 </listitem>
1639
1640 <listitem>
1641 <para>
1642 The Guest Additions must be installed.
1643 </para>
1644
1645 <note>
1646 <para>
1647 For the basic Direct3D acceleration to work in a Windows
1648 Guest, &product-name; needs to replace Windows system
1649 files in the virtual machine. As a result, the Guest
1650 Additions installation program offers Direct3D
1651 acceleration as an option that must be explicitly enabled.
1652 Also, you must install the Guest Additions in Safe Mode.
1653 This does <emphasis>not</emphasis> apply to the WDDM
1654 Direct3D video driver available for Windows Vista and
1655 later. See <xref linkend="KnownIssues" /> for details.
1656 </para>
1657 </note>
1658 </listitem>
1659
1660 <listitem>
1661 <para>
1662 Because 3D support is still experimental at this time, it is
1663 disabled by default and must be <emphasis>manually
1664 enabled</emphasis> in the VM settings. See
1665 <xref linkend="settings-display" />.
1666 </para>
1667
1668 <note>
1669 <para>
1670 Untrusted guest systems should not be allowed to use the
1671 3D acceleration features of &product-name;, just as
1672 untrusted host software should not be allowed to use 3D
1673 acceleration. Drivers for 3D hardware are generally too
1674 complex to be made properly secure and any software which
1675 is allowed to access them may be able to compromise the
1676 operating system running them. In addition, enabling 3D
1677 acceleration gives the guest direct access to a large body
1678 of additional program code in the &product-name; host
1679 process which it might conceivably be able to use to crash
1680 the virtual machine.
1681 </para>
1682 </note>
1683 </listitem>
1684
1685 </itemizedlist>
1686
1687 <para>
1688 To enable Aero theme support, the &product-name; WDDM video
1689 driver must be installed, which is available with the Guest
1690 Additions installation. The WDDM driver is not installed by
1691 default for Vista and Windows 7 guests and must be
1692 <emphasis>manually selected</emphasis> in the Guest Additions
1693 installer by clicking <emphasis role="bold">No</emphasis> in the
1694 <emphasis role="bold">Would You Like to Install Basic Direct3D
1695 Support</emphasis> dialog displayed when the Direct3D feature is
1696 selected.
1697 </para>
1698
1699 <para>
1700 The Aero theme is not enabled by default on Windows. See your
1701 Windows platform documentation for details of how to enable the
1702 Aero theme.
1703 </para>
1704
1705 <para>
1706 Technically, &product-name; implements 3D acceleration by
1707 installing an additional hardware 3D driver inside the guest
1708 when the Guest Additions are installed. This driver acts as a
1709 hardware 3D driver and reports to the guest operating system
1710 that the virtual hardware is capable of 3D hardware
1711 acceleration. When an application in the guest then requests
1712 hardware acceleration through the OpenGL or Direct3D programming
1713 interfaces, these are sent to the host through a special
1714 communication tunnel implemented by &product-name;. The
1715 <emphasis>host</emphasis> then performs the requested 3D
1716 operation using the host's programming interfaces.
1717 </para>
1718
1719 </sect2>
1720
1721 <sect2 id="guestadd-2d">
1722
1723 <title>Hardware 2D Video Acceleration for Windows Guests</title>
1724
1725 <para>
1726 The &product-name; Guest Additions contain experimental hardware
1727 2D video acceleration support for Windows guests.
1728 </para>
1729
1730 <para>
1731 With this feature, if an application such as a video player
1732 inside your Windows VM uses 2D video overlays to play a movie
1733 clip, then &product-name; will attempt to use your host's video
1734 acceleration hardware instead of performing overlay stretching
1735 and color conversion in software, which would be slow. This
1736 currently works for Windows, Linux and Mac OS X host platforms,
1737 provided that your host operating system can make use of 2D
1738 video acceleration in the first place.
1739 </para>
1740
1741 <para>
1742 Hardware 2D video acceleration currently has the following
1743 preconditions:
1744 </para>
1745
1746 <itemizedlist>
1747
1748 <listitem>
1749 <para>
1750 Only available for Windows guests, running Windows XP or
1751 later.
1752 </para>
1753 </listitem>
1754
1755 <listitem>
1756 <para>
1757 Guest Additions must be installed.
1758 </para>
1759 </listitem>
1760
1761 <listitem>
1762 <para>
1763 Because 2D support is still experimental at this time, it is
1764 disabled by default and must be <emphasis>manually
1765 enabled</emphasis> in the VM settings. See
1766 <xref linkend="settings-display" />.
1767 </para>
1768 </listitem>
1769
1770 </itemizedlist>
1771
1772 <para>
1773 Technically, &product-name; implements this by exposing video
1774 overlay DirectDraw capabilities in the Guest Additions video
1775 driver. The driver sends all overlay commands to the host
1776 through a special communication tunnel implemented by
1777 &product-name;. On the host side, OpenGL is then used to
1778 implement color space transformation and scaling.
1779 </para>
1780
1781 </sect2>
1782
1783 </sect1>
1784
1785 <sect1 id="seamlesswindows">
1786
1787 <title>Seamless Windows</title>
1788
1789 <para>
1790 With the <emphasis>seamless windows</emphasis> feature of
1791 &product-name;, you can have the windows that are displayed within
1792 a virtual machine appear side by side next to the windows of your
1793 host. This feature is supported for the following guest operating
1794 systems, provided that the Guest Additions are installed:
1795 </para>
1796
1797 <itemizedlist>
1798
1799 <listitem>
1800 <para>
1801 Windows guests.
1802 </para>
1803 </listitem>
1804
1805 <listitem>
1806 <para>
1807 Supported Linux or Oracle Solaris guests running the X Window
1808 System.
1809 </para>
1810 </listitem>
1811
1812 </itemizedlist>
1813
1814 <para>
1815 After seamless windows are enabled, &product-name; suppresses the
1816 display of the desktop background of your guest, allowing you to
1817 run the windows of your guest operating system seamlessly next to
1818 the windows of your host.
1819 </para>
1820
1821 <figure id="fig-seamless-windows">
1822 <title>Seamless Windows on a Host Desktop</title>
1823 <mediaobject>
1824 <imageobject>
1825 <imagedata align="center" fileref="images/seamless.png" width="14cm" />
1826 </imageobject>
1827 </mediaobject>
1828 </figure>
1829
1830 <para>
1831 To enable seamless mode, after starting the virtual machine, press
1832 the <emphasis role="bold">Host key + L</emphasis>. The Host key is
1833 normally the right control key. This will enlarge the size of the
1834 VM's display to the size of your host screen and mask out the
1835 guest operating system's background. To disable seamless windows
1836 and go back to the normal VM display, press the Host key + L
1837 again.
1838 </para>
1839
1840 </sect1>
1841
1842 <sect1 id="guestadd-guestprops">
1843
1844 <title>Guest Properties</title>
1845
1846 <para>
1847 &product-name; enables requests of some properties from a running
1848 guest, provided that the &product-name; Guest Additions are
1849 installed and the VM is running. This provides the following
1850 advantages:
1851 </para>
1852
1853 <itemizedlist>
1854
1855 <listitem>
1856 <para>
1857 A number of predefined VM characteristics are automatically
1858 maintained by &product-name; and can be retrieved on the host.
1859 For example, to monitor VM performance and statistics.
1860 </para>
1861 </listitem>
1862
1863 <listitem>
1864 <para>
1865 Arbitrary string data can be exchanged between guest and host.
1866 This works in both directions.
1867 </para>
1868 </listitem>
1869
1870 </itemizedlist>
1871
1872 <para>
1873 To accomplish this, &product-name; establishes a private
1874 communication channel between the &product-name; Guest Additions
1875 and the host, and software on both sides can use this channel to
1876 exchange string data for arbitrary purposes. Guest properties are
1877 simply string keys to which a value is attached. They can be set,
1878 or written to, by either the host and the guest. They can also be
1879 read from both sides.
1880 </para>
1881
1882 <para>
1883 In addition to establishing the general mechanism of reading and
1884 writing values, a set of predefined guest properties is
1885 automatically maintained by the &product-name; Guest Additions to
1886 allow for retrieving interesting guest data such as the guest's
1887 exact operating system and service pack level, the installed
1888 version of the Guest Additions, users that are currently logged
1889 into the guest OS, network statistics and more. These predefined
1890 properties are all prefixed with <literal>/VirtualBox/</literal>
1891 and organized into a hierarchical tree of keys.
1892 </para>
1893
1894 <para>
1895 Some of this runtime information is shown when you select
1896 <emphasis role="bold">Session Information Dialog</emphasis> from a
1897 virtual machine's <emphasis role="bold">Machine</emphasis> menu.
1898 </para>
1899
1900 <para>
1901 A more flexible way to use this channel is with the
1902 <command>VBoxManage guestproperty</command> command. See
1903 <xref linkend="vboxmanage-guestproperty" />. For example, to have
1904 <emphasis>all</emphasis> the available guest properties for a
1905 given running VM listed with their respective values, use this
1906 command:
1907 </para>
1908
1909<screen>$ VBoxManage guestproperty enumerate "Windows Vista III"
1910VirtualBox Command Line Management Interface Version <replaceable>version-number</replaceable>
1911(C) 2005-2019 Oracle Corporation
1912All rights reserved.
1913
1914Name: /VirtualBox/GuestInfo/OS/Product, value: Windows Vista Business Edition,
1915 timestamp: 1229098278843087000, flags:
1916Name: /VirtualBox/GuestInfo/OS/Release, value: 6.0.6001,
1917 timestamp: 1229098278950553000, flags:
1918Name: /VirtualBox/GuestInfo/OS/ServicePack, value: 1,
1919 timestamp: 1229098279122627000, flags:
1920Name: /VirtualBox/GuestAdd/InstallDir,
1921 value: C:/Program Files/Oracle/VirtualBox
1922 Guest Additions, timestamp: 1229098279269739000, flags:
1923Name: /VirtualBox/GuestAdd/Revision, value: 40720,
1924 timestamp: 1229098279345664000, flags:
1925Name: /VirtualBox/GuestAdd/Version, value: <replaceable>version-number</replaceable>,
1926 timestamp: 1229098279479515000, flags:
1927Name: /VirtualBox/GuestAdd/Components/VBoxControl.exe, value: <replaceable>version-number</replaceable>r40720,
1928 timestamp: 1229098279651731000, flags:
1929Name: /VirtualBox/GuestAdd/Components/VBoxHook.dll, value: <replaceable>version-number</replaceable>r40720,
1930 timestamp: 1229098279804835000, flags:
1931Name: /VirtualBox/GuestAdd/Components/VBoxDisp.dll, value: <replaceable>version-number</replaceable>r40720,
1932 timestamp: 1229098279880611000, flags:
1933Name: /VirtualBox/GuestAdd/Components/VBoxMRXNP.dll, value: <replaceable>version-number</replaceable>r40720,
1934 timestamp: 1229098279882618000, flags:
1935Name: /VirtualBox/GuestAdd/Components/VBoxService.exe, value: <replaceable>version-number</replaceable>r40720,
1936 timestamp: 1229098279883195000, flags:
1937Name: /VirtualBox/GuestAdd/Components/VBoxTray.exe, value: <replaceable>version-number</replaceable>r40720,
1938 timestamp: 1229098279885027000, flags:
1939Name: /VirtualBox/GuestAdd/Components/VBoxGuest.sys, value: <replaceable>version-number</replaceable>r40720,
1940 timestamp: 1229098279886838000, flags:
1941Name: /VirtualBox/GuestAdd/Components/VBoxMouse.sys, value: <replaceable>version-number</replaceable>r40720,
1942 timestamp: 1229098279890600000, flags:
1943Name: /VirtualBox/GuestAdd/Components/VBoxSF.sys, value: <replaceable>version-number</replaceable>r40720,
1944 timestamp: 1229098279893056000, flags:
1945Name: /VirtualBox/GuestAdd/Components/VBoxVideo.sys, value: <replaceable>version-number</replaceable>r40720,
1946 timestamp: 1229098279895767000, flags:
1947Name: /VirtualBox/GuestInfo/OS/LoggedInUsers, value: 1,
1948 timestamp: 1229099826317660000, flags:
1949Name: /VirtualBox/GuestInfo/OS/NoLoggedInUsers, value: false,
1950 timestamp: 1229098455580553000, flags:
1951Name: /VirtualBox/GuestInfo/Net/Count, value: 1,
1952 timestamp: 1229099826299785000, flags:
1953Name: /VirtualBox/HostInfo/GUI/LanguageID, value: C,
1954 timestamp: 1229098151272771000, flags:
1955Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 192.168.2.102,
1956 timestamp: 1229099826300088000, flags:
1957Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 255.255.255.255,
1958 timestamp: 1229099826300220000, flags:
1959Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0,
1960 timestamp: 1229099826300350000, flags:
1961Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up,
1962 timestamp: 1229099826300524000, flags:
1963Name: /VirtualBox/GuestInfo/OS/LoggedInUsersList, value: username,
1964 timestamp: 1229099826317386000, flags:</screen>
1965
1966 <para>
1967 To query the value of a single property, use the
1968 <command>get</command> subcommand as follows:
1969 </para>
1970
1971<screen>$ VBoxManage guestproperty get "Windows Vista III" "/VirtualBox/GuestInfo/OS/Product"
1972VirtualBox Command Line Management Interface Version <replaceable>version-number</replaceable>
1973(C) 2005-2019 Oracle Corporation
1974All rights reserved.
1975
1976Value: Windows Vista Business Edition</screen>
1977
1978 <para>
1979 To add or change guest properties from the guest, use the tool
1980 <command>VBoxControl</command>. This tool is included in the Guest
1981 Additions. When started from a Linux guest, this tool requires
1982 root privileges for security reasons.
1983 </para>
1984
1985<screen>$ sudo VBoxControl guestproperty enumerate
1986VirtualBox Guest Additions Command Line Management Interface Version <replaceable>version-number</replaceable>
1987(C) 2005-2019 Oracle Corporation
1988All rights reserved.
1989
1990Name: /VirtualBox/GuestInfo/OS/Release, value: 2.6.28-18-generic,
1991 timestamp: 1265813265835667000, flags: &lt;NULL&gt;
1992Name: /VirtualBox/GuestInfo/OS/Version, value: #59-Ubuntu SMP Thu Jan 28 01:23:03 UTC 2010,
1993 timestamp: 1265813265836305000, flags: &lt;NULL&gt;
1994 ...</screen>
1995
1996 <para>
1997 For more complex needs, you can use the &product-name; programming
1998 interfaces. See <xref linkend="VirtualBoxAPI" />.
1999 </para>
2000
2001 <sect2 id="guestadd-guestprops-waits">
2002
2003 <title>Using Guest Properties to Wait on VM Events</title>
2004
2005 <para>
2006 The properties <literal>/VirtualBox/HostInfo/VBoxVer</literal>,
2007 <literal>/VirtualBox/HostInfo/VBoxVerExt</literal> or
2008 <literal>/VirtualBox/HostInfo/VBoxRev</literal> can be waited on
2009 to detect that the VM state was restored from saved state or
2010 snapshot:
2011 </para>
2012
2013<screen>$ VBoxControl guestproperty wait /VirtualBox/HostInfo/VBoxVer</screen>
2014
2015 <para>
2016 Similarly the
2017 <literal>/VirtualBox/HostInfo/ResumeCounter</literal> can be
2018 used to detect that a VM was resumed from the paused state or
2019 saved state.
2020 </para>
2021
2022 </sect2>
2023
2024 </sect1>
2025
2026 <sect1 id="guestadd-gc-file-manager">
2027
2028 <title>Guest Control File Manager</title>
2029
2030 <para>
2031 The Guest Control File Manager is a feature of the Guest Additions
2032 that enables easy copying and moving of files between a guest and
2033 the host system. Other file management operations provide support
2034 to create new folders and to rename or delete files.
2035 </para>
2036
2037 <figure id="fig-guest-control-fm">
2038 <title>Guest Control File Manager</title>
2039 <mediaobject>
2040 <imageobject>
2041 <imagedata align="center" fileref="images/guest-fm.png"
2042 width="12cm" />
2043 </imageobject>
2044 </mediaobject>
2045 </figure>
2046
2047 <para>
2048 The Guest Control File Manager works by mounting the host file
2049 system. Guest users must authenticate and create a guest session
2050 before they can transfer files.
2051 </para>
2052
2053 <sect2 id="guestadd-gc-file-manager-using">
2054
2055 <title>Using the Guest Control File Manager</title>
2056
2057 <para>
2058 The following steps describe how to use the Guest Control File
2059 Manager.
2060 </para>
2061
2062 <orderedlist>
2063
2064 <listitem>
2065 <para>
2066 Open the Guest Control File Manager.
2067 </para>
2068
2069 <para>
2070 In the guest VM, select
2071 <emphasis role="bold">Machine</emphasis>,
2072 <emphasis role="bold">File Manager</emphasis>.
2073 </para>
2074
2075 <para>
2076 The left pane shows the files on the host system.
2077 </para>
2078 </listitem>
2079
2080 <listitem>
2081 <para>
2082 Create a guest session.
2083 </para>
2084
2085 <para>
2086 At the bottom of the Guest Control File Manager, enter
2087 authentication credentials for a user on the guest system.
2088 </para>
2089
2090 <para>
2091 Click <emphasis role="bold">Create Session</emphasis>.
2092 </para>
2093
2094 <para>
2095 The contents of the guest VM file system appears in the
2096 right pane of the Guest Control File Manager.
2097 </para>
2098 </listitem>
2099
2100 <listitem>
2101 <para>
2102 Transfer files between the guest and the host system by
2103 using the move and copy file transfer icons.
2104 </para>
2105
2106 <para>
2107 You can copy and move files from a guest to the host system
2108 or from the host system to the guest.
2109 </para>
2110 </listitem>
2111
2112 <listitem>
2113 <para>
2114 Close the Guest Control File Manager.
2115 </para>
2116
2117 <para>
2118 Click <emphasis role="bold">Close</emphasis> to end the
2119 guest session.
2120 </para>
2121 </listitem>
2122
2123 </orderedlist>
2124
2125 </sect2>
2126
2127 </sect1>
2128
2129 <sect1 id="guestadd-guestcontrol">
2130
2131 <title>Guest Control of Applications</title>
2132
2133 <para>
2134 The Guest Additions enable starting of applications inside a guest
2135 VM from the host system. This feature can be used to automate
2136 deployment of software within the guest.
2137 </para>
2138
2139 <para>
2140 For this to work, the application needs to be installed on the
2141 guest. No additional software needs to be installed on the host.
2142 Additionally, text mode output to stdout and stderr can be shown
2143 on the host for further processing. There are options to specify
2144 user credentials and a timeout value, in milliseconds, to limit
2145 the time the application is able to run.
2146 </para>
2147
2148 <para>
2149 The Guest Additions for Windows and Linux allow for automatic updating.
2150 This applies for already installed Guest Additions versions. Also,
2151 copying files from/to the host as well as various other file system
2152 operations are available.
2153 </para>
2154
2155 <para>
2156 To use these features, use the &product-name; command line. See
2157 <xref linkend="vboxmanage-guestcontrol" />.
2158 </para>
2159
2160 </sect1>
2161
2162 <sect1 id="guestadd-memory-usage">
2163
2164 <title>Memory Overcommitment</title>
2165
2166 <para>
2167 In server environments with many VMs, the Guest Additions can be
2168 used to share physical host memory between several VMs. This
2169 reduces the total amount of memory in use by the VMs. If memory
2170 usage is the limiting factor and CPU resources are still
2171 available, this can help with running more VMs on each host.
2172 </para>
2173
2174 <sect2 id="guestadd-balloon">
2175
2176 <title>Memory Ballooning</title>
2177
2178 <para>
2179 The Guest Additions can change the amount of host memory that a
2180 VM uses, while the machine is running. Because of how this is
2181 implemented, this feature is called <emphasis>memory
2182 ballooning</emphasis>.
2183 </para>
2184
2185 <note>
2186 <itemizedlist>
2187
2188 <listitem>
2189 <para>
2190 &product-name; supports memory ballooning only on 64-bit
2191 hosts. It is not supported on Mac OS X hosts.
2192 </para>
2193 </listitem>
2194
2195 <listitem>
2196 <para>
2197 Memory ballooning does not work with large pages enabled.
2198 To turn off large pages support for a VM, run
2199 <command>VBoxManage modifyvm
2200 <replaceable>vmname</replaceable> --largepages
2201 off</command>
2202 </para>
2203 </listitem>
2204
2205 </itemizedlist>
2206 </note>
2207
2208 <para>
2209 Normally, to change the amount of memory allocated to a virtual
2210 machine, you have to shut down the virtual machine entirely and
2211 modify its settings. With memory ballooning, memory that was
2212 allocated for a virtual machine can be given to another virtual
2213 machine without having to shut the machine down.
2214 </para>
2215
2216 <para>
2217 When memory ballooning is requested, the &product-name; Guest
2218 Additions, which run inside the guest, allocate physical memory
2219 from the guest operating system on the kernel level and lock
2220 this memory down in the guest. This ensures that the guest will
2221 not use that memory any longer. No guest applications can
2222 allocate it, and the guest kernel will not use it either.
2223 &product-name; can then reuse this memory and give it to another
2224 virtual machine.
2225 </para>
2226
2227 <para>
2228 The memory made available through the ballooning mechanism is
2229 only available for reuse by &product-name;. It is
2230 <emphasis>not</emphasis> returned as free memory to the host.
2231 Requesting balloon memory from a running guest will therefore
2232 not increase the amount of free, unallocated memory on the host.
2233 Effectively, memory ballooning is therefore a memory
2234 overcommitment mechanism for multiple virtual machines while
2235 they are running. This can be useful to temporarily start
2236 another machine, or in more complicated environments, for
2237 sophisticated memory management of many virtual machines that
2238 may be running in parallel depending on how memory is used by
2239 the guests.
2240 </para>
2241
2242 <para>
2243 At this time, memory ballooning is only supported through
2244 <command>VBoxManage</command>. Use the following command to
2245 increase or decrease the size of the memory balloon within a
2246 running virtual machine that has Guest Additions installed:
2247 </para>
2248
2249<screen>VBoxManage controlvm "VM name" guestmemoryballoon n</screen>
2250
2251 <para>
2252 where <replaceable>VM name</replaceable> is the name or UUID of
2253 the virtual machine in question and <replaceable>n</replaceable>
2254 is the amount of memory to allocate from the guest in megabytes.
2255 See <xref
2256 linkend="vboxmanage-controlvm" />.
2257 </para>
2258
2259 <para>
2260 You can also set a default balloon that will automatically be
2261 requested from the VM every time after it has started up with
2262 the following command:
2263 </para>
2264
2265<screen>VBoxManage modifyvm "VM name" --guestmemoryballoon n</screen>
2266
2267 <para>
2268 By default, no balloon memory is allocated. This is a VM
2269 setting, like other <command>modifyvm</command> settings, and
2270 therefore can only be set while the machine is shut down. See
2271 <xref
2272 linkend="vboxmanage-modifyvm" />.
2273 </para>
2274
2275 </sect2>
2276
2277 <sect2 id="guestadd-pagefusion">
2278
2279 <title>Page Fusion</title>
2280
2281 <para>
2282 Whereas memory ballooning simply reduces the amount of RAM that
2283 is available to a VM, Page Fusion works differently. It avoids
2284 memory duplication between several similar running VMs.
2285 </para>
2286
2287 <para>
2288 In a server environment running several similar VMs on the same
2289 host, lots of memory pages are identical. For example, if the
2290 VMs are using identical operating systems. &product-name;'s Page
2291 Fusion technology can efficiently identify these identical
2292 memory pages and share them between multiple VMs.
2293 </para>
2294
2295 <note>
2296 <para>
2297 &product-name; supports Page Fusion only on 64-bit hosts, and
2298 it is not supported on Mac OS X hosts. Page Fusion currently
2299 works only with Windows 2000 and later guests.
2300 </para>
2301 </note>
2302
2303 <para>
2304 The more similar the VMs on a given host are, the more
2305 efficiently Page Fusion can reduce the amount of host memory
2306 that is in use. It therefore works best if all VMs on a host run
2307 identical operating systems. Instead of having a complete copy
2308 of each operating system in each VM, Page Fusion identifies the
2309 identical memory pages in use by these operating systems and
2310 eliminates the duplicates, sharing host memory between several
2311 machines. This is called <emphasis>deduplication</emphasis>. If
2312 a VM tries to modify a page that has been shared with other VMs,
2313 a new page is allocated again for that VM with a copy of the
2314 shared page. This is called <emphasis>copy on write</emphasis>.
2315 All this is fully transparent to the virtual machine.
2316 </para>
2317
2318 <para>
2319 You may be familiar with this kind of memory overcommitment from
2320 other hypervisor products, which call this feature
2321 <emphasis>page sharing</emphasis> or <emphasis>same page
2322 merging</emphasis>. However, Page Fusion differs significantly
2323 from those other solutions, whose approaches have several
2324 drawbacks:
2325 </para>
2326
2327 <itemizedlist>
2328
2329 <listitem>
2330 <para>
2331 Traditional hypervisors scan <emphasis>all</emphasis> guest
2332 memory and compute checksums, also called hashes, for every
2333 single memory page. Then, they look for pages with identical
2334 hashes and compare the entire content of those pages. If two
2335 pages produce the same hash, it is very likely that the
2336 pages are identical in content. This process can take rather
2337 long, especially if the system is not idling. As a result,
2338 the additional memory only becomes available after a
2339 significant amount of time, such as hours or sometimes days.
2340 Even worse, this kind of page sharing algorithm generally
2341 consumes significant CPU resources and increases the
2342 virtualization overhead by 10 to 20%.
2343 </para>
2344
2345 <para>
2346 Page Fusion in &product-name; uses logic in the
2347 &product-name; Guest Additions to quickly identify memory
2348 cells that are most likely identical across VMs. It can
2349 therefore achieve most of the possible savings of page
2350 sharing almost immediately and with almost no overhead.
2351 </para>
2352 </listitem>
2353
2354 <listitem>
2355 <para>
2356 Page Fusion is also much less likely to be confused by
2357 identical memory that it will eliminate, just to learn
2358 seconds later that the memory will now change and having to
2359 perform a highly expensive and often service-disrupting
2360 reallocation.
2361 </para>
2362 </listitem>
2363
2364 </itemizedlist>
2365
2366 <para>
2367 At this time, Page Fusion can only be controlled with
2368 <command>VBoxManage</command>, and only while a VM is shut down.
2369 To enable Page Fusion for a VM, use the following command:
2370 </para>
2371
2372<screen>VBoxManage modifyvm "VM name" --pagefusion on</screen>
2373
2374 <para>
2375 You can observe Page Fusion operation using some metrics.
2376 <literal>RAM/VMM/Shared</literal> shows the total amount of
2377 fused pages, whereas the per-VM metric
2378 <literal>Guest/RAM/Usage/Shared</literal> will return the amount
2379 of fused memory for a given VM. See
2380 <xref linkend="vboxmanage-metrics" /> for information on how to
2381 query metrics.
2382 </para>
2383
2384 <note>
2385 <para>
2386 Enabling Page Fusion might indirectly increase the chances for
2387 malicious guests to successfully attack other VMs running on
2388 the same host. See <xref linkend="pot-insecure"/>.
2389 </para>
2390 </note>
2391
2392 </sect2>
2393
2394 </sect1>
2395
2396 <sect1 id="guestadd-resizing">
2397
2398 <title>Controlling Virtual Monitor Topology</title>
2399
2400 <sect2 id="guestadd-resizing-linux">
2401
2402 <title>X11/Wayland Desktop Environments</title>
2403
2404 <para>
2405 The Guest Additions provide necessary services to enable controlling
2406 the guest system's monitor topology. My monitor topology the resolution
2407 of each virtual monitor and its state are meant (disabled/enabled). The
2408 resolution of a virtual monitor can be modified from the host side either
2409 by resizing the window that hosts the virtual monitor or thru the view menu.
2410 On guest operating systems with X11/Wayland desktops this is achieved by
2411 either of two following services:
2412 </para>
2413
2414 <screen>
2415 VBoxClient --vmsvga
2416 VBoxDRMClient
2417 </screen>
2418
2419 <para>
2420 Here are some details about guest screen resolution control functionality:
2421 </para>
2422
2423 <itemizedlist>
2424
2425 <listitem>
2426 <para>
2427 On X11/Wayland desktops the resizing service is started during
2428 desktop session initialization, that is desktop login. On X11 desktops
2429 VBoxClient --vmsvga service handles screen topology thru xrandr calls.
2430 On Wayland clients VBoxDRMClient is used. The decision of choosing either
2431 of these clients is done automatically at each desktop session start.
2432 </para>
2433 </listitem>
2434 <listitem>
2435 <para>
2436 On 32 bit guest OSs VBoxDRMClient, which is run during desktop
2437 session start, is used. The guest OS bitness check and choice
2438 of the service is done automatically.
2439 </para>
2440 </listitem>
2441 <listitem>
2442 <para>
2443 Since the mentioned monitor topology control services are initialized during
2444 the desktop session start, display managers' (gdm, lightdm, etc.) resolution
2445 cannot be controlled. This default behavior can be changed by setting the
2446 following guest property of the virtual machine to any value.
2447 <screen>
2448 /VirtualBox/GuestAdd/DRMResize
2449 </screen>
2450 Please refer to <xref linkend="guestadd-guestprops" /> for how to set/delete
2451 guest properties. When this guest property is set then VBoxDRMClient is started
2452 during the guest OS boot and stays active for both display manager's login screen
2453 and desktop session.
2454 </para>
2455 </listitem>
2456
2457 </itemizedlist>
2458
2459 <sect3 id="guestadd-resizing-linux-limitations">
2460
2461 <title>Known Limitations</title>
2462 <para>
2463 VBoxDRMClient is not able to handle arbitrary guest monitor topologies. Specifically,
2464 disabling a guest monitor (except the last one) invalidates the monitor topology. That
2465 is, when the guest is configured to have 4 monitors, disabling 2nd or 3rd monitor is not
2466 recommended.
2467 </para>
2468
2469 </sect3>
2470
2471 </sect2>
2472
2473 </sect1>
2474
2475</chapter>
Note: See TracBrowser for help on using the repository browser.

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