VirtualBox

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

Last change on this file since 95214 was 95214, checked in by vboxsync, 3 years ago

Documentation: Add info about updated resize mechanism for Linux VMSVGA guests, bugref:10134.

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