VirtualBox

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

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

doc: comment fixes

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

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