VirtualBox

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

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

manual: Use @VBOX_XXX@ instead of $VBOX_XXX replacement patterns. No need to escape the former either in SED nor in makefiles.

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

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