VirtualBox

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

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

Manual: fix typos (forum)

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