VirtualBox

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

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

doc/manual: typos, spaces.

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

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