VirtualBox

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

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

doc: we don't ship the AMD guest driver any longer

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