VirtualBox

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

Last change on this file since 40355 was 39922, checked in by vboxsync, 13 years ago

doc/manual: Update supported Solaris guest versions.

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