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