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