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