VirtualBox

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

Last change on this file since 67240 was 67216, checked in by vboxsync, 8 years ago

doc/manual: some clarifications about the WDDM driver. The driver itself is not experimental (anymore), the corresponding 3D support is.

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

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