VirtualBox

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

最後變更 在這個檔案從53023是 51263,由 vboxsync 提交於 11 年 前

doc/manual: minor wording fixes

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

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