VirtualBox

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

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

manual/user_GuestAdditions.xml: Documented restore-from-saved-state and resumed restored.

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

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