VirtualBox

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

Last change on this file since 33942 was 33768, checked in by vboxsync, 14 years ago

Guest Additions Update/Copy: Documentation, Changelog.

File size: 70.8 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>
5 <title id="guestadditions">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 said in <xref linkend="virtintro" />, the Guest Additions are
18 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>Better video support</glossterm>
50
51 <glossdef>
52 <para>While the virtual graphics card which VirtualBox emulates
53 for any guest operating system provides all the basic features,
54 the custom video drivers that are installed with the Guest
55 Additions provide you with extra high and non-standard video modes
56 as well as accelerated video performance.</para>
57
58 <para>In addition, with Windows and recent Linux, Solaris and
59 OpenSolaris guests, if the Guest Additions are installed, you can
60 resize the virtual machine's window, and the video resolution in
61 the guest will be automatically adjusted (as if you had manually
62 entered an arbitrary resolution in the guest's display
63 settings).</para>
64
65 <para>Finally, if the Guest Additions are installed, 3D graphics
66 for guest applications can be accelerated; see <xref
67 linkend="guestadd-3d" />.</para>
68 </glossdef>
69 </glossentry>
70
71 <glossentry>
72 <glossterm>Time synchronization</glossterm>
73
74 <glossdef>
75 <para>With the Guest Additions installed, VirtualBox can ensure
76 that the guest's system time is better synchronized with that of
77 the host.</para>
78
79 <para>For various reasons, the time in the guest might run at a
80 slightly different rate than the time on the host. The host could
81 be receiving updates via NTP and its own time might not run
82 linearly. A VM could also be paused, which stops the flow of time
83 in the guest for a shorter or longer period of time. When the wall
84 clock time between the guest and host only differs slightly, the
85 time synchronization service attempts to gradually and smoothly
86 adjust the guest time in small increments to either "catch up" or
87 "lose" time. When the difference is too great (e.g., a VM paused
88 for hours or restored from saved state), the guest time is changed
89 immediately, without a gradual adjustment.</para>
90
91 <para>The Guest Additions will re-synchronize the time regularly.
92 See <xref linkend="changetimesync" /> for how to configure the
93 parameters of the time synchronization mechanism.</para>
94 </glossdef>
95 </glossentry>
96
97 <glossentry>
98 <glossterm>Shared folders</glossterm>
99
100 <glossdef>
101 <para>These provide an easy way to exchange files between the host
102 and the guest. Much like ordinary Windows network shares, you can
103 tell VirtualBox to treat a certain host directory as a shared
104 folder, and VirtualBox will make it available to the guest
105 operating system as a network share. For details, please refer to
106 <xref linkend="sharedfolders" />.</para>
107 </glossdef>
108 </glossentry>
109
110 <glossentry>
111 <glossterm>Seamless windows</glossterm>
112
113 <glossdef>
114 <para>With this feature, the individual windows that are displayed
115 on the desktop of the virtual machine can be mapped on the host's
116 desktop, as if the underlying application was actually running on
117 the host. See <xref linkend="seamlesswindows" /> for
118 details.</para>
119 </glossdef>
120 </glossentry>
121
122 <glossentry>
123 <glossterm>Shared clipboard</glossterm>
124
125 <glossdef>
126 <para>With the Guest Additions installed, the clipboard of the
127 guest operating system can optionally be shared with your host
128 operating system; see <xref linkend="generalsettings" />.</para>
129 </glossdef>
130 </glossentry>
131
132 <glossentry>
133 <glossterm>Automated logons (credentials passing)</glossterm>
134
135 <glossdef>
136 <para>For details, please see <xref linkend="autologon" />.</para>
137 </glossdef>
138 </glossentry>
139 </glosslist></para>
140
141 <para>Each version of VirtualBox, even minor releases, ship with their own
142 version of the Guest Additions. While the interfaces through which the
143 VirtualBox core communicates with the Guest Additions are kept stable so
144 that Guest Additions already installed in a VM should continue to work
145 when VirtualBox is upgraded on the host, for best results, it is
146 recommended to keep the Guest Additions at the same version.</para>
147
148 <para>Starting with VirtualBox 3.1, the Windows and Linux Guest Additions
149 therefore check automatically whether they have to be updated. If the host
150 is running a newer VirtualBox version than the Guest Additions, a
151 notification with further instructions is displayed in the guest.</para>
152
153 <para>To disable this update check for the Guest Additions of a given
154 virtual machine, set the value of its
155 <computeroutput>/VirtualBox/GuestAdd/CheckHostVersion</computeroutput>
156 guest property to <computeroutput>0</computeroutput>; see <xref
157 linkend="guestadd-guestprops" /> for details.</para>
158 </sect1>
159
160 <sect1>
161 <title>Installing and Maintaining Guest Additions</title>
162
163 <para>Guest Additions are available for virtual machines running Windows,
164 Linux, Solaris or OS/2. The following sections describe the specifics of
165 each variant in detail.</para>
166
167 <sect2 id="additions-windows">
168 <title>Guest Additions for Windows</title>
169
170 <para>The VirtualBox Windows Guest Additions are designed to be
171 installed in a virtual machine running a Windows operating system. The
172 following versions of Windows guests are supported:</para>
173
174 <itemizedlist>
175 <listitem>
176 <para>Microsoft Windows NT 4.0 (any service pack)</para>
177 </listitem>
178
179 <listitem>
180 <para>Microsoft Windows 2000 (any service pack)</para>
181 </listitem>
182
183 <listitem>
184 <para>Microsoft Windows XP (any service pack)</para>
185 </listitem>
186
187 <listitem>
188 <para>Microsoft Windows Server 2003 (any service pack)</para>
189 </listitem>
190
191 <listitem>
192 <para>Microsoft Windows Server 2008</para>
193 </listitem>
194
195 <listitem>
196 <para>Microsoft Windows Vista (all editions)</para>
197 </listitem>
198
199 <listitem>
200 <para>Microsoft Windows 7 (all editions)</para>
201 </listitem>
202 </itemizedlist>
203
204 <sect3 id="mountingadditionsiso">
205 <title>Installation</title>
206
207 <para>In the "Devices" menu in the virtual machine's menu bar,
208 VirtualBox has a handy menu item named "Install Guest Additions",
209 which either allows to upgrade already installed Guest Additions
210 (only Windows Guest Additions 4.0 and later) automatically or
211 mounts the Guest Additions ISO file inside your virtual machine
212 to perform a manual update.</para>
213
214 <para>In case of a manual update, a Windows guest should then
215 automatically start the Guest Additions installer, which allows to
216 install the Guest Additions into your Windows guest.</para>
217
218 <note>
219 <para>For Direct 3D acceleration to work in a Windows Guest, you
220 must install the Guest Additions in "Safe Mode"; see <xref
221 linkend="KnownIssues" /> for details.</para>
222 </note>
223
224 <para>If you prefer to mount the additions manually, you can perform
225 the following steps:</para>
226
227 <orderedlist>
228 <listitem>
229 <para>Start the virtual machine in which you have installed
230 Windows.</para>
231 </listitem>
232
233 <listitem>
234 <para>Select "Mount CD/DVD-ROM" from the "Devices" menu in the
235 virtual machine's menu bar and then "CD/DVD-ROM image". This
236 brings up the Virtual Media Manager described in <xref
237 linkend="vdis" />.</para>
238 </listitem>
239
240 <listitem>
241 <para>In the Virtual Media Manager, press the "Add" button and
242 browse your host file system for the
243 <computeroutput>VBoxGuestAdditions.iso</computeroutput>
244 file:<itemizedlist>
245 <listitem>
246 <para>On a Windows host, you can find this file in the
247 VirtualBox installation directory (usually under
248 <computeroutput>C:\Program
249 files\Oracle\VirtualBox</computeroutput> ).</para>
250 </listitem>
251
252 <listitem>
253 <para>On Mac OS X hosts, you can find this file in the
254 application bundle of VirtualBox. (Right click on the
255 VirtualBox icon in Finder and choose <emphasis>Show Package
256 Contents</emphasis>. There it is located in the
257 <computeroutput>Contents/MacOS</computeroutput>
258 folder.)</para>
259 </listitem>
260
261 <listitem>
262 <para>On a Linux host, you can find this file in the
263 <computeroutput>additions</computeroutput> folder under
264 where you installed VirtualBox (normally
265 <computeroutput>/opt/VirtualBox/</computeroutput>).</para>
266 </listitem>
267
268 <listitem>
269 <para>On Solaris hosts, you can find this file in the
270 <computeroutput>additions</computeroutput> folder under
271 where you installed VirtualBox (normally
272 <computeroutput>/opt/VirtualBox</computeroutput>).</para>
273 </listitem>
274 </itemizedlist></para>
275 </listitem>
276
277 <listitem>
278 <para>Back in the Virtual Media Manager, select that ISO file and
279 press the "Select" button. This will mount the ISO file and
280 present it to your Windows guest as a CD-ROM.</para>
281 </listitem>
282 </orderedlist>
283
284 <para>Unless you have the Autostart feature disabled in your Windows
285 guest, Windows will now autostart the VirtualBox Guest Additions
286 installation program from the Additions ISO. If the Autostart feature
287 has been turned off, choose
288 <computeroutput>VBoxWindowsAdditions.exe</computeroutput> from the
289 CD/DVD drive inside the guest to start the installer.</para>
290
291 <para>The installer will add several device drivers to the Windows
292 driver database and then invoke the hardware detection wizard.</para>
293
294 <para>Depending on your configuration, it might display warnings that
295 the drivers are not digitally signed. You must confirm these in order
296 to continue the installation and properly install the
297 Additions.</para>
298
299 <para>After installation, reboot your guest operating system to
300 activate the Additions.</para>
301 </sect3>
302
303 <sect3>
304 <title>Updating the Windows Guest Additions</title>
305
306 <para>Windows Guest Additions can be updated by running the
307 installation program again, as previously described. This will then
308 replace the previous Additions drivers with updated versions.</para>
309
310 <para>Alternatively, you may also open the Windows Device Manager and
311 select "Update driver..." for two devices:</para>
312
313 <orderedlist>
314 <listitem>
315 <para>the VirtualBox Graphics Adapter and</para>
316 </listitem>
317
318 <listitem>
319 <para>the VirtualBox System Device.</para>
320 </listitem>
321 </orderedlist>
322
323 <para>For each, choose to provide your own driver and use "Have Disk"
324 to point the wizard to the CD-ROM drive with the Guest
325 Additions.</para>
326 </sect3>
327
328 <sect3>
329 <title>Unattended Installation</title>
330
331 <para>In order to allow for completely unattended guest installations,
332 you can specify a command line parameter to the install
333 launcher:</para>
334
335 <screen>VBoxWindowsAdditions.exe /S</screen>
336
337 <para>This automatically installs the right files and drivers for the
338 corresponding platform (32- or 64-bit).</para>
339
340 <note>
341 <para>Because of the drivers are not yet WHQL certified, you still
342 might get some driver installation popups, depending on the Windows
343 guest version.</para>
344 </note>
345
346 <para>For more options regarding unattended guest installations,
347 consult the command line help by using the command:</para>
348
349 <screen>VBoxWindowsAdditions.exe /?</screen>
350 </sect3>
351
352 <sect3 id="windows-guest-file-extraction">
353 <title>Manual file extraction</title>
354
355 <para>If you would like to install the files and drivers manually, you
356 can extract the files from the Windows Guest Additions setup by
357 typing:</para>
358
359 <screen>VBoxWindowsAdditions.exe /extract</screen>
360
361 <para>To explicitly extract the Windows Guest Additions for another
362 platform than the current running one (e.g. 64-bit files on a 32-bit
363 system), you have to execute the appropriate platform installer
364 (<computeroutput>VBoxWindowsAdditions-x86.exe</computeroutput> or
365 <computeroutput>VBoxWindowsAdditions-amd64.exe</computeroutput>) with
366 the <computeroutput>/extract</computeroutput> parameter.</para>
367 </sect3>
368
369 <sect3 id="vista_networking">
370 <title>Windows Vista networking</title>
371
372 <para>Earlier versions of VirtualBox provided a virtual AMD PCNet
373 Ethernet card to guests by default. Since Microsoft no longer ships a
374 driver for that card with Windows (starting with Windows Vista), if
375 you select Windows Vista or newer as the guest operating system for a
376 virtual machine, VirtualBox will instead present a virtual Intel
377 network controller to the guest (see <xref
378 linkend="nichardware" />).</para>
379
380 <para>However, if for any reason you have a 32-bit Windows Vista VM
381 that is configured to use an AMD PCNet card, you will have no
382 networking in the guest initially.</para>
383
384 <para>As a convenience, VirtualBox ships with a 32-bit driver for the
385 AMD PCNet card, which comes with the Windows Guest Additions. If you
386 install these in a 32-bit Vista guest, the driver will automatically
387 be installed as well. If, for some reason, you would like to install
388 the driver manually, you can extract the required files from the
389 Windows Guest Additions setup. Please consult <xref
390 linkend="windows-guest-file-extraction" /> on how to achieve this. You
391 will then find the AMD PCNet driver files in the
392 <computeroutput>x86\Network\AMD\netamd.inf</computeroutput>
393 subdirectory of the default install directory.</para>
394
395 <para>Alternatively, change the Vista guest's VM settings to use an
396 Intel networking card instead of the default AMD PCNet card; see <xref
397 linkend="settings-network" /> for details.</para>
398
399 <para>Unfortunately, there is no 64-bit driver available for the AMD
400 PCNet card. So for 64-bit Windows VMs, you should always use the Intel
401 networking devices.</para>
402 </sect3>
403 </sect2>
404
405 <sect2>
406 <title>Guest Additions for Linux</title>
407
408 <para>Like the Windows Guest Additions, the VirtualBox Guest Additions
409 for Linux take the form of a set of device drivers and system
410 applications which may be installed in the guest operating
411 system.</para>
412
413 <para>The following Linux distributions are officially supported:</para>
414
415 <itemizedlist>
416 <listitem>
417 <para>Fedora as of Fedora Core 4;</para>
418 </listitem>
419
420 <listitem>
421 <para>Redhat Enterprise Linux as of version 3;</para>
422 </listitem>
423
424 <listitem>
425 <para>SUSE and openSUSE Linux as of version 9;</para>
426 </listitem>
427
428 <listitem>
429 <para>Ubuntu as of version 5.10.</para>
430 </listitem>
431 </itemizedlist>
432
433 <para>Many other distributions are known to work with the Guest
434 Additions.</para>
435
436 <para>The version of the Linux kernel supplied by default in SUSE and
437 openSUSE 10.2, Ubuntu 6.10 (all versions) and Ubuntu 6.06 (server
438 edition) contains a bug which can cause it to crash during startup when
439 it is run in a virtual machine. The Guest Additions work in those
440 distributions.</para>
441
442 <para>Note that some Linux distributions already come with VirtualBox
443 Guest Additions or a part thereof. You may keep the distribution's
444 version of the Guest Additions but often, these are not up to date
445 and limited in functionality. Therefore, you can choose the install
446 the Guest Additions that come with VirtualBox, overriding the already
447 installed version. The VirtualBox Linux Guest Additions installer tries
448 to detect existing installation and replace them but depending on how
449 the distribution integrates the Guest Additions, they may require some
450 manual interaction. It is highly recommended to take a snapshot of the
451 virtual machine before overriding the installation.</para>
452
453 <sect3>
454 <title>Installing the Linux Guest Additions</title>
455
456 <para>The VirtualBox Guest Additions for Linux are provided on the
457 same ISO CD-ROM as the Additions for Windows described above. They
458 also come with an installation program guiding you through the setup
459 process, although, due to the significant differences between Linux
460 distributions, installation may be slightly more complex.</para>
461
462 <para>Installation generally involves the following steps:</para>
463
464 <orderedlist>
465 <listitem>
466 <para>Before installing the Guest Additions, you will have to
467 prepare your guest system for building external kernel modules.
468 This works similarly as described in <xref
469 linkend="externalkernelmodules" />, except that this step must now
470 be performed in your Linux <emphasis>guest</emphasis> instead of
471 on a Linux host system, as described there.</para>
472
473 <para>Again, as with Linux hosts, we recommend using DKMS for
474 Linux guests as well. If it is not installed, use this
475 command for Ubuntu/Debian systems:<screen>sudo apt-get install dkms</screen>
476 or for Fedora systems: <screen>yum install dkms</screen></para>
477
478 <para>Make sure to nstall DKMS <emphasis>before</emphasis> installing the
479 Linux Guest Additions.</para>
480 </listitem>
481
482 <listitem>
483 <para>Mount the
484 <computeroutput>VBoxGuestAdditions.iso</computeroutput> file as
485 your Linux guest's virtual CD-ROM drive, exactly the same way as
486 described for a Windows guest in <xref
487 linkend="mountingadditionsiso" />.</para>
488 </listitem>
489
490 <listitem>
491 <para>Change to the directory where your CD-ROM drive is mounted
492 and execute as root:</para>
493
494 <screen>sh ./VBoxLinuxAdditions-x86.run</screen>
495
496 <para>In a 64-bit Linux guest, use
497 <computeroutput>VBoxLinuxAdditions-amd64.run</computeroutput>
498 instead.</para>
499 </listitem>
500 </orderedlist>
501
502 <para>For your convenience, the following step-by-step instructions
503 have been verified to work for freshly installed copies of the most
504 popular Linux distributions. After these preparational steps, you
505 can execute the VirtualBox Guest Additions installer as described
506 above.</para>
507
508 <sect4><title>Ubuntu 10.04 ("Lucid Lynx")</title><para>
509 <orderedlist>
510 <listitem>
511 <para>In order to update your system to the latest version
512 of the packets, open a terminal and as root, execute
513 <screen>apt-get update</screen>
514 followed by
515 <screen>apt-get upgrade</screen></para>
516 </listitem>
517 <listitem>
518 <para>Install DKMS using
519 <screen>apt-get install dkms</screen></para>
520 </listitem>
521 <listitem>
522 <para>Reboot your guest system in order to activate the
523 updates and then proceed as described above.</para>
524 </listitem>
525 </orderedlist></para></sect4>
526
527 <sect4><title>Fedora 13 ("Goddard")</title><para>
528 <orderedlist>
529 <listitem>
530 <para>In order to update your system to the latest version
531 of the packets, open a terminal and as root, execute
532 <screen>yum update</screen></para>
533 </listitem>
534 <listitem>
535 <para>Install DKMS and the GNU C compiler using
536 <screen>yum install dkms</screen>
537 followed by
538 <screen>yum install gcc</screen></para>
539 </listitem>
540 <listitem>
541 <para>Reboot your guest system in order to activate the
542 updates and then proceed as described above.</para>
543 </listitem>
544 </orderedlist></para></sect4>
545
546 <sect4><title>openSUSE 11.2</title><para>
547 <orderedlist>
548 <listitem>
549 <para>In order to update your system to the latest version
550 of the packets, open a terminal and as root, execute
551 <screen>zypper update</screen></para>
552 </listitem>
553 <listitem>
554 <para>Install the make tool and the GNU C compiler using
555 <screen>zypper install make gcc</screen></para>
556 </listitem>
557 <listitem>
558 <para>Reboot your guest system in order to activate the
559 updates.</para>
560 </listitem>
561 <listitem>
562 <para>Find out which kernel you are running using
563 <screen>uname -a</screen>
564 An example would be <computeroutput>2.6.31.12-0.2-default</computeroutput>
565 which refers to the "default" kernel. Then install the correct kernel
566 development package. In the above example this would be
567 <screen>zypper install kernel-default-devel</screen></para>
568 </listitem>
569 <listitem>
570 <para>Make sure that your running kernel
571 (<computeroutput>uname -a</computeroutput>) and the kernel packages
572 you have installed (<computeroutput>rpm -qa kernel\*</computeroutput>)
573 have the exact same version number. Proceed with the installation as described
574 above.</para>
575 </listitem>
576 </orderedlist></para></sect4>
577
578 <sect4><title>SuSE Linux Enterprise Desktop (SLED) 11</title><para>
579 <orderedlist>
580 <listitem>
581 <para>In order to update your system to the latest version
582 of the packets, open a terminal and as root, execute
583 <screen>zypper update</screen></para>
584 </listitem>
585 <listitem>
586 <para>Install the GNU C compiler using
587 <screen>zypper install gcc</screen></para>
588 </listitem>
589 <listitem>
590 <para>Reboot your guest system in order to activate the
591 updates.</para>
592 </listitem>
593 <listitem>
594 <para>Find out which kernel you are running using
595 <screen>uname -a</screen>
596 An example would be <computeroutput>2.6.27.19-5.1-default</computeroutput>
597 which refers to the "default" kernel. Then install the correct kernel
598 development package. In the above example this would be
599 <screen>zypper install kernel-syms kernel-source</screen></para>
600 </listitem>
601 <listitem>
602 <para>Make sure that your running kernel
603 (<computeroutput>uname -a</computeroutput>) and the kernel packages
604 you have installed (<computeroutput>rpm -qa kernel\*</computeroutput>)
605 have the exact same version number. Proceed with the installation as described
606 above.</para>
607 </listitem>
608 </orderedlist></para></sect4>
609
610 <sect4><title>Mandrake 2010</title><para>
611 <orderedlist>
612 <listitem>
613 <para>Mandrake ships with the VirtualBox Guest Additions which
614 will be replaced if you follow these steps.</para>
615 </listitem>
616 <listitem>
617 <para>In order to update your system to the latest version
618 of the packets, open a terminal and as root and execute
619 <screen>urpmi --auto-update</screen></para>
620 </listitem>
621 <listitem><para>Reboot your system in order to activate the updates.</para>
622 </listitem>
623 <listitem><para>Install DKMS using
624 <screen>urpmi dkms</screen>
625 and make sure the choose the correct kernel-devel package when asked
626 by the installer (use <computeroutput>uname -a</computeroutput> to compare).</para>
627 </listitem>
628 </orderedlist></para></sect4>
629
630 <sect4><title>CentOS 5.5, Red Hat Enterprise Linux 5.5 and Oracle Enterprise
631 Linux 5.5</title><para>
632 <orderedlist>
633 <listitem>
634 <para>Add <computeroutput>divider=10</computeroutput> to the kernel boot options
635 in <computeroutput>/etc/grub.conf</computeroutput> to reduce the idle CPU load.</para>
636 </listitem>
637 <listitem>
638 <para>To update your system to the latest version
639 of the packets, open a terminal and as root, execute
640 <screen>yum update</screen></para>
641 </listitem>
642 <listitem>
643 <para>Install the GNU C compiler and the kernel development packages using
644 <screen>yum install gcc</screen>
645 followed by
646 <screen>yum install kernel-devel</screen></para>
647 </listitem>
648 <listitem>
649 <para>Reboot your guest system in order to activate the
650 updates and then proceed as described above.</para>
651 </listitem>
652 <listitem>
653 <para>Note that OpenGL support is not available unless you update to a later Linux kernel.</para>
654 <para>In case Oracle Enterprise Linux does not find the required packages, you either have to
655 install them from a different source (e.g. DVD) or use Oracle's public Yum server located at
656 <ulink url="http://public-yum.oracle.com/">http://public-yum.oracle.com</ulink>.</para>
657 </listitem>
658 </orderedlist></para></sect4>
659
660 <sect4><title>Debian 5 ("Lenny")</title><para>
661 <orderedlist>
662 <listitem>
663 <para>In order to update your system to the latest version
664 of the packets, open a terminal and as root, execute
665 <screen>apt-get update</screen>
666 followed by
667 <screen>apt-get upgrade</screen></para>
668 </listitem>
669 <listitem>
670 <para>Install the make tool and the GNU C compiler using
671 <screen>apt-get install make gcc</screen></para>
672 </listitem>
673 <listitem>
674 <para>Reboot your guest system in order to activate the
675 updates.</para>
676 </listitem>
677 <listitem>
678 <para>Determine the exact version of your kernel using
679 <computeroutput>uname -a</computeroutput> and install the correct version
680 of the linux-headers package, e.g. using
681 <screen>apt-get install linux-headers-2.6.26-2-686</screen></para>
682
683 <listitem>
684 <para>Note that OpenGL support is not available unless you update to a later Linux kernel.</para>
685 </listitem>
686 </listitem>
687 </orderedlist></para></sect4>
688 </sect3>
689
690 <sect3><title>Manual setup of selected guest services</title>
691 <para>The VirtualBox Guest Additions contain several different
692 drivers. If for any reason you do not wish to set them all up, you can
693 install the Guest Additions using the following command:</para>
694
695 <screen> sh ./VBoxLinuxAdditions-x86.run no_setup</screen>
696
697 <para>(substituting <computeroutput>VBoxLinuxAdditions-amd64
698 </computeroutput> on a 64-bit guest).</para>
699
700 <para>After this, you will need to at least compile the kernel modules
701 by running the command <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen>
702 as root (you will need to replace <emphasis>lib</emphasis> by
703 <emphasis>lib64</emphasis>
704 on some 64bit guests), and on older guests without the udev service
705 you will need to add the <emphasis>vboxadd</emphasis> service to the
706 default runlevel to ensure that the modules get loaded.</para>
707
708 <para>To setup the time synchronization service, run the command
709 <screen> /usr/lib/VBoxGuestAdditions/vboxadd-service setup</screen>
710 and add the service vboxadd-service to the default runlevel. To set up
711 the X11 and OpenGL part of the Guest Additions, run the command
712 <screen> /usr/lib/VBoxGuestAdditions/vboxadd-x11 setup</screen> (you
713 do not need to enable any services for this).</para>
714
715 <para>To recompile the guest kernel modules, use this command:
716 <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen> After
717 compilation you should reboot your guest to ensure that the new
718 modules are actually used.</para>
719 </sect3>
720
721 <sect3>
722 <title>Video acceleration and high resolution graphics modes</title>
723
724 <para>In Linux guests, VirtualBox video acceleration is available
725 through the X Window System. Typically, in today's Linux
726 distributions, this will be the X.Org server. During the installation
727 process, X will be set up to use the VirtualBox video driver shipped
728 with the Guest Additions.</para>
729
730 <para>For Linux and Solaris guests, the X.org server version 1.3 or
731 later is required for automatic resizing (the feature has been
732 disabled on Fedora 9 guests due to a bug in the X server they supply).
733 The server version can be checked with <computeroutput>Xorg
734 -version</computeroutput>.</para>
735
736 <para>You can also send video mode hints using the
737 <computeroutput>VBoxManage</computeroutput> tool.</para>
738
739 <para>If you are only using recent Linux guests systems, you can skip
740 the rest of this section. On older guest systems, whatever graphics
741 modes were set up before the installation will be used. If these modes
742 do not suit your requirements, you can change your setup by editing
743 the configuration file of the X server, usually found in
744 <computeroutput>/etc/X11/xorg.conf</computeroutput>.</para>
745
746 <para>VirtualBox can use any default X graphics mode which fits into
747 the virtual video memory allocated to the virtual machine, as
748 described in <xref linkend="generalsettings" />. You can also add your
749 own modes to the X server configuration file. You simply need to add
750 them to the "Modes" list in the "Display" subsection of the "Screen"
751 section. For example, the section shown here has a custom 2048x800
752 resolution mode added:</para>
753
754 <screen>Section "Screen"
755 Identifier "Default Screen"
756 Device "VirtualBox graphics card"
757 Monitor "Generic Monitor"
758 DefaultDepth 24
759 SubSection "Display"
760 Depth 24
761 Modes "2048x800" "800x600" "640x480"
762 EndSubSection
763EndSection</screen>
764 </sect3>
765
766 <sect3>
767 <title>Updating the Linux Guest Additions</title>
768
769 <para>The Guest Additions can simply be updated by going through the
770 installation procedure again with an updated CD-ROM image. This will
771 replace the drivers with updated versions. You should reboot after
772 updating the Guest Additions.</para>
773 </sect3>
774
775 <sect3>
776 <title>Uninstalling the Linux Guest Additions</title>
777
778 <para>If you have a version of the Guest Additions installed on your
779 virtual machine and wish to remove it without installing new ones,
780 you can do so by inserting the Guest Additions CD image into the
781 virtual CD-ROM drive as described above and running the installer for
782 the current Guest Additions with the "uninstall" parameter from the
783 path that the CD image is mounted on in the guest:
784 <screen>sh ./VBoxLinuxAdditions-x86.run uninstall</screen>
785 <para>(substituting <computeroutput>VBoxLinuxAdditions-amd64</computeroutput>
786 on a 64-bit guest). While this will normally work
787 without issues, you may need to do some manual clean up of the guest
788 (particularly of the XFree86Config or xorg.conf file) in some cases,
789 particularly if the Additions version installed or the guest
790 operating system were very old, or if you made your own changes to
791 the Guest Additions setup after you installed them.</para>
792 </para>
793 <para>
794 Starting with version 3.1.0, you can uninstall the Additions
795 by invoking
796 <screen>/opt/VBoxGuestAdditions-$VBOX_VERSION_STRING/uninstall.sh</screen>
797 substituting <computeroutput>/opt/VBoxGuestAdditions-$VBOX_VERSION_STRING</computeroutput>
798 with the Guest Additions installation directory.
799 </para>
800 </sect3>
801 </sect2>
802
803 <sect2>
804 <title>Guest Additions for Solaris</title>
805
806 <para>Like the Windows Guest Additions, the VirtualBox Guest Additions
807 for Solaris take the form of a set of device drivers and system
808 applications which may be installed in the guest operating
809 system.</para>
810
811 <para>The following Solaris distributions are officially
812 supported:</para>
813
814 <itemizedlist>
815 <listitem>
816 <para>OpenSolaris Nevada (Build 82 and higher; this includes
817 OpenSolaris 2008.05, 2008.11 and 2009.06);</para>
818 </listitem>
819
820 <listitem>
821 <para>OpenSolaris Indiana (Developer Preview 2 and higher);</para>
822 </listitem>
823
824 <listitem>
825 <para>Solaris 10 (u5 and higher).</para>
826 </listitem>
827 </itemizedlist>
828
829 <para>Other distributions may work if they are based on comparable
830 software releases.</para>
831
832 <sect3>
833 <title>Installing the Solaris Guest Additions</title>
834
835 <para>The VirtualBox Guest Additions for Solaris are provided on the
836 same ISO CD-ROM as the Additions for Windows and Linux described
837 above. They also come with an installation program guiding you through
838 the setup process.</para>
839
840 <para>Installation involves the following steps:</para>
841
842 <orderedlist>
843 <listitem>
844 <para>Mount the
845 <computeroutput>VBoxGuestAdditions.iso</computeroutput> file as
846 your Solaris guest's virtual CD-ROM drive, exactly the same way as
847 described for a Windows guest in <xref
848 linkend="mountingadditionsiso" />.</para>
849
850 <para>If in case the CD-ROM drive on the guest doesn't get mounted
851 (observed on some versions of Solaris 10), execute as root:</para>
852
853 <screen>svcadm restart volfs</screen>
854 </listitem>
855
856 <listitem>
857 <para>Change to the directory where your CD-ROM drive is mounted
858 and execute as root:</para>
859
860 <screen>pkgadd -G -d ./VBoxSolarisAdditions.pkg</screen>
861 </listitem>
862
863 <listitem>
864 <para>Choose "1" and confirm installation of the Guest Additions
865 package. After the installation is complete, re-login to X server
866 on your guest to activate the X11 Guest Additions.</para>
867 </listitem>
868 </orderedlist>
869 </sect3>
870
871 <sect3>
872 <title>Uninstalling the Solaris Guest Additions</title>
873
874 <para>The Solaris Guest Additions can be safely removed by removing
875 the package from the guest. Open a root terminal session and
876 execute:</para>
877
878 <para><screen>pkgrm SUNWvboxguest</screen></para>
879 </sect3>
880
881 <sect3>
882 <title>Updating the Solaris Guest Additions</title>
883
884 <para>The Guest Additions should be updated by first uninstalling the
885 existing Guest Additions and then installing the new ones. Attempting
886 to install new Guest Additions without removing the existing ones is
887 not possible.</para>
888 </sect3>
889 </sect2>
890
891 <sect2>
892 <title>Guest Additions for OS/2</title>
893
894 <para>VirtualBox also ships with a set of drivers that improve running
895 OS/2 in a virtual machine. Due to restrictions of OS/2 itself, this
896 variant of the Guest Additions has a limited feature set; see <xref
897 linkend="KnownIssues" /> for details.</para>
898
899 <para>The OS/2 Guest Additions are provided on the same ISO CD-ROM as
900 those for the other platforms. As a result, mount the ISO in OS/2 as
901 described previously. The OS/2 Guest Additions are located in the
902 directory <computeroutput>\32bit\OS2</computeroutput>.</para>
903
904 <para>As we do not provide an automatic installer at this time, please
905 refer to the <computeroutput>readme.txt</computeroutput> file in that
906 directory, which describes how to install the OS/2 Guest Additions
907 manually.</para>
908 </sect2>
909 </sect1>
910
911 <sect1 id="sharedfolders">
912 <title>Shared folders</title>
913
914 <para>With the "shared folders" feature of VirtualBox, you can access
915 files of your host system from within the guest system. This is similar
916 how you would use network shares in Windows networks -- except that shared
917 folders do not need require networking, so long as the Guest Additions are
918 installed. Shared Folders are supported with Windows (2000 or newer),
919 Linux and Solaris guests.</para>
920
921 <para>Shared folders must physically reside on the
922 <emphasis>host</emphasis> and are then shared with the guest; sharing is
923 accomplished using a special service on the host and a file system driver
924 for the guest, both of which are provided by VirtualBox. For Windows
925 guests, shared folders are implemented as a pseudo-network redirector; for
926 Linux and Solaris guests, the Guest Additions provide a virtual filesystem
927 driver which handles communication with the host.</para>
928
929 <para>To share a host folder with a virtual machine in VirtualBox, you
930 must specify the path of that folder and choose for it a "share name" that
931 the guest can use to access it. Hence, first create the shared folder on
932 the host; then, within the guest, connect to it.</para>
933
934 <para>There are several ways in which shared folders can be set up for a
935 particular virtual machine:<itemizedlist>
936 <listitem>
937 <para>In the graphical user interface of a running virtual machine,
938 you can select "Shared folders" from the "Devices" menu, or click on
939 the folder icon on the status bar in the bottom right corner of the
940 virtual machine window.</para>
941 </listitem>
942
943 <listitem>
944 <para>If a virtual machine is not currently running, you can
945 configure shared folders in each virtual machine's "Settings"
946 dialog.</para>
947 </listitem>
948
949 <listitem>
950 <para>From the command line, you can create shared folders using the
951 VBoxManage command line interface; see <xref
952 linkend="vboxmanage" />. The command is as follows: <screen>VBoxManage sharedfolder add "VM name" --name "sharename" --hostpath "C:\test"</screen></para>
953 </listitem>
954 </itemizedlist></para>
955
956 <para>There are two types of shares:</para>
957
958 <orderedlist>
959 <listitem>
960 <para>VM shares which are only available to the VM for which they have
961 been defined;</para>
962 </listitem>
963
964 <listitem>
965 <para>transient VM shares, which can be added and removed at runtime
966 and do not persist after a VM has stopped; for these, add the
967 <computeroutput>--transient</computeroutput> option to the above
968 command line.</para>
969 </listitem>
970 </orderedlist>
971
972 <para>Shared folders have read/write access to the files at the host path
973 by default. To restrict the guest to have read-only access, create a
974 read-only shared folder. This can either be achieved using the GUI or by
975 appending the parameter <computeroutput>--readonly</computeroutput> when
976 creating the shared folder with VBoxManage.</para>
977
978 <sect2 id="sf_mount_manual">
979 <title>Manual mounting</title>
980
981 <para>You can mount the shared folder from inside a VM the same way
982 as you would mount an ordinary network share:</para>
983
984 <para><itemizedlist>
985 <listitem>
986 <para>In a Windows guest, starting with VirtualBox 1.5.0, shared
987 folders are browseable and are therefore visible in Windows
988 Explorer. So, to attach the host's shared folder to your Windows
989 guest, open Windows Explorer and look for it under "My Networking
990 Places" -&gt; "Entire Network" -&gt; "VirtualBox Shared Folders". By
991 right-clicking on a shared folder and selecting "Map network drive"
992 from the menu that pops up, you can assign a drive letter to that
993 shared folder.</para>
994
995 <para>Alternatively, on the Windows command line, use the
996 following:</para>
997
998 <screen>net use x: \\vboxsvr\sharename</screen>
999
1000 <para>While <computeroutput>vboxsvr</computeroutput> is a fixed name
1001 (note that <computeroutput>vboxsrv</computeroutput> would also
1002 work), replace "x:" with the drive letter that you want to use for
1003 the share, and <computeroutput>sharename</computeroutput> with the
1004 share name specified with
1005 <computeroutput>VBoxManage</computeroutput>.</para>
1006 </listitem>
1007
1008 <listitem>
1009 <para>In a Linux guest, use the following command:</para>
1010
1011 <screen>mount -t vboxsf [-o OPTIONS] sharename mountpoint</screen>
1012
1013 <para>To mount a shared folder during boot, add the following entry
1014 to /etc/fstab:</para>
1015
1016 <screen>sharename mountpoint vboxsf defaults 0 0</screen>
1017 </listitem>
1018
1019 <listitem>
1020 <para>In a Solaris guest, use the following command:</para>
1021
1022 <screen>mount -F vboxfs [-o OPTIONS] sharename mountpoint</screen>
1023
1024 <para>Replace <computeroutput>sharename</computeroutput> (use
1025 lowercase) with the share name specified with
1026 <computeroutput>VBoxManage</computeroutput> or the GUI, and
1027 <computeroutput>mountpoint</computeroutput> with the path where you
1028 want the share to be mounted on the guest (e.g.
1029 <computeroutput>/mnt/share</computeroutput>). The usual mount rules
1030 apply, that is, create this directory first if it does not exist
1031 yet.</para>
1032
1033 <para>Here is an example of mounting the shared folder for the user
1034 "jack" on OpenSolaris:</para>
1035
1036 <screen>$ id
1037uid=5000(jack) gid=1(other)
1038$ mkdir /export/home/jack/mount
1039$ pfexec mount -F vboxfs -o uid=5000,gid=1 jackshare /export/home/jack/mount
1040$ cd ~/mount
1041$ ls
1042sharedfile1.mp3 sharedfile2.txt
1043$</screen>
1044 <para>Beyond the standard options supplied by the
1045 <computeroutput>mount</computeroutput> command, the following are
1046 available:</para>
1047
1048 <screen>iocharset CHARSET</screen>
1049
1050 <para>to set the character set used for I/O operations (utf8 by
1051 default) and</para>
1052
1053 <screen>convertcp CHARSET</screen>
1054
1055 <para>to specify the character set used for the shared folder name
1056 (utf8 by default).</para>
1057
1058 <para>The generic mount options (documented in the mount manual
1059 page) apply also. Especially useful are the options
1060 <computeroutput>uid</computeroutput>,
1061 <computeroutput>gid</computeroutput> and
1062 <computeroutput>mode</computeroutput>, as they allow access by
1063 normal users (in read/write mode, depending on the settings) even if
1064 root has mounted the filesystem.</para>
1065 </listitem>
1066 </itemizedlist></para>
1067 </sect2>
1068
1069 <sect2 id="sf_mount_auto">
1070 <title>Automatic mounting</title>
1071
1072 <para>Starting with version 3.3.0, VirtualBox supports automatic mounting
1073 support for shared folders. The installed Guest Additions will then take
1074 care of all shared folders which are marked as being auto-mounted as soon
1075 as a user is logged in to the guest OS. This makes it more convenient
1076 instead of mounting shared folders manually described in <xref
1077 linkend="sf_mount_manual" />.</para>
1078 <note>
1079 <para>Auto-mounting currently is only supported on Windows, Linux and
1080 Solaris guests.</para>
1081 </note>
1082
1083 <para>On Windows guests an auto-mounted shared folder will be represented by an own
1084 drive letter (e.g. <computeroutput>E:</computeroutput>), depending on the
1085 remaining free drive letters of the system.</para>
1086
1087 <para>On Linux and Solaris guests auto-mounted shared folders get mounted into
1088 the <computeroutput>/media</computeroutput> directory, along with the prefix
1089 <computeroutput>sf_</computeroutput>, so the shared folder <computeroutput>myfiles</computeroutput>
1090 would be mounted to <computeroutput>/media/sf_myfiles</computeroutput> on Linux
1091 and <computeroutput>/mnt/sf_myfiles</computeroutput> on Solaris.</para>
1092
1093 <para>To change the prefix <computeroutput>sf_</computeroutput> of a given
1094 virtual machine, set the value of its <computeroutput>/VirtualBox/GuestAdd/SharedFolders/MountPrefix</computeroutput>
1095 guest property to another value; see <xref linkend="guestadd-guestprops" /> for details.</para>
1096
1097 <para>To get a user full access to the auto-mounted shared folders on the guest
1098 this user needs to be part of the newly create group "vboxsf", which is created by the
1099 VirtualBox Guest Additions installer. Without being in that group read-only access
1100 is provided.</para>
1101
1102 <para>To get changes applied, for example by adding new or deleting auto-mounted
1103 shared folders while a VM is running, the guest OS needs to be rebooted. However,
1104 this does not affect <xref linkend="sf_mount_manual" />.</para>
1105 </sect2>
1106 </sect1>
1107
1108 <sect1 id="seamlesswindows">
1109 <title>Seamless windows</title>
1110
1111 <para>With the "seamless windows" feature of VirtualBox, you can have the
1112 windows that are displayed within a virtual machine appear side by side
1113 next to the windows of your host. This feature is supported for the
1114 following guest operating systems (provided that the Guest Additions are
1115 installed):<itemizedlist>
1116 <listitem>
1117 <para>Windows guests (support added with VirtualBox 1.5);</para>
1118 </listitem>
1119
1120 <listitem>
1121 <para>Linux or Solaris/OpenSolaris guests with an X.org server
1122 version 1.3 or higher<footnote>
1123 <para>The X server version is not the same as the version of the
1124 entire X.org suite. You can type <computeroutput>X
1125 -version</computeroutput> in a terminal to find out about the
1126 X.org server version level that is currently installed.</para>
1127 </footnote> (support added with VirtualBox 1.6). The exception is
1128 Fedora 9, due to a bug in its X server.</para>
1129 </listitem>
1130 </itemizedlist></para>
1131
1132 <para>After seamless windows are enabled (see below), VirtualBox
1133 suppresses the display of the Desktop background of your guest, allowing
1134 you to run the windows of your guest operating system seamlessly next to
1135 the windows of your host:</para>
1136
1137 <para><mediaobject>
1138 <imageobject>
1139 <imagedata align="center" fileref="images/seamless.png" width="10cm" />
1140 </imageobject>
1141 </mediaobject>To enable seamless mode, after starting the virtual
1142 machine, press the Host key (normally the right control key) together with
1143 "L". This will enlarge the size of the VM's display to the size of your
1144 host screen and mask out the guest operating system's background. To go
1145 back to the "normal" VM display (i.e. to disable seamless windows), press
1146 the Host key and "L" again.</para>
1147 </sect1>
1148
1149 <sect1>
1150 <title>Hardware-accelerated graphics</title>
1151
1152 <sect2 id="guestadd-3d">
1153 <title>Hardware 3D acceleration (OpenGL and Direct3D 8/9)</title>
1154
1155 <para>The VirtualBox Guest Additions contain experimental hardware 3D
1156 support for Windows, Linux and Solaris guests.<footnote>
1157 <para>OpenGL support for Windows guests was added with VirtualBox
1158 2.1; support for Linux and Solaris followed with VirtualBox 2.2.
1159 With VirtualBox 3.0, Direct3D 8/9 support was added for Windows
1160 guests. OpenGL 2.0 is now supported as well.</para>
1161 </footnote></para>
1162
1163 <para>With this feature, if an application inside your virtual machine
1164 uses 3D features through the OpenGL or Direct3D 8/9 programming
1165 interfaces, instead of emulating them in software (which would be slow),
1166 VirtualBox will attempt to use your host's 3D hardware. This works for
1167 all supported host platforms (Windows, Mac, Linux, Solaris), provided
1168 that your host operating system can make use of your accelerated 3D
1169 hardware in the first place.</para>
1170
1171 <para>The 3D acceleration currently has the following
1172 preconditions:<orderedlist>
1173 <listitem>
1174 <para>It is only available for certain Windows, Linux and Solaris
1175 guests. In particular:<itemizedlist>
1176 <listitem>
1177 <para>For Windows guests, support is restricted to 32-bit
1178 versions of XP and Vista. Both OpenGL and Direct3D 8/9 are
1179 supported (experimental).</para>
1180 </listitem>
1181
1182 <listitem>
1183 <para>OpenGL on Linux requires kernel 2.6.27 and higher as
1184 well as X.org server version 1.5 and higher. Ubuntu 8.10 and
1185 Fedora 10 have been tested and confirmed as working.</para>
1186 </listitem>
1187
1188 <listitem>
1189 <para>OpenGL on Solaris guests requires X.org server version
1190 1.5 and higher.</para>
1191 </listitem>
1192 </itemizedlist></para>
1193 </listitem>
1194
1195 <listitem>
1196 <para>The Guest Additions must be installed.<note>
1197 <para>For Direct 3D acceleration to work in a Windows Guest,
1198 VirtualBox needs to replace Windows system files in the
1199 virtual machine. As a result, the Guest Additions installation
1200 program offers Direct 3D acceleration as an option that must
1201 be explicitly enabled.</para>
1202
1203 <para>Also, you must install the Guest Additions in "Safe
1204 Mode"; see <xref linkend="KnownIssues" /> for details.</para>
1205 </note></para>
1206 </listitem>
1207
1208 <listitem>
1209 <para>Because 3D support is still experimental at this time, it is
1210 disabled by default and must be <emphasis role="bold">manually
1211 enabled</emphasis> in the VM settings (see <xref
1212 linkend="generalsettings" />).<note>
1213 <para>Enabling 3D acceleration may expose security holes to
1214 malicious software running the guest. The third-party code
1215 that VirtualBox uses for this purpose (Chromium) is not
1216 hardened enough to prevent every risky 3D operation on the
1217 host.</para>
1218 </note></para>
1219 </listitem>
1220 </orderedlist></para>
1221
1222 <para>Technically, VirtualBox implements this by installing an
1223 additional hardware 3D driver inside your guest when the Guest Additions
1224 are installed. This driver acts as a hardware 3D driver and reports to
1225 the guest operating system that the (virtual) hardware is capable of 3D
1226 hardware acceleration. When an application in the guest then requests
1227 hardware acceleration through the OpenGL or Direct3D programming
1228 interfaces, these are sent to the host through a special communication
1229 tunnel implemented by VirtualBox, and then the host performs the
1230 requested 3D operation via the host's programming interfaces.</para>
1231 </sect2>
1232
1233 <sect2 id="guestadd-2d">
1234 <title>Hardware 2D video acceleration for Windows guests</title>
1235
1236 <para>Starting with version 3.1, the VirtualBox Guest Additions contain
1237 experimental hardware 2D video acceleration support for Windows
1238 guests.</para>
1239
1240 <para>With this feature, if an application (e.g. a video player) inside
1241 your Windows VM uses 2D video overlays to play a movie clip, then
1242 VirtualBox will attempt to use your host's video acceleration hardware
1243 instead of performing overlay stretching and color conversion in
1244 software (which would be slow). This currently works for Windows, Linux
1245 and Mac host platforms, provided that your host operating system can
1246 make use of 2D video acceleration in the first place.</para>
1247
1248 <para>The 2D video acceleration currently has the following
1249 preconditions:<orderedlist>
1250 <listitem>
1251 <para>It is only available for Windows guests (XP or
1252 later).</para>
1253 </listitem>
1254
1255 <listitem>
1256 <para>The Guest Additions must be installed.</para>
1257 </listitem>
1258
1259 <listitem>
1260 <para>Because 2D support is still experimental at this time, it is
1261 disabled by default and must be <emphasis role="bold">manually
1262 enabled</emphasis> in the VM settings (see <xref
1263 linkend="generalsettings" />).</para>
1264 </listitem>
1265 </orderedlist></para>
1266
1267 <para>Technically, VirtualBox implements this by exposing video overlay
1268 DirectDraw capabilities in the Guest Additions video driver. The driver
1269 sends all overlay commands to the host through a special communication
1270 tunnel implemented by VirtualBox. On the host side, OpenGL is then used
1271 to implement color space transformation and scaling</para>
1272 </sect2>
1273 </sect1>
1274
1275 <sect1 id="guestadd-guestprops">
1276 <title>Guest properties</title>
1277
1278 <para>Starting with version 2.1, VirtualBox allows for requesting certain
1279 properties from a running guest, provided that the VirtualBox Guest
1280 Additions are installed and the VM is running. This is good for two
1281 things:<orderedlist>
1282 <listitem>
1283 <para>A number of predefined VM characteristics are automatically
1284 maintained by VirtualBox and can be retrieved on the host, e.g. to
1285 monitor VM performance and statistics.</para>
1286 </listitem>
1287
1288 <listitem>
1289 <para>In addition, arbitrary string data can be exchanged between
1290 guest and host. This works in both directions.</para>
1291 </listitem>
1292 </orderedlist></para>
1293
1294 <para>To accomplish this, VirtualBox establishes a private communication
1295 channel between the VirtualBox Guest Additions and the host, and software
1296 on both sides can use this channel to exchange string data for arbitrary
1297 purposes. Guest properties are simply string keys to which a value is
1298 attached. They can be set (written to) by either the host and the guest,
1299 and they can also be read from both sides.</para>
1300
1301 <para>In addition to establishing the general mechanism of reading and
1302 writing values, a set of predefined guest properties is automatically
1303 maintained by the VirtualBox Guest Additions to allow for retrieving
1304 interesting guest data such as the guest's exact operating system and
1305 service pack level, the installed version of the Guest Additions, users
1306 that are currently logged into the guest OS, network statistics and more.
1307 These predefined properties are all prefixed with
1308 <computeroutput>/VirtualBox/</computeroutput> and organized into a
1309 hierarchical tree of keys.</para>
1310
1311 <para>Some of this runtime information is shown when you select "Session
1312 Information Dialog" from a virtual machine's "Machine" menu.</para>
1313
1314 <para>A more flexible way to use this channel is via the
1315 <computeroutput>VBoxManage guestproperty</computeroutput> command set; see
1316 <xref linkend="vboxmanage-guestproperty" /> for details. For example, to
1317 have <emphasis>all</emphasis> the available guest properties for a given
1318 running VM listed with their respective values, use this:<screen>$ VBoxManage guestproperty enumerate "Windows Vista III"
1319VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
1320(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
1321All rights reserved.
1322
1323Name: /VirtualBox/GuestInfo/OS/Product, value: Windows Vista Business Edition,
1324 timestamp: 1229098278843087000, flags:
1325Name: /VirtualBox/GuestInfo/OS/Release, value: 6.0.6001,
1326 timestamp: 1229098278950553000, flags:
1327Name: /VirtualBox/GuestInfo/OS/ServicePack, value: 1,
1328 timestamp: 1229098279122627000, flags:
1329Name: /VirtualBox/GuestAdd/InstallDir,
1330 value: C:/Program Files/Oracle/VirtualBox
1331 Guest Additions, timestamp: 1229098279269739000, flags:
1332Name: /VirtualBox/GuestAdd/Revision, value: 40720,
1333 timestamp: 1229098279345664000, flags:
1334Name: /VirtualBox/GuestAdd/Version, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD,
1335 timestamp: 1229098279479515000, flags:
1336Name: /VirtualBox/GuestAdd/Components/VBoxControl.exe, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1337 timestamp: 1229098279651731000, flags:
1338Name: /VirtualBox/GuestAdd/Components/VBoxHook.dll, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1339 timestamp: 1229098279804835000, flags:
1340Name: /VirtualBox/GuestAdd/Components/VBoxDisp.dll, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1341 timestamp: 1229098279880611000, flags:
1342Name: /VirtualBox/GuestAdd/Components/VBoxMRXNP.dll, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1343 timestamp: 1229098279882618000, flags:
1344Name: /VirtualBox/GuestAdd/Components/VBoxService.exe, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1345 timestamp: 1229098279883195000, flags:
1346Name: /VirtualBox/GuestAdd/Components/VBoxTray.exe, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1347 timestamp: 1229098279885027000, flags:
1348Name: /VirtualBox/GuestAdd/Components/VBoxGuest.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1349 timestamp: 1229098279886838000, flags:
1350Name: /VirtualBox/GuestAdd/Components/VBoxMouse.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1351 timestamp: 1229098279890600000, flags:
1352Name: /VirtualBox/GuestAdd/Components/VBoxSF.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1353 timestamp: 1229098279893056000, flags:
1354Name: /VirtualBox/GuestAdd/Components/VBoxVideo.sys, value: $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILDr40720,
1355 timestamp: 1229098279895767000, flags:
1356Name: /VirtualBox/GuestInfo/OS/LoggedInUsers, value: 1,
1357 timestamp: 1229099826317660000, flags:
1358Name: /VirtualBox/GuestInfo/OS/NoLoggedInUsers, value: false,
1359 timestamp: 1229098455580553000, flags:
1360Name: /VirtualBox/GuestInfo/Net/Count, value: 1,
1361 timestamp: 1229099826299785000, flags:
1362Name: /VirtualBox/HostInfo/GUI/LanguageID, value: C,
1363 timestamp: 1229098151272771000, flags:
1364Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 192.168.2.102,
1365 timestamp: 1229099826300088000, flags:
1366Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 255.255.255.255,
1367 timestamp: 1229099826300220000, flags:
1368Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0,
1369 timestamp: 1229099826300350000, flags:
1370Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up,
1371 timestamp: 1229099826300524000, flags:
1372Name: /VirtualBox/GuestInfo/OS/LoggedInUsersList, value: username,
1373 timestamp: 1229099826317386000, flags:</screen></para>
1374
1375 <para>To query the value of a single property, use the "get" subcommand
1376 like this:<screen>$ VBoxManage guestproperty get "Windows Vista III"
1377 "/VirtualBox/GuestInfo/OS/Product"
1378VirtualBox Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
1379(C) 2005-$VBOX_C_YEAR $VBOX_VENDOR
1380All rights reserved.
1381
1382Value: Windows Vista Business Edition
1383</screen></para>
1384
1385 <para>To add or change guest properties from the guest, use the tool
1386 <computeroutput>VBoxControl</computeroutput>. This tool is included in the
1387 Guest Additions of VirtualBox 2.2 or later. When started from a Linux
1388 guest, this tool requires root privileges for security reasons:<screen>$ sudo VBoxControl guestproperty enumerate
1389VirtualBox Guest Additions Command Line Management Interface Version $VBOX_VERSION_MAJOR.$VBOX_VERSION_MINOR.$VBOX_VERSION_BUILD
1390(C) 2009-$VBOX_C_YEAR $VBOX_VENDOR
1391All rights reserved.
1392
1393Name: /VirtualBox/GuestInfo/OS/Release, value: 2.6.28-18-generic,
1394 timestamp: 1265813265835667000, flags: &lt;NULL&gt;
1395Name: /VirtualBox/GuestInfo/OS/Version, value: #59-Ubuntu SMP Thu Jan 28 01:23:03 UTC 2010,
1396 timestamp: 1265813265836305000, flags: &lt;NULL&gt;
1397 ...</screen></para>
1398
1399 <para>For more complex needs, you can use the VirtualBox programming
1400 interfaces; see <xref linkend="VirtualBoxAPI" />.</para>
1401 </sect1>
1402
1403 <sect1 id="guestadd-guestcontrol">
1404 <title>Guest control</title>
1405
1406 <para>Starting with version 3.2, the Guest Additions of VirtualBox allow
1407 starting applications inside a VM from the host system.</para>
1408
1409 <para>For this to work, the application needs to be installed inside the
1410 guest; no additional software needs to be installed on the host.
1411 Additionally, text mode output (to stdout and stderr) can be shown on the
1412 host for further processing along with options to specify user
1413 credentials and a timeout value (in milliseconds) to limit time the
1414 application is able to run.</para>
1415
1416 <para>This feature can be used to automate deployment of software within
1417 the guest.</para>
1418
1419 <para>Starting with version 4.0, the Guest Additions for Windows
1420 allow for automatic updating (only already installed Guest Additions 4.0
1421 or later).</para>
1422
1423 <para>To use these feature, use the VirtualBox command line or the GUI. See
1424 <xref linkend="mountingadditionsiso" /> or <xref linkend="vboxmanage-guestcontrol" />
1425 for details.</para>
1426 </sect1>
1427
1428 <sect1 id="guestadd-balloon">
1429 <title>Memory ballooning</title>
1430
1431 <para>Starting with version 3.2, the Guest Additions of VirtualBox can
1432 change the amount of memory of a virtual machine while the machine is
1433 running. Because of how this is implemented, this feature is called
1434 "memory ballooning".</para>
1435
1436 <para>Normally, to change the amount of memory allocated to a virtual
1437 machine, one has to shut down the virtual machine entirely and change the
1438 virtual machine's settings. With memory ballooning, memory that was
1439 allocated for a virtual machine can be given to another virtual machine
1440 without having to shut the machine down. This can be useful to temporarily
1441 start another virtual machine, or in more complicated environments for
1442 sophisticated memory management of many virtual machines that may be
1443 running in parallel depending on how memory is used by the guests.</para>
1444
1445 <para>When memory ballooning is requested, the VirtualBox Guest Additions
1446 (which run inside the guest) allocate physical memory from the guest
1447 operating system on the kernel level and lock this memory down in the
1448 guest. This ensures that the guest will not use that memory any longer: no
1449 guest applications can allocate it, and the guest operating system will
1450 not use it either. VirtualBox can then re-use this memory and give it to a
1451 second virtual machine.</para>
1452
1453 <para>The memory made available through the ballooning mechanism is only
1454 available for re-use by VirtualBox. It is <emphasis>not</emphasis>
1455 returned as free memory to the host. Requesting balloon memory from a
1456 running guest will therefore not increase the amount of free, unallocated
1457 memory on the host.</para>
1458
1459 <para>Effectively, memory ballooning is therefore a memory overcommitment
1460 mechanism for multiple virtual machines while they are running.</para>
1461
1462 <para>At this time, memory ballooning is only supported in VBoxManage, the
1463 VirtualBox command-line utility. Use the following command to increase or
1464 decrease the size of the memory balloon within a running virtual machine
1465 that has Guest Additions installed: <screen>VBoxManage controlvm "VM name" guestmemoryballoon &lt;n&gt;</screen>
1466 where <computeroutput>"VM name"</computeroutput> is the name or UUID of
1467 the virtual machine in question and
1468 <computeroutput>&lt;n&gt;</computeroutput> is the amount of memory to
1469 allocate from the guest in megabytes; see <xref
1470 linkend="vboxmanage-controlvm" /> for more information.</para>
1471
1472 <para>You can also set a default balloon that will automatically be
1473 requested from the VM every time after it has started up with the
1474 following command: <screen>VBoxManage modifyvm "VM name" --guestmemoryballoon &lt;n&gt;</screen></para>
1475
1476 <para>By default, no balloon memory is allocated. This is a VM setting,
1477 like other <computeroutput>modifyvm</computeroutput> settings, and
1478 therefore can only be set while the machine is shut down; see <xref
1479 linkend="vboxmanage-modifyvm" />.</para>
1480
1481 <para><note>
1482 <para>VirtualBox supports memory ballooning only on 64-bit hosts,
1483 memory ballooning is <emphasis>not</emphasis> supported on Mac OS X
1484 hosts.</para>
1485 </note></para>
1486 </sect1>
1487
1488 <sect1 id="guestadd-pagefusion">
1489 <title>Page Fusion</title>
1490
1491 <para>Page Fusion is a novel technique to further improve VM density on the host,
1492 i.e. a way of overcommitting resources. It was first introduced with VirtualBox 3.2
1493 and is currently limited to VMs running Windows 2000 and later. In a typical scenario,
1494 dozens, up to hundreds of very similar VMs are consolidated on a powerful host
1495 computer and the level of consolidation is most often limited by the amount of RAM
1496 that can be installed in a system at reasonable cost. Often, due to RAM exhaustion,
1497 additional VMs cannot be started even though the host's CPUs still provide capacity.
1498 To circumvent this restriction, hypervisors can benefit from the fact that often, VMs
1499 are very similar (e.g. multiple VMs running Windows XP Service Pack 2) and therefore
1500 contain a number of identical RAM cells. The hypervisor can look for such duplicate
1501 data in memory, eliminate the redundancy (deduplication) and thereby free additional
1502 memory.</para>
1503
1504 <para>Traditional hypervisors use a technique often called "page sharing" or
1505 "same page merging" where they go through all memory and compute checksums (hashes)
1506 for each memory page. Then, they look for pages with identical hashes and compare
1507 the content of the pages (if two pages produce the same hash, it is very likely that
1508 the pages are identical in content). Identical pages get eliminated so that all VMs
1509 point to the same page as long as none of the VMs tries to modify the page. If such
1510 a page gets modified, the previously eliminated duplicates get allocated again. All
1511 this is fully transparent to the virtual machine. However, the classical algorithm
1512 has several drawbacks. First of all, it takes rather long to scan the complete
1513 memory (esp. when the system is not idling) so the additional memory only becomes
1514 available after some time (this can be hours or even days!). Also, the whole page
1515 sharing algorithm generally consumes significant CPU resources and increases the
1516 virtualization overhead by 10-20%.</para>
1517
1518 <para>Page Fusion in VirtualBox uses the VirtualBox Guest Additions to identify
1519 memory cells that are most likely identical across VMs and therefore achieves
1520 most of the possible savings of page sharing almost immediately and with almost no
1521 overhead. Page Fusion is also much less likely to be tricked by identical memory
1522 that it will eliminate just to learn seconds later that the memory will now change
1523 and having to perform a highly expensive and often service disrupting reallocation.
1524 </para>
1525
1526 <para>Page Fusion can be enabled for a VM using:
1527 <screen>VBoxManage modifyvm "VM name" --pagefusion on</screen>
1528 </para>
1529
1530 <para>You can observe Page Fusion operation using some metrics.
1531 <computeroutput>RAM/VMM/Shared</computeroutput> shows the total amount of fused
1532 pages whereas the per VM metric <computeroutput>Guest/RAM/Usage/Shared</computeroutput>
1533 will return the amount of fused memory for a given VM. Please refer to
1534 <xref linkend="metrics" /> for information on how to query metrics.</para>
1535
1536 <para><note>
1537 <para>VirtualBox supports Page Fusion only on 64-bit host operating systems.
1538 Mac OS X hosts are currently not supported. Page Fusion is only available for
1539 Windows 2000 and later guests with current Guest Additions.</para>
1540 </note></para>
1541 </sect1>
1542</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