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