1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!--
|
---|
3 | Copyright (C) 2006-2022 Oracle and/or its affiliates.
|
---|
4 |
|
---|
5 | This file is part of VirtualBox base platform packages, as
|
---|
6 | available from https://www.virtualbox.org.
|
---|
7 |
|
---|
8 | This program is free software; you can redistribute it and/or
|
---|
9 | modify it under the terms of the GNU General Public License
|
---|
10 | as published by the Free Software Foundation, in version 3 of the
|
---|
11 | License.
|
---|
12 |
|
---|
13 | This program is distributed in the hope that it will be useful, but
|
---|
14 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
16 | General Public License for more details.
|
---|
17 |
|
---|
18 | You should have received a copy of the GNU General Public License
|
---|
19 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
20 |
|
---|
21 | SPDX-License-Identifier: GPL-3.0-only
|
---|
22 | -->
|
---|
23 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
24 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
|
---|
25 | <!ENTITY % all.entities SYSTEM "all-entities.ent">
|
---|
26 | %all.entities;
|
---|
27 | ]>
|
---|
28 | <chapter id="guestadditions">
|
---|
29 |
|
---|
30 | <title>Guest Additions</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | The previous chapter covered getting started with &product-name; and
|
---|
34 | installing operating systems in a virtual machine. For any serious
|
---|
35 | and interactive use, the &product-name; Guest Additions will make
|
---|
36 | your life much easier by providing closer integration between host
|
---|
37 | and guest and improving the interactive performance of guest
|
---|
38 | systems. This chapter describes the Guest Additions in detail.
|
---|
39 | </para>
|
---|
40 |
|
---|
41 | <sect1 id="guestadd-intro">
|
---|
42 |
|
---|
43 | <title>Introduction to Guest Additions</title>
|
---|
44 |
|
---|
45 | <para>
|
---|
46 | As mentioned in <xref linkend="virtintro" />, the Guest Additions
|
---|
47 | are designed to be installed <emphasis>inside</emphasis> a virtual
|
---|
48 | machine after the guest operating system has been installed. They
|
---|
49 | consist of device drivers and system applications that optimize
|
---|
50 | the guest operating system for better performance and usability.
|
---|
51 | See <xref linkend="guestossupport" /> for details on what guest
|
---|
52 | operating systems are fully supported with Guest Additions by
|
---|
53 | &product-name;.
|
---|
54 | </para>
|
---|
55 |
|
---|
56 | <para>
|
---|
57 | The &product-name; Guest Additions for all supported guest
|
---|
58 | operating systems are provided as a single CD-ROM image file which
|
---|
59 | is called <filename>VBoxGuestAdditions.iso</filename>. This image
|
---|
60 | file is located in the installation directory of &product-name;.
|
---|
61 | To install the Guest Additions for a particular VM, you mount this
|
---|
62 | ISO file in your VM as a virtual CD-ROM and install from there.
|
---|
63 | </para>
|
---|
64 |
|
---|
65 | <para>
|
---|
66 | The Guest Additions offer the following features:
|
---|
67 | </para>
|
---|
68 |
|
---|
69 | <itemizedlist>
|
---|
70 |
|
---|
71 | <listitem>
|
---|
72 | <para>
|
---|
73 | <emphasis role="bold">Mouse pointer integration</emphasis>. To
|
---|
74 | overcome the limitations for mouse support described in
|
---|
75 | <xref linkend="keyb_mouse_normal" />, this feature provides
|
---|
76 | you with seamless mouse support. You will only have one mouse
|
---|
77 | pointer and pressing the Host key is no longer required to
|
---|
78 | <emphasis>free</emphasis> the mouse from being captured by the
|
---|
79 | guest OS. To make this work, a special mouse driver is
|
---|
80 | installed in the guest that communicates with the physical
|
---|
81 | mouse driver on your host and moves the guest mouse pointer
|
---|
82 | accordingly.
|
---|
83 | </para>
|
---|
84 | </listitem>
|
---|
85 |
|
---|
86 | <listitem>
|
---|
87 | <para>
|
---|
88 | <emphasis role="bold">Shared folders.</emphasis> These provide
|
---|
89 | an easy way to exchange files between the host and the guest.
|
---|
90 | Much like ordinary Windows network shares, you can tell
|
---|
91 | &product-name; to treat a certain host directory as a shared
|
---|
92 | folder, and &product-name; will make it available to the guest
|
---|
93 | operating system as a network share, irrespective of whether
|
---|
94 | the guest actually has a network. See
|
---|
95 | <xref linkend="sharedfolders" />.
|
---|
96 | </para>
|
---|
97 | </listitem>
|
---|
98 |
|
---|
99 | <listitem>
|
---|
100 | <para>
|
---|
101 | <emphasis role="bold">Better video support.</emphasis> While
|
---|
102 | the virtual graphics card which &product-name; emulates for
|
---|
103 | any guest operating system provides all the basic features,
|
---|
104 | the custom video drivers that are installed with the Guest
|
---|
105 | Additions provide you with extra high and non-standard video
|
---|
106 | modes, as well as accelerated video performance.
|
---|
107 | </para>
|
---|
108 |
|
---|
109 | <para>
|
---|
110 | In addition, with Windows, Linux, and Oracle Solaris guests,
|
---|
111 | you can resize the virtual machine's window if the Guest
|
---|
112 | Additions are installed. The video resolution in the guest
|
---|
113 | will be automatically adjusted, as if you had manually entered
|
---|
114 | an arbitrary resolution in the guest's
|
---|
115 | <emphasis role="bold">Display</emphasis> settings. See
|
---|
116 | <xref linkend="intro-resize-window" />.
|
---|
117 | </para>
|
---|
118 |
|
---|
119 | <para>
|
---|
120 | If the Guest Additions are installed, 3D graphics and 2D video
|
---|
121 | for guest applications can be accelerated. See
|
---|
122 | <xref linkend="guestadd-video" />.
|
---|
123 | </para>
|
---|
124 | </listitem>
|
---|
125 |
|
---|
126 | <listitem>
|
---|
127 | <para>
|
---|
128 | <emphasis role="bold">Seamless windows.</emphasis> With this
|
---|
129 | feature, the individual windows that are displayed on the
|
---|
130 | desktop of the virtual machine can be mapped on the host's
|
---|
131 | desktop, as if the underlying application was actually running
|
---|
132 | on the host. See <xref linkend="seamlesswindows" />.
|
---|
133 | </para>
|
---|
134 | </listitem>
|
---|
135 |
|
---|
136 | <listitem>
|
---|
137 | <para>
|
---|
138 | <emphasis role="bold">Generic host/guest communication
|
---|
139 | channels.</emphasis> The Guest Additions enable you to control
|
---|
140 | and monitor guest execution. The <emphasis>guest
|
---|
141 | properties</emphasis> provide a generic string-based mechanism
|
---|
142 | to exchange data bits between a guest and a host, some of
|
---|
143 | which have special meanings for controlling and monitoring the
|
---|
144 | guest. See <xref linkend="guestadd-guestprops" />.
|
---|
145 | </para>
|
---|
146 |
|
---|
147 | <para>
|
---|
148 | Additionally, applications can be started in a guest from the
|
---|
149 | host. See <xref linkend="guestadd-guestcontrol" />.
|
---|
150 | </para>
|
---|
151 | </listitem>
|
---|
152 |
|
---|
153 | <listitem>
|
---|
154 | <para>
|
---|
155 | <emphasis role="bold">Time synchronization.</emphasis> With
|
---|
156 | the Guest Additions installed, &product-name; can ensure that
|
---|
157 | the guest's system time is better synchronized with that of
|
---|
158 | the host.
|
---|
159 | </para>
|
---|
160 |
|
---|
161 | <para>
|
---|
162 | For various reasons, the time in the guest might run at a
|
---|
163 | slightly different rate than the time on the host. The host
|
---|
164 | could be receiving updates through NTP and its own time might
|
---|
165 | not run linearly. A VM could also be paused, which stops the
|
---|
166 | flow of time in the guest for a shorter or longer period of
|
---|
167 | time. When the wall clock time between the guest and host only
|
---|
168 | differs slightly, the time synchronization service attempts to
|
---|
169 | gradually and smoothly adjust the guest time in small
|
---|
170 | increments to either catch up or lose time. When the
|
---|
171 | difference is too great, for example if a VM paused for hours
|
---|
172 | or restored from saved state, the guest time is changed
|
---|
173 | immediately, without a gradual adjustment.
|
---|
174 | </para>
|
---|
175 |
|
---|
176 | <para>
|
---|
177 | The Guest Additions will resynchronize the time regularly. See
|
---|
178 | <xref linkend="changetimesync" /> for how to configure the
|
---|
179 | parameters of the time synchronization mechanism.
|
---|
180 | </para>
|
---|
181 | </listitem>
|
---|
182 |
|
---|
183 | <listitem>
|
---|
184 | <para>
|
---|
185 | <emphasis role="bold">Shared clipboard.</emphasis> With the
|
---|
186 | Guest Additions installed, the clipboard of the guest
|
---|
187 | operating system can optionally be shared with your host
|
---|
188 | operating system. See <xref linkend="generalsettings" />.
|
---|
189 | </para>
|
---|
190 | </listitem>
|
---|
191 |
|
---|
192 | <listitem>
|
---|
193 | <para>
|
---|
194 | <emphasis role="bold">Automated logins.</emphasis> Also called
|
---|
195 | credentials passing. See <xref linkend="autologon" />.
|
---|
196 | </para>
|
---|
197 | </listitem>
|
---|
198 |
|
---|
199 | </itemizedlist>
|
---|
200 |
|
---|
201 | <para>
|
---|
202 | Each version of &product-name;, even minor releases, ship with
|
---|
203 | their own version of the Guest Additions. While the interfaces
|
---|
204 | through which the &product-name; core communicates with the Guest
|
---|
205 | Additions are kept stable so that Guest Additions already
|
---|
206 | installed in a VM should continue to work when &product-name; is
|
---|
207 | upgraded on the host, for best results, it is recommended to keep
|
---|
208 | the Guest Additions at the same version.
|
---|
209 | </para>
|
---|
210 |
|
---|
211 | <para>
|
---|
212 | The Windows and Linux Guest Additions therefore check
|
---|
213 | automatically whether they have to be updated. If the host is
|
---|
214 | running a newer &product-name; version than the Guest Additions, a
|
---|
215 | notification with further instructions is displayed in the guest.
|
---|
216 | </para>
|
---|
217 |
|
---|
218 | <para>
|
---|
219 | To disable this update check for the Guest Additions of a given
|
---|
220 | virtual machine, set the value of its
|
---|
221 | <literal>/VirtualBox/GuestAdd/CheckHostVersion</literal> guest
|
---|
222 | property to <literal>0</literal>. See
|
---|
223 | <xref linkend="guestadd-guestprops" />.
|
---|
224 | </para>
|
---|
225 |
|
---|
226 | </sect1>
|
---|
227 |
|
---|
228 | <sect1 id="guestadd-install">
|
---|
229 |
|
---|
230 | <title>Installing and Maintaining Guest Additions</title>
|
---|
231 |
|
---|
232 | <para>
|
---|
233 | Guest Additions are available for virtual machines running
|
---|
234 | Windows, Linux, Oracle Solaris, or OS/2. The following sections
|
---|
235 | describe the specifics of each variant in detail.
|
---|
236 | </para>
|
---|
237 |
|
---|
238 | <sect2 id="additions-windows">
|
---|
239 |
|
---|
240 | <title>Guest Additions for Windows</title>
|
---|
241 |
|
---|
242 | <para>
|
---|
243 | The &product-name; Windows Guest Additions are designed to be
|
---|
244 | installed in a virtual machine running a Windows operating
|
---|
245 | system. The following versions of Windows guests are supported:
|
---|
246 | </para>
|
---|
247 |
|
---|
248 | <itemizedlist>
|
---|
249 |
|
---|
250 | <listitem>
|
---|
251 | <para>
|
---|
252 | Microsoft Windows NT 4.0 (any service pack)
|
---|
253 | </para>
|
---|
254 | </listitem>
|
---|
255 |
|
---|
256 | <listitem>
|
---|
257 | <para>
|
---|
258 | Microsoft Windows 2000 (any service pack)
|
---|
259 | </para>
|
---|
260 | </listitem>
|
---|
261 |
|
---|
262 | <listitem>
|
---|
263 | <para>
|
---|
264 | Microsoft Windows XP (any service pack)
|
---|
265 | </para>
|
---|
266 | </listitem>
|
---|
267 |
|
---|
268 | <listitem>
|
---|
269 | <para>
|
---|
270 | Microsoft Windows Server 2003 (any service pack)
|
---|
271 | </para>
|
---|
272 | </listitem>
|
---|
273 |
|
---|
274 | <listitem>
|
---|
275 | <para>
|
---|
276 | Microsoft Windows Server 2008
|
---|
277 | </para>
|
---|
278 | </listitem>
|
---|
279 |
|
---|
280 | <listitem>
|
---|
281 | <para>
|
---|
282 | Microsoft Windows Vista (all editions)
|
---|
283 | </para>
|
---|
284 | </listitem>
|
---|
285 |
|
---|
286 | <listitem>
|
---|
287 | <para>
|
---|
288 | Microsoft Windows 7 (all editions)
|
---|
289 | </para>
|
---|
290 | </listitem>
|
---|
291 |
|
---|
292 | <listitem>
|
---|
293 | <para>
|
---|
294 | Microsoft Windows 8 (all editions)
|
---|
295 | </para>
|
---|
296 | </listitem>
|
---|
297 |
|
---|
298 | <listitem>
|
---|
299 | <para>
|
---|
300 | Microsoft Windows 10 RTM build 10240
|
---|
301 | </para>
|
---|
302 | </listitem>
|
---|
303 |
|
---|
304 | <listitem>
|
---|
305 | <para>
|
---|
306 | Microsoft Windows Server 2012
|
---|
307 | </para>
|
---|
308 | </listitem>
|
---|
309 |
|
---|
310 | </itemizedlist>
|
---|
311 |
|
---|
312 | <sect3 id="mountingadditionsiso">
|
---|
313 |
|
---|
314 | <title>Installing the Windows Guest Additions</title>
|
---|
315 |
|
---|
316 | <para>
|
---|
317 | In the <emphasis role="bold">Devices</emphasis> menu in the
|
---|
318 | virtual machine's menu bar, &product-name; has a menu item
|
---|
319 | <emphasis role="bold">Insert Guest Additions CD
|
---|
320 | Image</emphasis>, which mounts the Guest Additions ISO file
|
---|
321 | inside your virtual machine. A Windows guest should then
|
---|
322 | automatically start the Guest Additions installer, which
|
---|
323 | installs the Guest Additions on your Windows guest.
|
---|
324 | </para>
|
---|
325 |
|
---|
326 | <para>
|
---|
327 | For other guest operating systems, or if automatic start of
|
---|
328 | software on a CD is disabled, you need to do a manual start of
|
---|
329 | the installer.
|
---|
330 | </para>
|
---|
331 |
|
---|
332 | <note>
|
---|
333 | <para>
|
---|
334 | For the basic Direct3D acceleration to work in a Windows
|
---|
335 | guest, you have to install the WDDM video driver available
|
---|
336 | for Windows Vista or later.
|
---|
337 | </para>
|
---|
338 |
|
---|
339 | <para>
|
---|
340 | For Windows 8 and later, only the WDDM Direct3D video driver
|
---|
341 | is available. For basic Direct3D acceleration to work in
|
---|
342 | Windows XP guests, you have to install the Guest Additions
|
---|
343 | in Safe Mode. See <xref linkend="KnownIssues" /> for
|
---|
344 | details.
|
---|
345 | </para>
|
---|
346 | </note>
|
---|
347 |
|
---|
348 | <para>
|
---|
349 | If you prefer to mount the Guest Additions manually, you can
|
---|
350 | perform the following steps:
|
---|
351 | </para>
|
---|
352 |
|
---|
353 | <orderedlist>
|
---|
354 |
|
---|
355 | <listitem>
|
---|
356 | <para>
|
---|
357 | Start the virtual machine in which you have installed
|
---|
358 | Windows.
|
---|
359 | </para>
|
---|
360 | </listitem>
|
---|
361 |
|
---|
362 | <listitem>
|
---|
363 | <para>
|
---|
364 | Select <emphasis role="bold">Optical Drives</emphasis>
|
---|
365 | from the <emphasis role="bold">Devices</emphasis> menu in
|
---|
366 | the virtual machine's menu bar and then
|
---|
367 | <emphasis role="bold">Choose/Create a Disk
|
---|
368 | Image</emphasis>. This displays the Virtual Media Manager,
|
---|
369 | described in <xref linkend="vdis" />.
|
---|
370 | </para>
|
---|
371 | </listitem>
|
---|
372 |
|
---|
373 | <listitem>
|
---|
374 | <para>
|
---|
375 | In the Virtual Media Manager, click
|
---|
376 | <emphasis role="bold">Add</emphasis> and browse your host
|
---|
377 | file system for the
|
---|
378 | <filename>VBoxGuestAdditions.iso</filename> file.
|
---|
379 | </para>
|
---|
380 |
|
---|
381 | <itemizedlist>
|
---|
382 |
|
---|
383 | <listitem>
|
---|
384 | <para>
|
---|
385 | On a Windows host, this file is in the &product-name;
|
---|
386 | installation directory, usually in
|
---|
387 | <filename>C:\Program
|
---|
388 | files\Oracle\VirtualBox</filename>.
|
---|
389 | </para>
|
---|
390 | </listitem>
|
---|
391 |
|
---|
392 | <listitem>
|
---|
393 | <para>
|
---|
394 | On Mac OS X hosts, this file is in the application
|
---|
395 | bundle of &product-name;. Right-click on the
|
---|
396 | &product-name; icon in Finder and choose
|
---|
397 | <emphasis role="bold">Show Package
|
---|
398 | Contents</emphasis>. The file is located in the
|
---|
399 | <filename>Contents/MacOS</filename> folder.
|
---|
400 | </para>
|
---|
401 | </listitem>
|
---|
402 |
|
---|
403 | <listitem>
|
---|
404 | <para>
|
---|
405 | On a Linux host, this file is in the
|
---|
406 | <filename>additions</filename> folder where you
|
---|
407 | installed &product-name;, usually
|
---|
408 | <filename>/opt/VirtualBox/</filename>.
|
---|
409 | </para>
|
---|
410 | </listitem>
|
---|
411 |
|
---|
412 | <listitem>
|
---|
413 | <para>
|
---|
414 | On Oracle Solaris hosts, this file is in the
|
---|
415 | <filename>additions</filename> folder where you
|
---|
416 | installed &product-name;, usually
|
---|
417 | <filename>/opt/VirtualBox</filename>.
|
---|
418 | </para>
|
---|
419 | </listitem>
|
---|
420 |
|
---|
421 | </itemizedlist>
|
---|
422 | </listitem>
|
---|
423 |
|
---|
424 | <listitem>
|
---|
425 | <para>
|
---|
426 | In the Virtual Media Manager, select the ISO file and
|
---|
427 | click the <emphasis role="bold">Add</emphasis> button.
|
---|
428 | This mounts the ISO file and presents it to your Windows
|
---|
429 | guest as a CD-ROM.
|
---|
430 | </para>
|
---|
431 | </listitem>
|
---|
432 |
|
---|
433 | </orderedlist>
|
---|
434 |
|
---|
435 | <para>
|
---|
436 | Unless you have the Autostart feature disabled in your Windows
|
---|
437 | guest, Windows will now autostart the &product-name; Guest
|
---|
438 | Additions installation program from the Additions ISO. If the
|
---|
439 | Autostart feature has been turned off, choose
|
---|
440 | <filename>VBoxWindowsAdditions.exe</filename> from the CD/DVD
|
---|
441 | drive inside the guest to start the installer.
|
---|
442 | </para>
|
---|
443 |
|
---|
444 | <para>
|
---|
445 | The installer will add several device drivers to the Windows
|
---|
446 | driver database and then invoke the hardware detection wizard.
|
---|
447 | </para>
|
---|
448 |
|
---|
449 | <para>
|
---|
450 | Depending on your configuration, it might display warnings
|
---|
451 | that the drivers are not digitally signed. You must confirm
|
---|
452 | these in order to continue the installation and properly
|
---|
453 | install the Additions.
|
---|
454 | </para>
|
---|
455 |
|
---|
456 | <para>
|
---|
457 | After installation, reboot your guest operating system to
|
---|
458 | activate the Additions.
|
---|
459 | </para>
|
---|
460 |
|
---|
461 | </sect3>
|
---|
462 |
|
---|
463 | <sect3 id="additions-windows-updating">
|
---|
464 |
|
---|
465 | <title>Updating the Windows Guest Additions</title>
|
---|
466 |
|
---|
467 | <para>
|
---|
468 | Windows Guest Additions can be updated by running the
|
---|
469 | installation program again. This replaces the previous
|
---|
470 | Additions drivers with updated versions.
|
---|
471 | </para>
|
---|
472 |
|
---|
473 | <para>
|
---|
474 | Alternatively, you can also open the Windows Device Manager
|
---|
475 | and select <emphasis role="bold">Update Driver...</emphasis>
|
---|
476 | for the following devices:
|
---|
477 | </para>
|
---|
478 |
|
---|
479 | <itemizedlist>
|
---|
480 |
|
---|
481 | <listitem>
|
---|
482 | <para>
|
---|
483 | &product-name; Graphics Adapter
|
---|
484 | </para>
|
---|
485 | </listitem>
|
---|
486 |
|
---|
487 | <listitem>
|
---|
488 | <para>
|
---|
489 | &product-name; System Device
|
---|
490 | </para>
|
---|
491 | </listitem>
|
---|
492 |
|
---|
493 | </itemizedlist>
|
---|
494 |
|
---|
495 | <para>
|
---|
496 | For each, choose the option to provide your own driver, click
|
---|
497 | <emphasis role="bold">Have Disk</emphasis> and navigate to the
|
---|
498 | CD-ROM drive with the Guest Additions.
|
---|
499 | </para>
|
---|
500 |
|
---|
501 | </sect3>
|
---|
502 |
|
---|
503 | <sect3 id="additions-windows-install-unattended">
|
---|
504 |
|
---|
505 | <title>Unattended Installation</title>
|
---|
506 |
|
---|
507 | <para>
|
---|
508 | To avoid popups when performing an unattended installation of
|
---|
509 | the &product-name; Guest Additions, the code signing
|
---|
510 | certificates used to sign the drivers needs to be installed in
|
---|
511 | the correct certificate stores on the guest operating system.
|
---|
512 | Failure to do this will cause a typical Windows installation
|
---|
513 | to display multiple dialogs asking whether you want to install
|
---|
514 | a particular driver.
|
---|
515 | </para>
|
---|
516 |
|
---|
517 | <note>
|
---|
518 | <para>
|
---|
519 | On some Windows versions, such as Windows 2000 and Windows
|
---|
520 | XP, the user intervention popups mentioned above are always
|
---|
521 | displayed, even after importing the Oracle certificates.
|
---|
522 | </para>
|
---|
523 | </note>
|
---|
524 |
|
---|
525 | <para>
|
---|
526 | Installing the code signing certificates on a Windows guest
|
---|
527 | can be done automatically. Use the
|
---|
528 | <filename>VBoxCertUtil.exe</filename> utility from the
|
---|
529 | <filename>cert</filename> folder on the Guest Additions
|
---|
530 | installation CD.
|
---|
531 | </para>
|
---|
532 |
|
---|
533 | <para>
|
---|
534 | Use the following steps:
|
---|
535 | </para>
|
---|
536 |
|
---|
537 | <orderedlist>
|
---|
538 |
|
---|
539 | <listitem>
|
---|
540 | <para>
|
---|
541 | Log in as Administrator on the guest.
|
---|
542 | </para>
|
---|
543 | </listitem>
|
---|
544 |
|
---|
545 | <listitem>
|
---|
546 | <para>
|
---|
547 | Mount the &product-name; Guest Additions .ISO.
|
---|
548 | </para>
|
---|
549 | </listitem>
|
---|
550 |
|
---|
551 | <listitem>
|
---|
552 | <para>
|
---|
553 | Open a command line window on the guest and change to the
|
---|
554 | <filename>cert</filename> folder on the &product-name;
|
---|
555 | Guest Additions CD.
|
---|
556 | </para>
|
---|
557 | </listitem>
|
---|
558 |
|
---|
559 | <listitem>
|
---|
560 | <para>
|
---|
561 | Run the following command:
|
---|
562 | </para>
|
---|
563 |
|
---|
564 | <screen>VBoxCertUtil.exe add-trusted-publisher vbox*.cer --root vbox*.cer</screen>
|
---|
565 |
|
---|
566 | <para>
|
---|
567 | This command installs the certificates to the certificate
|
---|
568 | store. When installing the same certificate more than
|
---|
569 | once, an appropriate error will be displayed.
|
---|
570 | </para>
|
---|
571 | </listitem>
|
---|
572 |
|
---|
573 | </orderedlist>
|
---|
574 |
|
---|
575 | <para>
|
---|
576 | To allow for completely unattended guest installations, you
|
---|
577 | can specify a command line parameter to the install launcher:
|
---|
578 | </para>
|
---|
579 |
|
---|
580 | <screen>VBoxWindowsAdditions.exe /S</screen>
|
---|
581 |
|
---|
582 | <para>
|
---|
583 | This automatically installs the right files and drivers for
|
---|
584 | the corresponding platform, either 32-bit or 64-bit.
|
---|
585 | </para>
|
---|
586 |
|
---|
587 | <note>
|
---|
588 | <para>
|
---|
589 | By default on an unattended installation on a Vista or
|
---|
590 | Windows 7 guest, there will be the XPDM graphics driver
|
---|
591 | installed. This graphics driver does not support Windows
|
---|
592 | Aero / Direct3D on the guest. Instead, the WDDM graphics
|
---|
593 | driver needs to be installed. To select this driver by
|
---|
594 | default, add the command line parameter
|
---|
595 | <literal>/with_wddm</literal> when invoking the Windows
|
---|
596 | Guest Additions installer. This is only required for Vista
|
---|
597 | and Windows 7.
|
---|
598 | </para>
|
---|
599 | </note>
|
---|
600 |
|
---|
601 | <note>
|
---|
602 | <para>
|
---|
603 | For Windows Aero to run correctly on a guest, the guest's
|
---|
604 | VRAM size needs to be configured to at least 128 MB.
|
---|
605 | </para>
|
---|
606 | </note>
|
---|
607 |
|
---|
608 | <para>
|
---|
609 | For more options regarding unattended guest installations,
|
---|
610 | consult the command line help by using the command:
|
---|
611 | </para>
|
---|
612 |
|
---|
613 | <screen>VBoxWindowsAdditions.exe /?</screen>
|
---|
614 |
|
---|
615 | </sect3>
|
---|
616 |
|
---|
617 | <sect3 id="windows-guest-file-extraction">
|
---|
618 |
|
---|
619 | <title>Manual File Extraction</title>
|
---|
620 |
|
---|
621 | <para>
|
---|
622 | If you would like to install the files and drivers manually,
|
---|
623 | you can extract the files from the Windows Guest Additions
|
---|
624 | setup as follows:
|
---|
625 | </para>
|
---|
626 |
|
---|
627 | <screen>VBoxWindowsAdditions.exe /extract</screen>
|
---|
628 |
|
---|
629 | <para>
|
---|
630 | To explicitly extract the Windows Guest Additions for another
|
---|
631 | platform than the current running one, such as 64-bit files on
|
---|
632 | a 32-bit system, you must use the appropriate platform
|
---|
633 | installer. Use
|
---|
634 | <filename>VBoxWindowsAdditions-x86.exe</filename> or
|
---|
635 | <filename>VBoxWindowsAdditions-amd64.exe</filename> with the
|
---|
636 | <literal>/extract</literal> parameter.
|
---|
637 | </para>
|
---|
638 |
|
---|
639 | </sect3>
|
---|
640 |
|
---|
641 | </sect2>
|
---|
642 |
|
---|
643 | <sect2 id="additions-linux">
|
---|
644 |
|
---|
645 | <title>Guest Additions for Linux</title>
|
---|
646 |
|
---|
647 | <para>
|
---|
648 | Like the Windows Guest Additions, the &product-name; Guest
|
---|
649 | Additions for Linux are a set of device drivers and system
|
---|
650 | applications which may be installed in the guest operating
|
---|
651 | system.
|
---|
652 | </para>
|
---|
653 |
|
---|
654 | <para>
|
---|
655 | The following Linux distributions are officially supported:
|
---|
656 | </para>
|
---|
657 |
|
---|
658 | <itemizedlist>
|
---|
659 |
|
---|
660 | <listitem>
|
---|
661 | <para>
|
---|
662 | Oracle Linux as of version 5, including UEK kernels
|
---|
663 | </para>
|
---|
664 | </listitem>
|
---|
665 |
|
---|
666 | <listitem>
|
---|
667 | <para>
|
---|
668 | Fedora as of Fedora Core 4
|
---|
669 | </para>
|
---|
670 | </listitem>
|
---|
671 |
|
---|
672 | <listitem>
|
---|
673 | <para>
|
---|
674 | Red Hat Enterprise Linux as of version 3
|
---|
675 | </para>
|
---|
676 | </listitem>
|
---|
677 |
|
---|
678 | <listitem>
|
---|
679 | <para>
|
---|
680 | SUSE and openSUSE Linux as of version 9
|
---|
681 | </para>
|
---|
682 | </listitem>
|
---|
683 |
|
---|
684 | <listitem>
|
---|
685 | <para>
|
---|
686 | Ubuntu as of version 5.10
|
---|
687 | </para>
|
---|
688 | </listitem>
|
---|
689 |
|
---|
690 | </itemizedlist>
|
---|
691 |
|
---|
692 | <para>
|
---|
693 | Many other distributions are known to work with the Guest
|
---|
694 | Additions.
|
---|
695 | </para>
|
---|
696 |
|
---|
697 | <para>
|
---|
698 | The version of the Linux kernel supplied by default in SUSE and
|
---|
699 | openSUSE 10.2, Ubuntu 6.10 (all versions) and Ubuntu 6.06
|
---|
700 | (server edition) contains a bug which can cause it to crash
|
---|
701 | during startup when it is run in a virtual machine. The Guest
|
---|
702 | Additions work in those distributions.
|
---|
703 | </para>
|
---|
704 |
|
---|
705 | <para>
|
---|
706 | Note that some Linux distributions already come with all or part
|
---|
707 | of the &product-name; Guest Additions. You may choose to keep
|
---|
708 | the distribution's version of the Guest Additions but these are
|
---|
709 | often not up to date and limited in functionality, so we
|
---|
710 | recommend replacing them with the Guest Additions that come with
|
---|
711 | &product-name;. The &product-name; Linux Guest Additions
|
---|
712 | installer tries to detect an existing installation and replace
|
---|
713 | them but depending on how the distribution integrates the Guest
|
---|
714 | Additions, this may require some manual interaction. It is
|
---|
715 | highly recommended to take a snapshot of the virtual machine
|
---|
716 | before replacing preinstalled Guest Additions.
|
---|
717 | </para>
|
---|
718 |
|
---|
719 | <sect3 id="additions-linux-install">
|
---|
720 |
|
---|
721 | <title>Installing the Linux Guest Additions</title>
|
---|
722 |
|
---|
723 | <para>
|
---|
724 | The &product-name; Guest Additions for Linux are provided on
|
---|
725 | the same virtual CD-ROM file as the Guest Additions for
|
---|
726 | Windows. See <xref linkend="mountingadditionsiso"/>. They also
|
---|
727 | come with an installation program that guides you through the
|
---|
728 | setup process. However, due to the significant differences
|
---|
729 | between Linux distributions, installation may be slightly more
|
---|
730 | complex when compared to Windows.
|
---|
731 | </para>
|
---|
732 |
|
---|
733 | <para>
|
---|
734 | Installation generally involves the following steps:
|
---|
735 | </para>
|
---|
736 |
|
---|
737 | <orderedlist>
|
---|
738 |
|
---|
739 | <listitem>
|
---|
740 | <para>
|
---|
741 | Before installing the Guest Additions, you prepare your
|
---|
742 | guest system for building external kernel modules. This
|
---|
743 | works as described in
|
---|
744 | <xref linkend="externalkernelmodules" />, except that this
|
---|
745 | step must be performed in your Linux
|
---|
746 | <emphasis>guest</emphasis> instead of on a Linux host
|
---|
747 | system.
|
---|
748 | </para>
|
---|
749 |
|
---|
750 | <para>
|
---|
751 | If you suspect that something has gone wrong, check that
|
---|
752 | your guest is set up correctly and run the following
|
---|
753 | command as root:
|
---|
754 | </para>
|
---|
755 |
|
---|
756 | <screen>rcvboxadd setup</screen>
|
---|
757 | </listitem>
|
---|
758 |
|
---|
759 | <listitem>
|
---|
760 | <para>
|
---|
761 | Insert the <filename>VBoxGuestAdditions.iso</filename> CD
|
---|
762 | file into your Linux guest's virtual CD-ROM drive, as
|
---|
763 | described for a Windows guest in
|
---|
764 | <xref linkend="mountingadditionsiso" />.
|
---|
765 | </para>
|
---|
766 | </listitem>
|
---|
767 |
|
---|
768 | <listitem>
|
---|
769 | <para>
|
---|
770 | Change to the directory where your CD-ROM drive is mounted
|
---|
771 | and run the following command as root:
|
---|
772 | </para>
|
---|
773 |
|
---|
774 | <screen>sh ./VBoxLinuxAdditions.run</screen>
|
---|
775 | </listitem>
|
---|
776 |
|
---|
777 | </orderedlist>
|
---|
778 |
|
---|
779 | </sect3>
|
---|
780 |
|
---|
781 | <sect3 id="additions-linux-graphics-mouse">
|
---|
782 |
|
---|
783 | <title>Graphics and Mouse Integration</title>
|
---|
784 |
|
---|
785 | <para>
|
---|
786 | In Linux and Oracle Solaris guests, &product-name; graphics
|
---|
787 | and mouse integration goes through the X Window System.
|
---|
788 | &product-name; can use the X.Org variant of the system, or
|
---|
789 | XFree86 version 4.3 which is identical to the first X.Org
|
---|
790 | release. During the installation process, the X.Org display
|
---|
791 | server will be set up to use the graphics and mouse drivers
|
---|
792 | which come with the Guest Additions.
|
---|
793 | </para>
|
---|
794 |
|
---|
795 | <para>
|
---|
796 | After installing the Guest Additions into a fresh installation
|
---|
797 | of a supported Linux distribution or Oracle Solaris system,
|
---|
798 | many unsupported systems will work correctly too, the guest's
|
---|
799 | graphics mode will change to fit the size of the
|
---|
800 | &product-name; window on the host when it is resized. You can
|
---|
801 | also ask the guest system to switch to a particular resolution
|
---|
802 | by sending a video mode hint using the
|
---|
803 | <command>VBoxManage</command> tool.
|
---|
804 | </para>
|
---|
805 |
|
---|
806 | <para>
|
---|
807 | Multiple guest monitors are supported in guests using the
|
---|
808 | X.Org server version 1.3, which is part of release 7.3 of the
|
---|
809 | X Window System version 11, or a later version. The layout of
|
---|
810 | the guest screens can be adjusted as needed using the tools
|
---|
811 | which come with the guest operating system.
|
---|
812 | </para>
|
---|
813 |
|
---|
814 | <para>
|
---|
815 | If you want to understand more about the details of how the
|
---|
816 | X.Org drivers are set up, in particular if you wish to use
|
---|
817 | them in a setting which our installer does not handle
|
---|
818 | correctly, see <xref linkend="guestxorgsetup" />.
|
---|
819 | </para>
|
---|
820 |
|
---|
821 | <para>
|
---|
822 | Starting from &product-name; 7, Linux guest screen resize
|
---|
823 | functionality for guests running VMSVGA graphics configuration
|
---|
824 | has been changed. Since then, this functionality consists
|
---|
825 | of a standalone daemon called VBoxDRMClient and its Desktop
|
---|
826 | Environment helper counterpart.
|
---|
827 | </para>
|
---|
828 |
|
---|
829 | <para>
|
---|
830 | VBoxDRMClient is running as a root process and, in fact, is
|
---|
831 | a bridge between host and guest's vmwgfx driver. This means that
|
---|
832 | VBoxDRMClient listens to screen resize hints from host and
|
---|
833 | forwards them to vmwgfx driver. This allows to make guest screen resize
|
---|
834 | functionality available before user performed graphical log-in.
|
---|
835 | </para>
|
---|
836 |
|
---|
837 | <para>
|
---|
838 | In order to perform Desktop Environment specific actions, such
|
---|
839 | as setting primary screen in multi monitor setup, a Desktop Environment
|
---|
840 | helper is used. Once user performed graphical log-in operation,
|
---|
841 | helper daemon starts in scope of user session and attempts to
|
---|
842 | connect to VBoxDRMClient using IPC connection. Once VBoxDRMClient received
|
---|
843 | corresponding command from host, it is forwarded to helper daemon
|
---|
844 | over IPC and action then performed.
|
---|
845 | </para>
|
---|
846 |
|
---|
847 | <para>
|
---|
848 | By default, VBoxDRMClient allows any process to connect to its IPC
|
---|
849 | socket. This can be restricted once two actions are taken. Starting
|
---|
850 | from &product-name; 7, Guest Additions Linux installer will also
|
---|
851 | create 'vboxdrmipc' user group. Corresponding user needs to be added
|
---|
852 | into this group. The last action is to set the following guest property:
|
---|
853 |
|
---|
854 | <screen>VBoxManage guestproperty set "VM name" /VirtualBox/GuestAdd/DRMIpcRestricted 1 \
|
---|
855 | --flags RDONLYGUEST</screen>
|
---|
856 | </para>
|
---|
857 |
|
---|
858 | <para>
|
---|
859 | Note, it is important to set RDONLYGUEST flag to the property, so
|
---|
860 | it cannot be changed from inside guest. All actions are required. If one of
|
---|
861 | them is missing, all processes will have access to IPC socket. Restricted
|
---|
862 | mode can be disabled by deleting guest property:
|
---|
863 |
|
---|
864 | <screen>VBoxManage guestproperty unset "VM name" /VirtualBox/GuestAdd/DRMIpcRestricted</screen>
|
---|
865 | </para>
|
---|
866 |
|
---|
867 | </sect3>
|
---|
868 |
|
---|
869 | <sect3 id="additions-linux-updating">
|
---|
870 |
|
---|
871 | <title>Updating the Linux Guest Additions</title>
|
---|
872 |
|
---|
873 | <para>
|
---|
874 | The Guest Additions can simply be updated by going through the
|
---|
875 | installation procedure again with an updated CD-ROM image.
|
---|
876 | This will replace the drivers with updated versions. You
|
---|
877 | should reboot after updating the Guest Additions.
|
---|
878 | </para>
|
---|
879 |
|
---|
880 | </sect3>
|
---|
881 |
|
---|
882 | <sect3 id="additions-linux-uninstall">
|
---|
883 |
|
---|
884 | <title>Uninstalling the Linux Guest Additions</title>
|
---|
885 |
|
---|
886 | <para>
|
---|
887 | If you have a version of the Guest Additions installed on your
|
---|
888 | virtual machine and wish to remove it without installing new
|
---|
889 | ones, you can do so by inserting the Guest Additions CD image
|
---|
890 | into the virtual CD-ROM drive as described above. Then run the
|
---|
891 | installer for the current Guest Additions with the
|
---|
892 | <literal>uninstall</literal> parameter from the path that the
|
---|
893 | CD image is mounted on in the guest, as follows:
|
---|
894 | </para>
|
---|
895 |
|
---|
896 | <screen>sh ./VBoxLinuxAdditions.run uninstall</screen>
|
---|
897 |
|
---|
898 | <para>
|
---|
899 | While this will normally work without issues, you may need to
|
---|
900 | do some manual cleanup of the guest in some cases, especially
|
---|
901 | of the XFree86Config or xorg.conf file. In particular, if the
|
---|
902 | Additions version installed or the guest operating system were
|
---|
903 | very old, or if you made your own changes to the Guest
|
---|
904 | Additions setup after you installed them.
|
---|
905 | </para>
|
---|
906 |
|
---|
907 | <para>
|
---|
908 | You can uninstall the Additions as follows:
|
---|
909 | </para>
|
---|
910 |
|
---|
911 | <screen>/opt/VBoxGuestAdditions-<replaceable>version</replaceable>/uninstall.sh</screen>
|
---|
912 |
|
---|
913 | <para>
|
---|
914 | Replace
|
---|
915 | <filename>/opt/VBoxGuestAdditions-<replaceable>version</replaceable></filename>
|
---|
916 | with the correct Guest Additions installation directory.
|
---|
917 | </para>
|
---|
918 |
|
---|
919 | </sect3>
|
---|
920 |
|
---|
921 | </sect2>
|
---|
922 |
|
---|
923 | <sect2 id="additions-solaris">
|
---|
924 |
|
---|
925 | <title>Guest Additions for Oracle Solaris</title>
|
---|
926 |
|
---|
927 | <para>
|
---|
928 | Like the Windows Guest Additions, the &product-name; Guest
|
---|
929 | Additions for Oracle Solaris take the form of a set of device
|
---|
930 | drivers and system applications which may be installed in the
|
---|
931 | guest operating system.
|
---|
932 | </para>
|
---|
933 |
|
---|
934 | <para>
|
---|
935 | The following Oracle Solaris distributions are officially
|
---|
936 | supported:
|
---|
937 | </para>
|
---|
938 |
|
---|
939 | <itemizedlist>
|
---|
940 |
|
---|
941 | <listitem>
|
---|
942 | <para>
|
---|
943 | Oracle Solaris 11, including Oracle Solaris 11 Express
|
---|
944 | </para>
|
---|
945 | </listitem>
|
---|
946 |
|
---|
947 | <listitem>
|
---|
948 | <para>
|
---|
949 | Oracle Solaris 10 4/08 and later
|
---|
950 | </para>
|
---|
951 | </listitem>
|
---|
952 |
|
---|
953 | </itemizedlist>
|
---|
954 |
|
---|
955 | <para>
|
---|
956 | Other distributions may work if they are based on comparable
|
---|
957 | software releases.
|
---|
958 | </para>
|
---|
959 |
|
---|
960 | <sect3 id="additions-solaris-install">
|
---|
961 |
|
---|
962 | <title>Installing the Oracle Solaris Guest Additions</title>
|
---|
963 |
|
---|
964 | <para>
|
---|
965 | The &product-name; Guest Additions for Oracle Solaris are
|
---|
966 | provided on the same ISO CD-ROM as the Additions for Windows
|
---|
967 | and Linux. They come with an installation program that guides
|
---|
968 | you through the setup process.
|
---|
969 | </para>
|
---|
970 |
|
---|
971 | <para>
|
---|
972 | Installation involves the following steps:
|
---|
973 | </para>
|
---|
974 |
|
---|
975 | <orderedlist>
|
---|
976 |
|
---|
977 | <listitem>
|
---|
978 | <para>
|
---|
979 | Mount the <filename>VBoxGuestAdditions.iso</filename> file
|
---|
980 | as your Oracle Solaris guest's virtual CD-ROM drive,
|
---|
981 | exactly the same way as described for a Windows guest in
|
---|
982 | <xref
|
---|
983 | linkend="mountingadditionsiso" />.
|
---|
984 | </para>
|
---|
985 |
|
---|
986 | <para>
|
---|
987 | If the CD-ROM drive on the guest does not get mounted, as
|
---|
988 | seen with some versions of Oracle Solaris 10, run the
|
---|
989 | following command as root:
|
---|
990 | </para>
|
---|
991 |
|
---|
992 | <screen>svcadm restart volfs</screen>
|
---|
993 | </listitem>
|
---|
994 |
|
---|
995 | <listitem>
|
---|
996 | <para>
|
---|
997 | Change to the directory where your CD-ROM drive is mounted
|
---|
998 | and run the following command as root:
|
---|
999 | </para>
|
---|
1000 |
|
---|
1001 | <screen>pkgadd -G -d ./VBoxSolarisAdditions.pkg</screen>
|
---|
1002 | </listitem>
|
---|
1003 |
|
---|
1004 | <listitem>
|
---|
1005 | <para>
|
---|
1006 | Choose <emphasis role="bold">1</emphasis> and confirm
|
---|
1007 | installation of the Guest Additions package. After the
|
---|
1008 | installation is complete, log out and log in to X server
|
---|
1009 | on your guest, to activate the X11 Guest Additions.
|
---|
1010 | </para>
|
---|
1011 | </listitem>
|
---|
1012 |
|
---|
1013 | </orderedlist>
|
---|
1014 |
|
---|
1015 | </sect3>
|
---|
1016 |
|
---|
1017 | <sect3 id="additions-solaris-uninstall">
|
---|
1018 |
|
---|
1019 | <title>Uninstalling the Oracle Solaris Guest Additions</title>
|
---|
1020 |
|
---|
1021 | <para>
|
---|
1022 | The Oracle Solaris Guest Additions can be safely removed by
|
---|
1023 | removing the package from the guest. Open a root terminal
|
---|
1024 | session and run the following command:
|
---|
1025 | </para>
|
---|
1026 |
|
---|
1027 | <screen>pkgrm SUNWvboxguest</screen>
|
---|
1028 |
|
---|
1029 | </sect3>
|
---|
1030 |
|
---|
1031 | <sect3 id="additions-solaris-updating">
|
---|
1032 |
|
---|
1033 | <title>Updating the Oracle Solaris Guest Additions</title>
|
---|
1034 |
|
---|
1035 | <para>
|
---|
1036 | The Guest Additions should be updated by first uninstalling
|
---|
1037 | the existing Guest Additions and then installing the new ones.
|
---|
1038 | Attempting to install new Guest Additions without removing the
|
---|
1039 | existing ones is not possible.
|
---|
1040 | </para>
|
---|
1041 |
|
---|
1042 | </sect3>
|
---|
1043 |
|
---|
1044 | </sect2>
|
---|
1045 |
|
---|
1046 | <sect2 id="additions-os2">
|
---|
1047 |
|
---|
1048 | <title>Guest Additions for OS/2</title>
|
---|
1049 |
|
---|
1050 | <para>
|
---|
1051 | &product-name; also ships with a set of drivers that improve
|
---|
1052 | running OS/2 in a virtual machine. Due to restrictions of OS/2
|
---|
1053 | itself, this variant of the Guest Additions has a limited
|
---|
1054 | feature set. See <xref linkend="KnownIssues" /> for details.
|
---|
1055 | </para>
|
---|
1056 |
|
---|
1057 | <para>
|
---|
1058 | The OS/2 Guest Additions are provided on the same ISO CD-ROM as
|
---|
1059 | those for the other platforms. Mount the ISO in OS/2 as
|
---|
1060 | described previously. The OS/2 Guest Additions are located in
|
---|
1061 | the directory <filename>\OS2</filename>.
|
---|
1062 | </para>
|
---|
1063 |
|
---|
1064 | <para>
|
---|
1065 | We do not provide an automatic installer at this time. See the
|
---|
1066 | <filename>readme.txt</filename> file in the CD-ROM directory,
|
---|
1067 | which describes how to install the OS/2 Guest Additions
|
---|
1068 | manually.
|
---|
1069 | </para>
|
---|
1070 |
|
---|
1071 | </sect2>
|
---|
1072 |
|
---|
1073 | </sect1>
|
---|
1074 |
|
---|
1075 | <sect1 id="sharedfolders">
|
---|
1076 |
|
---|
1077 | <title>Shared Folders</title>
|
---|
1078 |
|
---|
1079 | <para>
|
---|
1080 | With the <emphasis>shared folders</emphasis> feature of
|
---|
1081 | &product-name;, you can access files of your host system from
|
---|
1082 | within the guest system. This is similar to how you would use
|
---|
1083 | network shares in Windows networks, except that shared folders do
|
---|
1084 | not require networking, only the Guest Additions. Shared folders
|
---|
1085 | are supported with Windows 2000 or later, Linux, and Oracle
|
---|
1086 | Solaris guests. &product-name; includes experimental support for
|
---|
1087 | Mac OS X and OS/2 guests.
|
---|
1088 | </para>
|
---|
1089 |
|
---|
1090 | <para>
|
---|
1091 | Shared folders physically reside on the <emphasis>host</emphasis>
|
---|
1092 | and are then shared with the guest, which uses a special file
|
---|
1093 | system driver in the Guest Additions to talk to the host. For
|
---|
1094 | Windows guests, shared folders are implemented as a pseudo-network
|
---|
1095 | redirector. For Linux and Oracle Solaris guests, the Guest
|
---|
1096 | Additions provide a virtual file system.
|
---|
1097 | </para>
|
---|
1098 |
|
---|
1099 | <para>
|
---|
1100 | To share a host folder with a virtual machine in &product-name;,
|
---|
1101 | you must specify the path of the folder and choose a
|
---|
1102 | <emphasis>share name</emphasis> that the guest can use to access
|
---|
1103 | the shared folder. This happens on the host. In the guest you can
|
---|
1104 | then use the share name to connect to it and access files.
|
---|
1105 | </para>
|
---|
1106 |
|
---|
1107 | <para>
|
---|
1108 | There are several ways in which shared folders can be set up for a
|
---|
1109 | virtual machine:
|
---|
1110 | </para>
|
---|
1111 |
|
---|
1112 | <itemizedlist>
|
---|
1113 |
|
---|
1114 | <listitem>
|
---|
1115 | <para>
|
---|
1116 | In the window of a running VM, you select
|
---|
1117 | <emphasis role="bold">Shared Folders</emphasis> from the
|
---|
1118 | <emphasis role="bold">Devices</emphasis> menu, or click on the
|
---|
1119 | folder icon on the status bar in the bottom right corner.
|
---|
1120 | </para>
|
---|
1121 | </listitem>
|
---|
1122 |
|
---|
1123 | <listitem>
|
---|
1124 | <para>
|
---|
1125 | If a VM is not currently running, you can configure shared
|
---|
1126 | folders in the virtual machine's
|
---|
1127 | <emphasis role="bold">Settings</emphasis> dialog.
|
---|
1128 | </para>
|
---|
1129 | </listitem>
|
---|
1130 |
|
---|
1131 | <listitem>
|
---|
1132 | <para>
|
---|
1133 | From the command line, you can create shared folders using
|
---|
1134 | <command>VBoxManage</command>, as follows:
|
---|
1135 | </para>
|
---|
1136 |
|
---|
1137 | <screen>VBoxManage sharedfolder add "VM name" --name "sharename" --hostpath "C:\test"</screen>
|
---|
1138 |
|
---|
1139 | <para>
|
---|
1140 | See <xref linkend="vboxmanage-sharedfolder" />.
|
---|
1141 | </para>
|
---|
1142 | </listitem>
|
---|
1143 |
|
---|
1144 | </itemizedlist>
|
---|
1145 |
|
---|
1146 | <para>
|
---|
1147 | There are two types of shares:
|
---|
1148 | </para>
|
---|
1149 |
|
---|
1150 | <itemizedlist>
|
---|
1151 |
|
---|
1152 | <listitem>
|
---|
1153 | <para>
|
---|
1154 | Permanent shares, that are saved with the VM settings.
|
---|
1155 | </para>
|
---|
1156 | </listitem>
|
---|
1157 |
|
---|
1158 | <listitem>
|
---|
1159 | <para>
|
---|
1160 | Transient shares, that are added at runtime and disappear when
|
---|
1161 | the VM is powered off. These can be created using a check box
|
---|
1162 | in the VirtualBox Manager, or by using the
|
---|
1163 | <option>--transient</option> option of the <command>VBoxManage
|
---|
1164 | sharedfolder add</command> command.
|
---|
1165 | </para>
|
---|
1166 | </listitem>
|
---|
1167 |
|
---|
1168 | </itemizedlist>
|
---|
1169 |
|
---|
1170 | <para>
|
---|
1171 | Shared folders can either be read-write or read-only. This means
|
---|
1172 | that the guest is either allowed to both read and write, or just
|
---|
1173 | read files on the host. By default, shared folders are read-write.
|
---|
1174 | Read-only folders can be created using a check box in the
|
---|
1175 | VirtualBox Manager, or with the <option>--readonly</option> option
|
---|
1176 | of the <command>VBoxManage sharedfolder add</command> command.
|
---|
1177 | </para>
|
---|
1178 |
|
---|
1179 | <para>
|
---|
1180 | &product-name; shared folders also support symbolic links, also
|
---|
1181 | called <emphasis>symlinks</emphasis>, under the following
|
---|
1182 | conditions:
|
---|
1183 | </para>
|
---|
1184 |
|
---|
1185 | <itemizedlist>
|
---|
1186 |
|
---|
1187 | <listitem>
|
---|
1188 | <para>
|
---|
1189 | The host operating system must support symlinks. For example,
|
---|
1190 | a Mac OS X, Linux, or Oracle Solaris host is required.
|
---|
1191 | </para>
|
---|
1192 | </listitem>
|
---|
1193 |
|
---|
1194 | <listitem>
|
---|
1195 | <para>
|
---|
1196 | Currently only Linux and Oracle Solaris Guest Additions
|
---|
1197 | support symlinks.
|
---|
1198 | </para>
|
---|
1199 | </listitem>
|
---|
1200 |
|
---|
1201 | <listitem>
|
---|
1202 | <para>
|
---|
1203 | For security reasons the guest OS is not allowed to create
|
---|
1204 | symlinks by default. If you trust the guest OS to not abuse
|
---|
1205 | the functionality, you can enable creation of symlinks for a
|
---|
1206 | shared folder as follows:
|
---|
1207 | </para>
|
---|
1208 |
|
---|
1209 | <screen>VBoxManage setextradata "VM name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/<replaceable>sharename</replaceable> 1</screen>
|
---|
1210 | </listitem>
|
---|
1211 |
|
---|
1212 | </itemizedlist>
|
---|
1213 |
|
---|
1214 | <sect2 id="sf_mount_manual">
|
---|
1215 |
|
---|
1216 | <title>Manual Mounting</title>
|
---|
1217 |
|
---|
1218 | <para>
|
---|
1219 | You can mount the shared folder from inside a VM, in the same
|
---|
1220 | way as you would mount an ordinary network share:
|
---|
1221 | </para>
|
---|
1222 |
|
---|
1223 | <itemizedlist>
|
---|
1224 |
|
---|
1225 | <listitem>
|
---|
1226 | <para>
|
---|
1227 | In a Windows guest, shared folders are browseable and
|
---|
1228 | therefore visible in Windows Explorer. To attach the host's
|
---|
1229 | shared folder to your Windows guest, open Windows Explorer
|
---|
1230 | and look for the folder in <emphasis role="bold">My
|
---|
1231 | Networking Places</emphasis>, <emphasis role="bold">Entire
|
---|
1232 | Network</emphasis>, <emphasis role="bold">&product-name;
|
---|
1233 | Shared Folders</emphasis>. By right-clicking on a shared
|
---|
1234 | folder and selecting <emphasis role="bold">Map Network
|
---|
1235 | Drive</emphasis> from the menu that pops up, you can assign
|
---|
1236 | a drive letter to that shared folder.
|
---|
1237 | </para>
|
---|
1238 |
|
---|
1239 | <para>
|
---|
1240 | Alternatively, on the Windows command line, use the
|
---|
1241 | following command:
|
---|
1242 | </para>
|
---|
1243 |
|
---|
1244 | <screen>net use x: \\vboxsvr\sharename</screen>
|
---|
1245 |
|
---|
1246 | <para>
|
---|
1247 | While <literal>vboxsvr</literal> is a fixed name, note that
|
---|
1248 | <literal>vboxsrv</literal> would also work, replace
|
---|
1249 | <replaceable>x:</replaceable> with the drive letter that you
|
---|
1250 | want to use for the share, and
|
---|
1251 | <replaceable>sharename</replaceable> with the share name
|
---|
1252 | specified with <command>VBoxManage</command>.
|
---|
1253 | </para>
|
---|
1254 | </listitem>
|
---|
1255 |
|
---|
1256 | <listitem>
|
---|
1257 | <para>
|
---|
1258 | In a Linux guest, use the following command:
|
---|
1259 | </para>
|
---|
1260 |
|
---|
1261 | <screen>mount -t vboxsf [-o OPTIONS] sharename mountpoint</screen>
|
---|
1262 |
|
---|
1263 | <para>
|
---|
1264 | To mount a shared folder during boot, add the following
|
---|
1265 | entry to <filename>/etc/fstab</filename>:
|
---|
1266 | </para>
|
---|
1267 |
|
---|
1268 | <screen>sharename mountpoint vboxsf defaults 0 0</screen>
|
---|
1269 | </listitem>
|
---|
1270 |
|
---|
1271 | <listitem>
|
---|
1272 | <para>
|
---|
1273 | In a Oracle Solaris guest, use the following command:
|
---|
1274 | </para>
|
---|
1275 |
|
---|
1276 | <screen>mount -F vboxfs [-o OPTIONS] sharename mountpoint</screen>
|
---|
1277 |
|
---|
1278 | <para>
|
---|
1279 | Replace <replaceable>sharename</replaceable>, use a
|
---|
1280 | lowercase string, with the share name specified with
|
---|
1281 | <command>VBoxManage</command> or the VirtualBox Manager.
|
---|
1282 | Replace <replaceable>mountpoint</replaceable> with the path
|
---|
1283 | where you want the share to be mounted on the guest, such as
|
---|
1284 | <filename>/mnt/share</filename>. The usual mount rules
|
---|
1285 | apply. For example, create this directory first if it does
|
---|
1286 | not exist yet.
|
---|
1287 | </para>
|
---|
1288 |
|
---|
1289 | <para>
|
---|
1290 | Here is an example of mounting the shared folder for the
|
---|
1291 | user jack on Oracle Solaris:
|
---|
1292 | </para>
|
---|
1293 |
|
---|
1294 | <screen>$ id
|
---|
1295 | uid=5000(jack) gid=1(other)
|
---|
1296 | $ mkdir /export/home/jack/mount
|
---|
1297 | $ pfexec mount -F vboxfs -o uid=5000,gid=1 jackshare /export/home/jack/mount
|
---|
1298 | $ cd ~/mount
|
---|
1299 | $ ls
|
---|
1300 | sharedfile1.mp3 sharedfile2.txt
|
---|
1301 | $</screen>
|
---|
1302 |
|
---|
1303 | <para>
|
---|
1304 | Beyond the standard options supplied by the
|
---|
1305 | <command>mount</command> command, the following are
|
---|
1306 | available:
|
---|
1307 | </para>
|
---|
1308 |
|
---|
1309 | <screen>iocharset CHARSET</screen>
|
---|
1310 |
|
---|
1311 | <para>
|
---|
1312 | This option sets the character set used for I/O operations.
|
---|
1313 | Note that on Linux guests, if the
|
---|
1314 | <literal>iocharset</literal> option is not specified, then
|
---|
1315 | the Guest Additions driver will attempt to use the character
|
---|
1316 | set specified by the CONFIG_NLS_DEFAULT kernel option. If
|
---|
1317 | this option is not set either, then UTF-8 is used.
|
---|
1318 | </para>
|
---|
1319 |
|
---|
1320 | <screen>convertcp CHARSET</screen>
|
---|
1321 |
|
---|
1322 | <para>
|
---|
1323 | This option specifies the character set used for the shared
|
---|
1324 | folder name. This is UTF-8 by default.
|
---|
1325 | </para>
|
---|
1326 |
|
---|
1327 | <para>
|
---|
1328 | The generic mount options, documented in the
|
---|
1329 | <command>mount</command> manual page, apply also. Especially
|
---|
1330 | useful are the options <literal>uid</literal>,
|
---|
1331 | <literal>gid</literal> and <literal>mode</literal>, as they
|
---|
1332 | can allow access by normal users in read/write mode,
|
---|
1333 | depending on the settings, even if root has mounted the
|
---|
1334 | filesystem.
|
---|
1335 | </para>
|
---|
1336 | </listitem>
|
---|
1337 |
|
---|
1338 | <listitem>
|
---|
1339 | <para>
|
---|
1340 | In an OS/2 guest, use the <command>VBoxControl</command>
|
---|
1341 | command to manage shared folders. For example:
|
---|
1342 | </para>
|
---|
1343 |
|
---|
1344 | <screen>VBoxControl sharedfolder use D: MyShareName
|
---|
1345 | VBoxControl sharedfolder unuse D:
|
---|
1346 | VBoxControl sharedfolder list</screen>
|
---|
1347 |
|
---|
1348 | <para>
|
---|
1349 | As with Windows guests, shared folders can also be accessed
|
---|
1350 | via UNC using <filename>\\VBoxSF\</filename>,
|
---|
1351 | <filename>\\VBoxSvr\</filename> or
|
---|
1352 | <filename>\\VBoxSrv\</filename> as the server name and the
|
---|
1353 | shared folder name as <replaceable>sharename</replaceable>.
|
---|
1354 | </para>
|
---|
1355 | </listitem>
|
---|
1356 |
|
---|
1357 | </itemizedlist>
|
---|
1358 |
|
---|
1359 | </sect2>
|
---|
1360 |
|
---|
1361 | <sect2 id="sf_mount_auto">
|
---|
1362 |
|
---|
1363 | <title>Automatic Mounting</title>
|
---|
1364 |
|
---|
1365 | <para>
|
---|
1366 | &product-name; provides the option to mount shared folders
|
---|
1367 | automatically. When automatic mounting is enabled for a shared
|
---|
1368 | folder, the Guest Additions service will mount it for you
|
---|
1369 | automatically. For Windows or OS/2, a preferred drive letter can
|
---|
1370 | also be specified. For Linux or Oracle Solaris, a mount point
|
---|
1371 | directory can also be specified.
|
---|
1372 | </para>
|
---|
1373 |
|
---|
1374 | <para>
|
---|
1375 | If a drive letter or mount point is not specified, or is in use
|
---|
1376 | already, an alternative location is found by the Guest Additions
|
---|
1377 | service. The service searches for an alternative location
|
---|
1378 | depending on the guest OS, as follows:
|
---|
1379 | </para>
|
---|
1380 |
|
---|
1381 | <itemizedlist>
|
---|
1382 |
|
---|
1383 | <listitem>
|
---|
1384 | <para>
|
---|
1385 | <emphasis role="bold">Windows and OS/2 guests.</emphasis>
|
---|
1386 | Search for a free drive letter, starting at
|
---|
1387 | <filename>Z:</filename>. If all drive letters are assigned,
|
---|
1388 | the folder is not mounted.
|
---|
1389 | </para>
|
---|
1390 | </listitem>
|
---|
1391 |
|
---|
1392 | <listitem>
|
---|
1393 | <para>
|
---|
1394 | <emphasis role="bold">Linux and Oracle Solaris
|
---|
1395 | guests.</emphasis> Folders are mounted under the
|
---|
1396 | <filename>/media</filename> directory. The folder name is
|
---|
1397 | normalized (no spaces, slashes or colons) and is prefixed
|
---|
1398 | with <filename>sf_</filename>.
|
---|
1399 | </para>
|
---|
1400 |
|
---|
1401 | <para>
|
---|
1402 | For example, if you have a shared folder called
|
---|
1403 | <filename>myfiles</filename>, it will appear as
|
---|
1404 | <filename>/media/sf_myfiles</filename> in the guest.
|
---|
1405 | </para>
|
---|
1406 |
|
---|
1407 | <para>
|
---|
1408 | The guest properties
|
---|
1409 | <literal>/VirtualBox/GuestAdd/SharedFolders/MountDir</literal>
|
---|
1410 | and the more generic
|
---|
1411 | <literal>/VirtualBox/GuestAdd/SharedFolders/MountPrefix</literal>
|
---|
1412 | can be used to override the automatic mount directory and
|
---|
1413 | prefix. See <xref linkend="guestadd-guestprops" />.
|
---|
1414 | </para>
|
---|
1415 | </listitem>
|
---|
1416 |
|
---|
1417 | </itemizedlist>
|
---|
1418 |
|
---|
1419 | <para>
|
---|
1420 | Access to an automatically mounted shared folder is granted to
|
---|
1421 | everyone in a Windows guest, including the guest user. For Linux
|
---|
1422 | and Oracle Solaris guests, access is restricted to members of
|
---|
1423 | the group <literal>vboxsf</literal> and the
|
---|
1424 | <literal>root</literal> user.
|
---|
1425 | </para>
|
---|
1426 |
|
---|
1427 | </sect2>
|
---|
1428 |
|
---|
1429 | </sect1>
|
---|
1430 |
|
---|
1431 | <sect1 id="guestadd-dnd">
|
---|
1432 |
|
---|
1433 | <title>Drag and Drop</title>
|
---|
1434 |
|
---|
1435 | <para>
|
---|
1436 | &product-name; enables you to drag and drop content from the host
|
---|
1437 | to the guest, and vice versa. For this to work the latest version
|
---|
1438 | of the Guest Additions must be installed on the guest.
|
---|
1439 | </para>
|
---|
1440 |
|
---|
1441 | <para>
|
---|
1442 | Drag and drop transparently allows copying or opening files,
|
---|
1443 | directories, and even certain clipboard formats from one end to
|
---|
1444 | the other. For example, from the host to the guest or from the
|
---|
1445 | guest to the host. You then can perform drag and drop operations
|
---|
1446 | between the host and a VM, as it would be a native drag and drop
|
---|
1447 | operation on the host OS.
|
---|
1448 | </para>
|
---|
1449 |
|
---|
1450 | <para>
|
---|
1451 | At the moment drag and drop is implemented for Windows-based and
|
---|
1452 | X-Windows-based systems, both on the host and guest side. As
|
---|
1453 | X-Windows supports many different drag and drop protocols only the
|
---|
1454 | most common one, XDND, is supported for now. Applications using
|
---|
1455 | other protocols, such as Motif or OffiX, will not be recognized by
|
---|
1456 | &product-name;.
|
---|
1457 | </para>
|
---|
1458 |
|
---|
1459 | <para>
|
---|
1460 | In the context of using drag and drop, the origin of the data is
|
---|
1461 | called the <emphasis>source</emphasis>. That is, where the actual
|
---|
1462 | data comes from and is specified. The
|
---|
1463 | <emphasis>destination</emphasis> specifies where the data from the
|
---|
1464 | source should go to. Transferring data from the source to the
|
---|
1465 | destination can be done in various ways, such as copying, moving,
|
---|
1466 | or linking.
|
---|
1467 | </para>
|
---|
1468 |
|
---|
1469 | <note>
|
---|
1470 | <para>
|
---|
1471 | At the moment only copying of data is supported. Moving or
|
---|
1472 | linking is not yet implemented.
|
---|
1473 | </para>
|
---|
1474 | </note>
|
---|
1475 |
|
---|
1476 | <para>
|
---|
1477 | When transferring data from the host to the guest OS, the host in
|
---|
1478 | this case is the source, whereas the guest OS is the destination.
|
---|
1479 | However, when transferring data from the guest OS to the host, the
|
---|
1480 | guest OS this time became the source and the host is the
|
---|
1481 | destination.
|
---|
1482 | </para>
|
---|
1483 |
|
---|
1484 | <para>
|
---|
1485 | For security reasons drag and drop can be configured at runtime on
|
---|
1486 | a per-VM basis either using the <emphasis role="bold">Drag and
|
---|
1487 | Drop</emphasis> menu item in the
|
---|
1488 | <emphasis role="bold">Devices</emphasis> menu of the virtual
|
---|
1489 | machine, as shown below, or the <command>VBoxManage</command>
|
---|
1490 | command.
|
---|
1491 | </para>
|
---|
1492 |
|
---|
1493 | <figure id="fig-drag-drop-options">
|
---|
1494 | <title>Drag and Drop Menu Options</title>
|
---|
1495 | <mediaobject>
|
---|
1496 | <imageobject>
|
---|
1497 | <imagedata align="center" fileref="images/dnd-modes.png"
|
---|
1498 | width="10cm" />
|
---|
1499 | </imageobject>
|
---|
1500 | </mediaobject>
|
---|
1501 | </figure>
|
---|
1502 |
|
---|
1503 | <para>
|
---|
1504 | The following drag and drop modes are available:
|
---|
1505 | </para>
|
---|
1506 |
|
---|
1507 | <itemizedlist>
|
---|
1508 |
|
---|
1509 | <listitem>
|
---|
1510 | <para>
|
---|
1511 | <emphasis role="bold">Disabled.</emphasis> Disables the drag
|
---|
1512 | and drop feature entirely. This is the default when creating a
|
---|
1513 | new VM.
|
---|
1514 | </para>
|
---|
1515 | </listitem>
|
---|
1516 |
|
---|
1517 | <listitem>
|
---|
1518 | <para>
|
---|
1519 | <emphasis role="bold">Host To Guest.</emphasis> Enables drag
|
---|
1520 | and drop operations from the host to the guest only.
|
---|
1521 | </para>
|
---|
1522 | </listitem>
|
---|
1523 |
|
---|
1524 | <listitem>
|
---|
1525 | <para>
|
---|
1526 | <emphasis role="bold">Guest To Host.</emphasis> Enables drag
|
---|
1527 | and drop operations from the guest to the host only.
|
---|
1528 | </para>
|
---|
1529 | </listitem>
|
---|
1530 |
|
---|
1531 | <listitem>
|
---|
1532 | <para>
|
---|
1533 | <emphasis role="bold">Bidirectional.</emphasis> Enables drag
|
---|
1534 | and drop operations in both directions: from the host to the
|
---|
1535 | guest, and from the guest to the host.
|
---|
1536 | </para>
|
---|
1537 | </listitem>
|
---|
1538 |
|
---|
1539 | </itemizedlist>
|
---|
1540 |
|
---|
1541 | <note>
|
---|
1542 | <para>
|
---|
1543 | Drag and drop support depends on the frontend being used. At the
|
---|
1544 | moment, only the VirtualBox Manager frontend provides this
|
---|
1545 | functionality.
|
---|
1546 | </para>
|
---|
1547 | </note>
|
---|
1548 |
|
---|
1549 | <para>
|
---|
1550 | To use the <command>VBoxManage</command> command to control the
|
---|
1551 | current drag and drop mode, see <xref linkend="vboxmanage" />. The
|
---|
1552 | <command>modifyvm</command> and <command>controlvm</command>
|
---|
1553 | commands enable setting of a VM's current drag and drop mode from
|
---|
1554 | the command line.
|
---|
1555 | </para>
|
---|
1556 |
|
---|
1557 | <sect2 id="guestadd-dnd-formats">
|
---|
1558 |
|
---|
1559 | <title>Supported Formats</title>
|
---|
1560 |
|
---|
1561 | <para>
|
---|
1562 | As &product-name; can run on a variety of host operating systems
|
---|
1563 | and also supports a wide range of guests, certain data formats
|
---|
1564 | must be translated after transfer. This is so that the
|
---|
1565 | destination operating system, which receives the data, is able
|
---|
1566 | to handle them in an appropriate manner.
|
---|
1567 | </para>
|
---|
1568 |
|
---|
1569 | <note>
|
---|
1570 | <para>
|
---|
1571 | When dragging files no data conversion is done in any way. For
|
---|
1572 | example, when transferring a file from a Linux guest to a
|
---|
1573 | Windows host the Linux-specific line endings are not converted
|
---|
1574 | to Windows line endings.
|
---|
1575 | </para>
|
---|
1576 | </note>
|
---|
1577 |
|
---|
1578 | <para>
|
---|
1579 | The following formats are handled by the &product-name; drag and
|
---|
1580 | drop service:
|
---|
1581 | </para>
|
---|
1582 |
|
---|
1583 | <itemizedlist>
|
---|
1584 |
|
---|
1585 | <listitem>
|
---|
1586 | <para>
|
---|
1587 | <emphasis role="bold">Plain text:</emphasis> From
|
---|
1588 | applications such as text editors, internet browsers and
|
---|
1589 | terminal windows.
|
---|
1590 | </para>
|
---|
1591 | </listitem>
|
---|
1592 |
|
---|
1593 | <listitem>
|
---|
1594 | <para>
|
---|
1595 | <emphasis role="bold">Files:</emphasis> From file managers
|
---|
1596 | such as Windows Explorer, Nautilus, and Finder.
|
---|
1597 | </para>
|
---|
1598 | </listitem>
|
---|
1599 |
|
---|
1600 | <listitem>
|
---|
1601 | <para>
|
---|
1602 | <emphasis role="bold">Directories:</emphasis> For
|
---|
1603 | directories, the same formats apply as for files.
|
---|
1604 | </para>
|
---|
1605 | </listitem>
|
---|
1606 |
|
---|
1607 | </itemizedlist>
|
---|
1608 |
|
---|
1609 | </sect2>
|
---|
1610 |
|
---|
1611 | <sect2 id="guestadd-dnd-limitations">
|
---|
1612 |
|
---|
1613 | <title>Known Limitations</title>
|
---|
1614 |
|
---|
1615 | <para>
|
---|
1616 | The following limitations are known for drag and drop:
|
---|
1617 | </para>
|
---|
1618 |
|
---|
1619 | <para>
|
---|
1620 | On Windows hosts, dragging and dropping content between
|
---|
1621 | UAC-elevated (User Account Control) programs and
|
---|
1622 | non-UAC-elevated programs is not allowed. If you start
|
---|
1623 | &product-name; with Administrator privileges then drag and drop
|
---|
1624 | will not work with Windows Explorer, which runs with regular
|
---|
1625 | user privileges by default.
|
---|
1626 | </para>
|
---|
1627 |
|
---|
1628 | <para>
|
---|
1629 | On Linux hosts and guests, programs can query for drag and drop
|
---|
1630 | data while the drag operation is still in progress. For example,
|
---|
1631 | on LXDE using the PCManFM file manager. This currently is not
|
---|
1632 | supported. As a workaround, a different file manager, such as
|
---|
1633 | Nautilus, can be used instead.
|
---|
1634 | </para>
|
---|
1635 |
|
---|
1636 | </sect2>
|
---|
1637 |
|
---|
1638 | </sect1>
|
---|
1639 |
|
---|
1640 | <sect1 id="guestadd-video">
|
---|
1641 |
|
---|
1642 | <title>Hardware-Accelerated Graphics</title>
|
---|
1643 |
|
---|
1644 | <sect2 id="guestadd-3d">
|
---|
1645 |
|
---|
1646 | <title>Hardware 3D Acceleration (OpenGL and Direct3D 8/9)</title>
|
---|
1647 |
|
---|
1648 | <para>
|
---|
1649 | The &product-name; Guest Additions contain experimental hardware
|
---|
1650 | 3D support for Windows, Linux, and Oracle Solaris guests.
|
---|
1651 | </para>
|
---|
1652 |
|
---|
1653 | <para>
|
---|
1654 | With this feature, if an application inside your virtual machine
|
---|
1655 | uses 3D features through the OpenGL or Direct3D 8/9 programming
|
---|
1656 | interfaces, instead of emulating them in software, which would
|
---|
1657 | be slow, &product-name; will attempt to use your host's 3D
|
---|
1658 | hardware. This works for all supported host platforms, provided
|
---|
1659 | that your host operating system can make use of your accelerated
|
---|
1660 | 3D hardware in the first place.
|
---|
1661 | </para>
|
---|
1662 |
|
---|
1663 | <para>
|
---|
1664 | The 3D acceleration feature currently has the following
|
---|
1665 | preconditions:
|
---|
1666 | </para>
|
---|
1667 |
|
---|
1668 | <itemizedlist>
|
---|
1669 |
|
---|
1670 | <listitem>
|
---|
1671 | <para>
|
---|
1672 | It is only available for certain Windows, Linux, and Oracle
|
---|
1673 | Solaris guests. In particular:
|
---|
1674 | </para>
|
---|
1675 |
|
---|
1676 | <itemizedlist>
|
---|
1677 |
|
---|
1678 | <listitem>
|
---|
1679 | <para>
|
---|
1680 | 3D acceleration with Windows guests requires Windows
|
---|
1681 | 2000 or later. Apart from on Windows 2000 guests, both
|
---|
1682 | OpenGL and Direct3D 8/9 are supported on an experimental
|
---|
1683 | basis.
|
---|
1684 | </para>
|
---|
1685 | </listitem>
|
---|
1686 |
|
---|
1687 | <listitem>
|
---|
1688 | <para>
|
---|
1689 | OpenGL on Linux requires kernel 2.6.27 or later, as well
|
---|
1690 | as X.org server version 1.5 or later. Ubuntu 10.10 and
|
---|
1691 | Fedora 14 have been tested and confirmed as working.
|
---|
1692 | </para>
|
---|
1693 | </listitem>
|
---|
1694 |
|
---|
1695 | <listitem>
|
---|
1696 | <para>
|
---|
1697 | OpenGL on Oracle Solaris guests requires X.org server
|
---|
1698 | version 1.5 or later.
|
---|
1699 | </para>
|
---|
1700 | </listitem>
|
---|
1701 |
|
---|
1702 | </itemizedlist>
|
---|
1703 | </listitem>
|
---|
1704 |
|
---|
1705 | <listitem>
|
---|
1706 | <para>
|
---|
1707 | The Guest Additions must be installed.
|
---|
1708 | </para>
|
---|
1709 |
|
---|
1710 | <note>
|
---|
1711 | <para>
|
---|
1712 | For the basic Direct3D acceleration to work in a Windows
|
---|
1713 | Guest, &product-name; needs to replace Windows system
|
---|
1714 | files in the virtual machine. As a result, the Guest
|
---|
1715 | Additions installation program offers Direct3D
|
---|
1716 | acceleration as an option that must be explicitly enabled.
|
---|
1717 | Also, you must install the Guest Additions in Safe Mode.
|
---|
1718 | This does <emphasis>not</emphasis> apply to the WDDM
|
---|
1719 | Direct3D video driver available for Windows Vista and
|
---|
1720 | later. See <xref linkend="KnownIssues" /> for details.
|
---|
1721 | </para>
|
---|
1722 | </note>
|
---|
1723 | </listitem>
|
---|
1724 |
|
---|
1725 | <listitem>
|
---|
1726 | <para>
|
---|
1727 | Because 3D support is still experimental at this time, it is
|
---|
1728 | disabled by default and must be <emphasis>manually
|
---|
1729 | enabled</emphasis> in the VM settings. See
|
---|
1730 | <xref linkend="settings-display" />.
|
---|
1731 | </para>
|
---|
1732 |
|
---|
1733 | <note>
|
---|
1734 | <para>
|
---|
1735 | Untrusted guest systems should not be allowed to use the
|
---|
1736 | 3D acceleration features of &product-name;, just as
|
---|
1737 | untrusted host software should not be allowed to use 3D
|
---|
1738 | acceleration. Drivers for 3D hardware are generally too
|
---|
1739 | complex to be made properly secure and any software which
|
---|
1740 | is allowed to access them may be able to compromise the
|
---|
1741 | operating system running them. In addition, enabling 3D
|
---|
1742 | acceleration gives the guest direct access to a large body
|
---|
1743 | of additional program code in the &product-name; host
|
---|
1744 | process which it might conceivably be able to use to crash
|
---|
1745 | the virtual machine.
|
---|
1746 | </para>
|
---|
1747 | </note>
|
---|
1748 | </listitem>
|
---|
1749 |
|
---|
1750 | </itemizedlist>
|
---|
1751 |
|
---|
1752 | <para>
|
---|
1753 | To enable Aero theme support, the &product-name; WDDM video
|
---|
1754 | driver must be installed, which is available with the Guest
|
---|
1755 | Additions installation. The WDDM driver is not installed by
|
---|
1756 | default for Vista and Windows 7 guests and must be
|
---|
1757 | <emphasis>manually selected</emphasis> in the Guest Additions
|
---|
1758 | installer by clicking <emphasis role="bold">No</emphasis> in the
|
---|
1759 | <emphasis role="bold">Would You Like to Install Basic Direct3D
|
---|
1760 | Support</emphasis> dialog displayed when the Direct3D feature is
|
---|
1761 | selected.
|
---|
1762 | </para>
|
---|
1763 |
|
---|
1764 | <para>
|
---|
1765 | The Aero theme is not enabled by default on Windows. See your
|
---|
1766 | Windows platform documentation for details of how to enable the
|
---|
1767 | Aero theme.
|
---|
1768 | </para>
|
---|
1769 |
|
---|
1770 | <para>
|
---|
1771 | Technically, &product-name; implements 3D acceleration by
|
---|
1772 | installing an additional hardware 3D driver inside the guest
|
---|
1773 | when the Guest Additions are installed. This driver acts as a
|
---|
1774 | hardware 3D driver and reports to the guest operating system
|
---|
1775 | that the virtual hardware is capable of 3D hardware
|
---|
1776 | acceleration. When an application in the guest then requests
|
---|
1777 | hardware acceleration through the OpenGL or Direct3D programming
|
---|
1778 | interfaces, these are sent to the host through a special
|
---|
1779 | communication tunnel implemented by &product-name;. The
|
---|
1780 | <emphasis>host</emphasis> then performs the requested 3D
|
---|
1781 | operation using the host's programming interfaces.
|
---|
1782 | </para>
|
---|
1783 |
|
---|
1784 | </sect2>
|
---|
1785 |
|
---|
1786 | <sect2 id="guestadd-2d">
|
---|
1787 |
|
---|
1788 | <title>Hardware 2D Video Acceleration for Windows Guests</title>
|
---|
1789 |
|
---|
1790 | <para>
|
---|
1791 | The &product-name; Guest Additions contain experimental hardware
|
---|
1792 | 2D video acceleration support for Windows guests.
|
---|
1793 | </para>
|
---|
1794 |
|
---|
1795 | <para>
|
---|
1796 | With this feature, if an application such as a video player
|
---|
1797 | inside your Windows VM uses 2D video overlays to play a movie
|
---|
1798 | clip, then &product-name; will attempt to use your host's video
|
---|
1799 | acceleration hardware instead of performing overlay stretching
|
---|
1800 | and color conversion in software, which would be slow. This
|
---|
1801 | currently works for Windows, Linux and Mac OS X host platforms,
|
---|
1802 | provided that your host operating system can make use of 2D
|
---|
1803 | video acceleration in the first place.
|
---|
1804 | </para>
|
---|
1805 |
|
---|
1806 | <para>
|
---|
1807 | Hardware 2D video acceleration currently has the following
|
---|
1808 | preconditions:
|
---|
1809 | </para>
|
---|
1810 |
|
---|
1811 | <itemizedlist>
|
---|
1812 |
|
---|
1813 | <listitem>
|
---|
1814 | <para>
|
---|
1815 | Only available for Windows guests, running Windows XP or
|
---|
1816 | later.
|
---|
1817 | </para>
|
---|
1818 | </listitem>
|
---|
1819 |
|
---|
1820 | <listitem>
|
---|
1821 | <para>
|
---|
1822 | Guest Additions must be installed.
|
---|
1823 | </para>
|
---|
1824 | </listitem>
|
---|
1825 |
|
---|
1826 | <listitem>
|
---|
1827 | <para>
|
---|
1828 | Because 2D support is still experimental at this time, it is
|
---|
1829 | disabled by default and must be <emphasis>manually
|
---|
1830 | enabled</emphasis> in the VM settings. See
|
---|
1831 | <xref linkend="settings-display" />.
|
---|
1832 | </para>
|
---|
1833 | </listitem>
|
---|
1834 |
|
---|
1835 | </itemizedlist>
|
---|
1836 |
|
---|
1837 | <para>
|
---|
1838 | Technically, &product-name; implements this by exposing video
|
---|
1839 | overlay DirectDraw capabilities in the Guest Additions video
|
---|
1840 | driver. The driver sends all overlay commands to the host
|
---|
1841 | through a special communication tunnel implemented by
|
---|
1842 | &product-name;. On the host side, OpenGL is then used to
|
---|
1843 | implement color space transformation and scaling.
|
---|
1844 | </para>
|
---|
1845 |
|
---|
1846 | </sect2>
|
---|
1847 |
|
---|
1848 | </sect1>
|
---|
1849 |
|
---|
1850 | <sect1 id="seamlesswindows">
|
---|
1851 |
|
---|
1852 | <title>Seamless Windows</title>
|
---|
1853 |
|
---|
1854 | <para>
|
---|
1855 | With the <emphasis>seamless windows</emphasis> feature of
|
---|
1856 | &product-name;, you can have the windows that are displayed within
|
---|
1857 | a virtual machine appear side by side next to the windows of your
|
---|
1858 | host. This feature is supported for the following guest operating
|
---|
1859 | systems, provided that the Guest Additions are installed:
|
---|
1860 | </para>
|
---|
1861 |
|
---|
1862 | <itemizedlist>
|
---|
1863 |
|
---|
1864 | <listitem>
|
---|
1865 | <para>
|
---|
1866 | Windows guests.
|
---|
1867 | </para>
|
---|
1868 | </listitem>
|
---|
1869 |
|
---|
1870 | <listitem>
|
---|
1871 | <para>
|
---|
1872 | Supported Linux or Oracle Solaris guests running the X Window
|
---|
1873 | System.
|
---|
1874 | </para>
|
---|
1875 | </listitem>
|
---|
1876 |
|
---|
1877 | </itemizedlist>
|
---|
1878 |
|
---|
1879 | <para>
|
---|
1880 | After seamless windows are enabled, &product-name; suppresses the
|
---|
1881 | display of the desktop background of your guest, allowing you to
|
---|
1882 | run the windows of your guest operating system seamlessly next to
|
---|
1883 | the windows of your host.
|
---|
1884 | </para>
|
---|
1885 |
|
---|
1886 | <figure id="fig-seamless-windows">
|
---|
1887 | <title>Seamless Windows on a Host Desktop</title>
|
---|
1888 | <mediaobject>
|
---|
1889 | <imageobject>
|
---|
1890 | <imagedata align="center" fileref="images/seamless.png" width="14cm" />
|
---|
1891 | </imageobject>
|
---|
1892 | </mediaobject>
|
---|
1893 | </figure>
|
---|
1894 |
|
---|
1895 | <para>
|
---|
1896 | To enable seamless mode, after starting the virtual machine, press
|
---|
1897 | the <emphasis role="bold">Host key + L</emphasis>. The Host key is
|
---|
1898 | normally the right control key. This will enlarge the size of the
|
---|
1899 | VM's display to the size of your host screen and mask out the
|
---|
1900 | guest operating system's background. To disable seamless windows
|
---|
1901 | and go back to the normal VM display, press the Host key + L
|
---|
1902 | again.
|
---|
1903 | </para>
|
---|
1904 |
|
---|
1905 | </sect1>
|
---|
1906 |
|
---|
1907 | <sect1 id="guestadd-guestprops">
|
---|
1908 |
|
---|
1909 | <title>Guest Properties</title>
|
---|
1910 |
|
---|
1911 | <para>
|
---|
1912 | &product-name; enables requests of some properties from a running
|
---|
1913 | guest, provided that the &product-name; Guest Additions are
|
---|
1914 | installed and the VM is running. This provides the following
|
---|
1915 | advantages:
|
---|
1916 | </para>
|
---|
1917 |
|
---|
1918 | <itemizedlist>
|
---|
1919 |
|
---|
1920 | <listitem>
|
---|
1921 | <para>
|
---|
1922 | A number of predefined VM characteristics are automatically
|
---|
1923 | maintained by &product-name; and can be retrieved on the host.
|
---|
1924 | For example, to monitor VM performance and statistics.
|
---|
1925 | </para>
|
---|
1926 | </listitem>
|
---|
1927 |
|
---|
1928 | <listitem>
|
---|
1929 | <para>
|
---|
1930 | Arbitrary string data can be exchanged between guest and host.
|
---|
1931 | This works in both directions.
|
---|
1932 | </para>
|
---|
1933 | </listitem>
|
---|
1934 |
|
---|
1935 | </itemizedlist>
|
---|
1936 |
|
---|
1937 | <para>
|
---|
1938 | To accomplish this, &product-name; establishes a private
|
---|
1939 | communication channel between the &product-name; Guest Additions
|
---|
1940 | and the host, and software on both sides can use this channel to
|
---|
1941 | exchange string data for arbitrary purposes. Guest properties are
|
---|
1942 | simply string keys to which a value is attached. They can be set,
|
---|
1943 | or written to, by either the host and the guest. They can also be
|
---|
1944 | read from both sides.
|
---|
1945 | </para>
|
---|
1946 |
|
---|
1947 | <para>
|
---|
1948 | In addition to establishing the general mechanism of reading and
|
---|
1949 | writing values, a set of predefined guest properties is
|
---|
1950 | automatically maintained by the &product-name; Guest Additions to
|
---|
1951 | allow for retrieving interesting guest data such as the guest's
|
---|
1952 | exact operating system and service pack level, the installed
|
---|
1953 | version of the Guest Additions, users that are currently logged
|
---|
1954 | into the guest OS, network statistics and more. These predefined
|
---|
1955 | properties are all prefixed with <literal>/VirtualBox/</literal>
|
---|
1956 | and organized into a hierarchical tree of keys.
|
---|
1957 | </para>
|
---|
1958 |
|
---|
1959 | <para>
|
---|
1960 | Some of this runtime information is shown when you select
|
---|
1961 | <emphasis role="bold">Session Information Dialog</emphasis> from a
|
---|
1962 | virtual machine's <emphasis role="bold">Machine</emphasis> menu.
|
---|
1963 | </para>
|
---|
1964 |
|
---|
1965 | <para>
|
---|
1966 | A more flexible way to use this channel is with the
|
---|
1967 | <command>VBoxManage guestproperty</command> command. See
|
---|
1968 | <xref linkend="vboxmanage-guestproperty" />. For example, to have
|
---|
1969 | <emphasis>all</emphasis> the available guest properties for a
|
---|
1970 | given running VM listed with their respective values, use this
|
---|
1971 | command:
|
---|
1972 | </para>
|
---|
1973 |
|
---|
1974 | <screen>$ VBoxManage guestproperty enumerate "Windows Vista III"
|
---|
1975 | VirtualBox Command Line Management Interface Version <replaceable>version-number</replaceable>
|
---|
1976 | Copyright (C) 2005-2022 Oracle and/or its affiliates
|
---|
1977 |
|
---|
1978 | Name: /VirtualBox/GuestInfo/OS/Product, value: Windows Vista Business Edition,
|
---|
1979 | timestamp: 1229098278843087000, flags:
|
---|
1980 | Name: /VirtualBox/GuestInfo/OS/Release, value: 6.0.6001,
|
---|
1981 | timestamp: 1229098278950553000, flags:
|
---|
1982 | Name: /VirtualBox/GuestInfo/OS/ServicePack, value: 1,
|
---|
1983 | timestamp: 1229098279122627000, flags:
|
---|
1984 | Name: /VirtualBox/GuestAdd/InstallDir,
|
---|
1985 | value: C:/Program Files/Oracle/VirtualBox
|
---|
1986 | Guest Additions, timestamp: 1229098279269739000, flags:
|
---|
1987 | Name: /VirtualBox/GuestAdd/Revision, value: 40720,
|
---|
1988 | timestamp: 1229098279345664000, flags:
|
---|
1989 | Name: /VirtualBox/GuestAdd/Version, value: <replaceable>version-number</replaceable>,
|
---|
1990 | timestamp: 1229098279479515000, flags:
|
---|
1991 | Name: /VirtualBox/GuestAdd/Components/VBoxControl.exe, value: <replaceable>version-number</replaceable>r40720,
|
---|
1992 | timestamp: 1229098279651731000, flags:
|
---|
1993 | Name: /VirtualBox/GuestAdd/Components/VBoxHook.dll, value: <replaceable>version-number</replaceable>r40720,
|
---|
1994 | timestamp: 1229098279804835000, flags:
|
---|
1995 | Name: /VirtualBox/GuestAdd/Components/VBoxDisp.dll, value: <replaceable>version-number</replaceable>r40720,
|
---|
1996 | timestamp: 1229098279880611000, flags:
|
---|
1997 | Name: /VirtualBox/GuestAdd/Components/VBoxMRXNP.dll, value: <replaceable>version-number</replaceable>r40720,
|
---|
1998 | timestamp: 1229098279882618000, flags:
|
---|
1999 | Name: /VirtualBox/GuestAdd/Components/VBoxService.exe, value: <replaceable>version-number</replaceable>r40720,
|
---|
2000 | timestamp: 1229098279883195000, flags:
|
---|
2001 | Name: /VirtualBox/GuestAdd/Components/VBoxTray.exe, value: <replaceable>version-number</replaceable>r40720,
|
---|
2002 | timestamp: 1229098279885027000, flags:
|
---|
2003 | Name: /VirtualBox/GuestAdd/Components/VBoxGuest.sys, value: <replaceable>version-number</replaceable>r40720,
|
---|
2004 | timestamp: 1229098279886838000, flags:
|
---|
2005 | Name: /VirtualBox/GuestAdd/Components/VBoxMouse.sys, value: <replaceable>version-number</replaceable>r40720,
|
---|
2006 | timestamp: 1229098279890600000, flags:
|
---|
2007 | Name: /VirtualBox/GuestAdd/Components/VBoxSF.sys, value: <replaceable>version-number</replaceable>r40720,
|
---|
2008 | timestamp: 1229098279893056000, flags:
|
---|
2009 | Name: /VirtualBox/GuestAdd/Components/VBoxVideo.sys, value: <replaceable>version-number</replaceable>r40720,
|
---|
2010 | timestamp: 1229098279895767000, flags:
|
---|
2011 | Name: /VirtualBox/GuestInfo/OS/LoggedInUsers, value: 1,
|
---|
2012 | timestamp: 1229099826317660000, flags:
|
---|
2013 | Name: /VirtualBox/GuestInfo/OS/NoLoggedInUsers, value: false,
|
---|
2014 | timestamp: 1229098455580553000, flags:
|
---|
2015 | Name: /VirtualBox/GuestInfo/Net/Count, value: 1,
|
---|
2016 | timestamp: 1229099826299785000, flags:
|
---|
2017 | Name: /VirtualBox/HostInfo/GUI/LanguageID, value: C,
|
---|
2018 | timestamp: 1229098151272771000, flags:
|
---|
2019 | Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 192.168.2.102,
|
---|
2020 | timestamp: 1229099826300088000, flags:
|
---|
2021 | Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 255.255.255.255,
|
---|
2022 | timestamp: 1229099826300220000, flags:
|
---|
2023 | Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0,
|
---|
2024 | timestamp: 1229099826300350000, flags:
|
---|
2025 | Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up,
|
---|
2026 | timestamp: 1229099826300524000, flags:
|
---|
2027 | Name: /VirtualBox/GuestInfo/OS/LoggedInUsersList, value: username,
|
---|
2028 | timestamp: 1229099826317386000, flags:</screen>
|
---|
2029 |
|
---|
2030 | <para>
|
---|
2031 | To query the value of a single property, use the
|
---|
2032 | <command>get</command> subcommand as follows:
|
---|
2033 | </para>
|
---|
2034 |
|
---|
2035 | <screen>$ VBoxManage guestproperty get "Windows Vista III" "/VirtualBox/GuestInfo/OS/Product"
|
---|
2036 | VirtualBox Command Line Management Interface Version <replaceable>version-number</replaceable>
|
---|
2037 | Copyright (C) 2005-2022 Oracle and/or its affiliates
|
---|
2038 |
|
---|
2039 | Value: Windows Vista Business Edition</screen>
|
---|
2040 |
|
---|
2041 | <para>
|
---|
2042 | To add or change guest properties from the guest, use the tool
|
---|
2043 | <command>VBoxControl</command>. This tool is included in the Guest
|
---|
2044 | Additions. When started from a Linux guest, this tool requires
|
---|
2045 | root privileges for security reasons.
|
---|
2046 | </para>
|
---|
2047 |
|
---|
2048 | <screen>$ sudo VBoxControl guestproperty enumerate
|
---|
2049 | VirtualBox Guest Additions Command Line Management Interface Version <replaceable>version-number</replaceable>
|
---|
2050 | Copyright (C) 2005-2022 Oracle and/or its affiliates
|
---|
2051 |
|
---|
2052 | Name: /VirtualBox/GuestInfo/OS/Release, value: 2.6.28-18-generic,
|
---|
2053 | timestamp: 1265813265835667000, flags: <NULL>
|
---|
2054 | Name: /VirtualBox/GuestInfo/OS/Version, value: #59-Ubuntu SMP Thu Jan 28 01:23:03 UTC 2010,
|
---|
2055 | timestamp: 1265813265836305000, flags: <NULL>
|
---|
2056 | ...</screen>
|
---|
2057 |
|
---|
2058 | <para>
|
---|
2059 | For more complex needs, you can use the &product-name; programming
|
---|
2060 | interfaces. See <xref linkend="VirtualBoxAPI" />.
|
---|
2061 | </para>
|
---|
2062 |
|
---|
2063 | <sect2 id="guestadd-guestprops-waits">
|
---|
2064 |
|
---|
2065 | <title>Using Guest Properties to Wait on VM Events</title>
|
---|
2066 |
|
---|
2067 | <para>
|
---|
2068 | The properties <literal>/VirtualBox/HostInfo/VBoxVer</literal>,
|
---|
2069 | <literal>/VirtualBox/HostInfo/VBoxVerExt</literal> or
|
---|
2070 | <literal>/VirtualBox/HostInfo/VBoxRev</literal> can be waited on
|
---|
2071 | to detect that the VM state was restored from saved state or
|
---|
2072 | snapshot:
|
---|
2073 | </para>
|
---|
2074 |
|
---|
2075 | <screen>$ VBoxControl guestproperty wait /VirtualBox/HostInfo/VBoxVer</screen>
|
---|
2076 |
|
---|
2077 | <para>
|
---|
2078 | Similarly the
|
---|
2079 | <literal>/VirtualBox/HostInfo/ResumeCounter</literal> can be
|
---|
2080 | used to detect that a VM was resumed from the paused state or
|
---|
2081 | saved state.
|
---|
2082 | </para>
|
---|
2083 |
|
---|
2084 | </sect2>
|
---|
2085 |
|
---|
2086 | </sect1>
|
---|
2087 |
|
---|
2088 | <sect1 id="guestadd-gc-file-manager">
|
---|
2089 |
|
---|
2090 | <title>Guest Control File Manager</title>
|
---|
2091 |
|
---|
2092 | <para>
|
---|
2093 | The Guest Control File Manager is a feature of the Guest Additions
|
---|
2094 | that enables easy copying and moving of files between a guest and
|
---|
2095 | the host system. Other file management operations provide support
|
---|
2096 | to create new folders and to rename or delete files.
|
---|
2097 | </para>
|
---|
2098 |
|
---|
2099 | <figure id="fig-guest-control-fm">
|
---|
2100 | <title>Guest Control File Manager</title>
|
---|
2101 | <mediaobject>
|
---|
2102 | <imageobject>
|
---|
2103 | <imagedata align="center" fileref="images/guest-fm.png"
|
---|
2104 | width="12cm" />
|
---|
2105 | </imageobject>
|
---|
2106 | </mediaobject>
|
---|
2107 | </figure>
|
---|
2108 |
|
---|
2109 | <para>
|
---|
2110 | The Guest Control File Manager works by mounting the host file
|
---|
2111 | system. Guest users must authenticate and create a guest session
|
---|
2112 | before they can transfer files.
|
---|
2113 | </para>
|
---|
2114 |
|
---|
2115 | <sect2 id="guestadd-gc-file-manager-using">
|
---|
2116 |
|
---|
2117 | <title>Using the Guest Control File Manager</title>
|
---|
2118 |
|
---|
2119 | <para>
|
---|
2120 | The following steps describe how to use the Guest Control File
|
---|
2121 | Manager.
|
---|
2122 | </para>
|
---|
2123 |
|
---|
2124 | <orderedlist>
|
---|
2125 |
|
---|
2126 | <listitem>
|
---|
2127 | <para>
|
---|
2128 | Open the Guest Control File Manager.
|
---|
2129 | </para>
|
---|
2130 |
|
---|
2131 | <para>
|
---|
2132 | In the guest VM, select
|
---|
2133 | <emphasis role="bold">Machine</emphasis>,
|
---|
2134 | <emphasis role="bold">File Manager</emphasis>.
|
---|
2135 | </para>
|
---|
2136 |
|
---|
2137 | <para>
|
---|
2138 | The left pane shows the files on the host system.
|
---|
2139 | </para>
|
---|
2140 | </listitem>
|
---|
2141 |
|
---|
2142 | <listitem>
|
---|
2143 | <para>
|
---|
2144 | Create a guest session.
|
---|
2145 | </para>
|
---|
2146 |
|
---|
2147 | <para>
|
---|
2148 | At the bottom of the Guest Control File Manager, enter
|
---|
2149 | authentication credentials for a user on the guest system.
|
---|
2150 | </para>
|
---|
2151 |
|
---|
2152 | <para>
|
---|
2153 | Click <emphasis role="bold">Create Session</emphasis>.
|
---|
2154 | </para>
|
---|
2155 |
|
---|
2156 | <para>
|
---|
2157 | The contents of the guest VM file system appears in the
|
---|
2158 | right pane of the Guest Control File Manager.
|
---|
2159 | </para>
|
---|
2160 | </listitem>
|
---|
2161 |
|
---|
2162 | <listitem>
|
---|
2163 | <para>
|
---|
2164 | Transfer files between the guest and the host system by
|
---|
2165 | using the move and copy file transfer icons.
|
---|
2166 | </para>
|
---|
2167 |
|
---|
2168 | <para>
|
---|
2169 | You can copy and move files from a guest to the host system
|
---|
2170 | or from the host system to the guest.
|
---|
2171 | </para>
|
---|
2172 | </listitem>
|
---|
2173 |
|
---|
2174 | <listitem>
|
---|
2175 | <para>
|
---|
2176 | Close the Guest Control File Manager.
|
---|
2177 | </para>
|
---|
2178 |
|
---|
2179 | <para>
|
---|
2180 | Click <emphasis role="bold">Close</emphasis> to end the
|
---|
2181 | guest session.
|
---|
2182 | </para>
|
---|
2183 | </listitem>
|
---|
2184 |
|
---|
2185 | </orderedlist>
|
---|
2186 |
|
---|
2187 | </sect2>
|
---|
2188 |
|
---|
2189 | </sect1>
|
---|
2190 |
|
---|
2191 | <sect1 id="guestadd-guestcontrol">
|
---|
2192 |
|
---|
2193 | <title>Guest Control of Applications</title>
|
---|
2194 |
|
---|
2195 | <para>
|
---|
2196 | The Guest Additions enable starting of applications inside a guest
|
---|
2197 | VM from the host system. This feature can be used to automate
|
---|
2198 | deployment of software within the guest.
|
---|
2199 | </para>
|
---|
2200 |
|
---|
2201 | <para>
|
---|
2202 | For this to work, the application needs to be installed on the
|
---|
2203 | guest. No additional software needs to be installed on the host.
|
---|
2204 | Additionally, text mode output to stdout and stderr can be shown
|
---|
2205 | on the host for further processing. There are options to specify
|
---|
2206 | user credentials and a timeout value, in milliseconds, to limit
|
---|
2207 | the time the application is able to run.
|
---|
2208 | </para>
|
---|
2209 |
|
---|
2210 | <para>
|
---|
2211 | The Guest Additions for Windows allow for automatic updating. This
|
---|
2212 | applies for already installed Guest Additions versions. Also,
|
---|
2213 | copying files from host to the guest as well as remotely creating
|
---|
2214 | guest directories is available.
|
---|
2215 | </para>
|
---|
2216 |
|
---|
2217 | <para>
|
---|
2218 | To use these features, use the &product-name; command line. See
|
---|
2219 | <xref linkend="vboxmanage-guestcontrol" />.
|
---|
2220 | </para>
|
---|
2221 |
|
---|
2222 | </sect1>
|
---|
2223 |
|
---|
2224 | <sect1 id="guestadd-memory-usage">
|
---|
2225 |
|
---|
2226 | <title>Memory Overcommitment</title>
|
---|
2227 |
|
---|
2228 | <para>
|
---|
2229 | In server environments with many VMs, the Guest Additions can be
|
---|
2230 | used to share physical host memory between several VMs. This
|
---|
2231 | reduces the total amount of memory in use by the VMs. If memory
|
---|
2232 | usage is the limiting factor and CPU resources are still
|
---|
2233 | available, this can help with running more VMs on each host.
|
---|
2234 | </para>
|
---|
2235 |
|
---|
2236 | <sect2 id="guestadd-balloon">
|
---|
2237 |
|
---|
2238 | <title>Memory Ballooning</title>
|
---|
2239 |
|
---|
2240 | <para>
|
---|
2241 | The Guest Additions can change the amount of host memory that a
|
---|
2242 | VM uses, while the machine is running. Because of how this is
|
---|
2243 | implemented, this feature is called <emphasis>memory
|
---|
2244 | ballooning</emphasis>.
|
---|
2245 | </para>
|
---|
2246 |
|
---|
2247 | <note>
|
---|
2248 | <itemizedlist>
|
---|
2249 |
|
---|
2250 | <listitem>
|
---|
2251 | <para>
|
---|
2252 | &product-name; supports memory ballooning only on 64-bit
|
---|
2253 | hosts. It is not supported on Mac OS X hosts.
|
---|
2254 | </para>
|
---|
2255 | </listitem>
|
---|
2256 |
|
---|
2257 | <listitem>
|
---|
2258 | <para>
|
---|
2259 | Memory ballooning does not work well with large pages
|
---|
2260 | enabled. To turn off large pages support for a VM, run
|
---|
2261 | <command>VBoxManage modifyvm
|
---|
2262 | <replaceable>vmname</replaceable> --large-pages
|
---|
2263 | off</command>
|
---|
2264 | </para>
|
---|
2265 | </listitem>
|
---|
2266 |
|
---|
2267 | </itemizedlist>
|
---|
2268 | </note>
|
---|
2269 |
|
---|
2270 | <para>
|
---|
2271 | Normally, to change the amount of memory allocated to a virtual
|
---|
2272 | machine, you have to shut down the virtual machine entirely and
|
---|
2273 | modify its settings. With memory ballooning, memory that was
|
---|
2274 | allocated for a virtual machine can be given to another virtual
|
---|
2275 | machine without having to shut the machine down.
|
---|
2276 | </para>
|
---|
2277 |
|
---|
2278 | <para>
|
---|
2279 | When memory ballooning is requested, the &product-name; Guest
|
---|
2280 | Additions, which run inside the guest, allocate physical memory
|
---|
2281 | from the guest operating system on the kernel level and lock
|
---|
2282 | this memory down in the guest. This ensures that the guest will
|
---|
2283 | not use that memory any longer. No guest applications can
|
---|
2284 | allocate it, and the guest kernel will not use it either.
|
---|
2285 | &product-name; can then reuse this memory and give it to another
|
---|
2286 | virtual machine.
|
---|
2287 | </para>
|
---|
2288 |
|
---|
2289 | <para>
|
---|
2290 | The memory made available through the ballooning mechanism is
|
---|
2291 | only available for reuse by &product-name;. It is
|
---|
2292 | <emphasis>not</emphasis> returned as free memory to the host.
|
---|
2293 | Requesting balloon memory from a running guest will therefore
|
---|
2294 | not increase the amount of free, unallocated memory on the host.
|
---|
2295 | Effectively, memory ballooning is therefore a memory
|
---|
2296 | overcommitment mechanism for multiple virtual machines while
|
---|
2297 | they are running. This can be useful to temporarily start
|
---|
2298 | another machine, or in more complicated environments, for
|
---|
2299 | sophisticated memory management of many virtual machines that
|
---|
2300 | may be running in parallel depending on how memory is used by
|
---|
2301 | the guests.
|
---|
2302 | </para>
|
---|
2303 |
|
---|
2304 | <para>
|
---|
2305 | At this time, memory ballooning is only supported through
|
---|
2306 | <command>VBoxManage</command>. Use the following command to
|
---|
2307 | increase or decrease the size of the memory balloon within a
|
---|
2308 | running virtual machine that has Guest Additions installed:
|
---|
2309 | </para>
|
---|
2310 |
|
---|
2311 | <screen>VBoxManage controlvm "VM name" guestmemoryballoon n</screen>
|
---|
2312 |
|
---|
2313 | <para>
|
---|
2314 | where <replaceable>VM name</replaceable> is the name or UUID of
|
---|
2315 | the virtual machine in question and <replaceable>n</replaceable>
|
---|
2316 | is the amount of memory to allocate from the guest in megabytes.
|
---|
2317 | See <xref
|
---|
2318 | linkend="vboxmanage-controlvm" />.
|
---|
2319 | </para>
|
---|
2320 |
|
---|
2321 | <para>
|
---|
2322 | You can also set a default balloon that will automatically be
|
---|
2323 | requested from the VM every time after it has started up with
|
---|
2324 | the following command:
|
---|
2325 | </para>
|
---|
2326 |
|
---|
2327 | <screen>VBoxManage modifyvm "VM name" --guest-memory-balloon n</screen>
|
---|
2328 |
|
---|
2329 | <para>
|
---|
2330 | By default, no balloon memory is allocated. This is a VM
|
---|
2331 | setting, like other <command>modifyvm</command> settings, and
|
---|
2332 | therefore can only be set while the machine is shut down. See
|
---|
2333 | <xref
|
---|
2334 | linkend="vboxmanage-modifyvm" />.
|
---|
2335 | </para>
|
---|
2336 |
|
---|
2337 | </sect2>
|
---|
2338 |
|
---|
2339 | <sect2 id="guestadd-pagefusion">
|
---|
2340 |
|
---|
2341 | <title>Page Fusion</title>
|
---|
2342 |
|
---|
2343 | <para>
|
---|
2344 | Whereas memory ballooning simply reduces the amount of RAM that
|
---|
2345 | is available to a VM, Page Fusion works differently. It avoids
|
---|
2346 | memory duplication between several similar running VMs.
|
---|
2347 | </para>
|
---|
2348 |
|
---|
2349 | <para>
|
---|
2350 | In a server environment running several similar VMs on the same
|
---|
2351 | host, lots of memory pages are identical. For example, if the
|
---|
2352 | VMs are using identical operating systems. &product-name;'s Page
|
---|
2353 | Fusion technology can efficiently identify these identical
|
---|
2354 | memory pages and share them between multiple VMs.
|
---|
2355 | </para>
|
---|
2356 |
|
---|
2357 | <note>
|
---|
2358 | <para>
|
---|
2359 | &product-name; supports Page Fusion only on 64-bit hosts, and
|
---|
2360 | it is not supported on Mac OS X hosts. Page Fusion currently
|
---|
2361 | works only with Windows 2000 and later guests.
|
---|
2362 | </para>
|
---|
2363 | </note>
|
---|
2364 |
|
---|
2365 | <para>
|
---|
2366 | The more similar the VMs on a given host are, the more
|
---|
2367 | efficiently Page Fusion can reduce the amount of host memory
|
---|
2368 | that is in use. It therefore works best if all VMs on a host run
|
---|
2369 | identical operating systems. Instead of having a complete copy
|
---|
2370 | of each operating system in each VM, Page Fusion identifies the
|
---|
2371 | identical memory pages in use by these operating systems and
|
---|
2372 | eliminates the duplicates, sharing host memory between several
|
---|
2373 | machines. This is called <emphasis>deduplication</emphasis>. If
|
---|
2374 | a VM tries to modify a page that has been shared with other VMs,
|
---|
2375 | a new page is allocated again for that VM with a copy of the
|
---|
2376 | shared page. This is called <emphasis>copy on write</emphasis>.
|
---|
2377 | All this is fully transparent to the virtual machine.
|
---|
2378 | </para>
|
---|
2379 |
|
---|
2380 | <para>
|
---|
2381 | You may be familiar with this kind of memory overcommitment from
|
---|
2382 | other hypervisor products, which call this feature
|
---|
2383 | <emphasis>page sharing</emphasis> or <emphasis>same page
|
---|
2384 | merging</emphasis>. However, Page Fusion differs significantly
|
---|
2385 | from those other solutions, whose approaches have several
|
---|
2386 | drawbacks:
|
---|
2387 | </para>
|
---|
2388 |
|
---|
2389 | <itemizedlist>
|
---|
2390 |
|
---|
2391 | <listitem>
|
---|
2392 | <para>
|
---|
2393 | Traditional hypervisors scan <emphasis>all</emphasis> guest
|
---|
2394 | memory and compute checksums, also called hashes, for every
|
---|
2395 | single memory page. Then, they look for pages with identical
|
---|
2396 | hashes and compare the entire content of those pages. If two
|
---|
2397 | pages produce the same hash, it is very likely that the
|
---|
2398 | pages are identical in content. This process can take rather
|
---|
2399 | long, especially if the system is not idling. As a result,
|
---|
2400 | the additional memory only becomes available after a
|
---|
2401 | significant amount of time, such as hours or sometimes days.
|
---|
2402 | Even worse, this kind of page sharing algorithm generally
|
---|
2403 | consumes significant CPU resources and increases the
|
---|
2404 | virtualization overhead by 10 to 20%.
|
---|
2405 | </para>
|
---|
2406 |
|
---|
2407 | <para>
|
---|
2408 | Page Fusion in &product-name; uses logic in the
|
---|
2409 | &product-name; Guest Additions to quickly identify memory
|
---|
2410 | cells that are most likely identical across VMs. It can
|
---|
2411 | therefore achieve most of the possible savings of page
|
---|
2412 | sharing almost immediately and with almost no overhead.
|
---|
2413 | </para>
|
---|
2414 | </listitem>
|
---|
2415 |
|
---|
2416 | <listitem>
|
---|
2417 | <para>
|
---|
2418 | Page Fusion is also much less likely to be confused by
|
---|
2419 | identical memory that it will eliminate, just to learn
|
---|
2420 | seconds later that the memory will now change and having to
|
---|
2421 | perform a highly expensive and often service-disrupting
|
---|
2422 | reallocation.
|
---|
2423 | </para>
|
---|
2424 | </listitem>
|
---|
2425 |
|
---|
2426 | </itemizedlist>
|
---|
2427 |
|
---|
2428 | <para>
|
---|
2429 | At this time, Page Fusion can only be controlled with
|
---|
2430 | <command>VBoxManage</command>, and only while a VM is shut down.
|
---|
2431 | To enable Page Fusion for a VM, use the following command:
|
---|
2432 | </para>
|
---|
2433 |
|
---|
2434 | <screen>VBoxManage modifyvm "VM name" --page-fusion on</screen>
|
---|
2435 |
|
---|
2436 | <para>
|
---|
2437 | You can observe Page Fusion operation using some metrics.
|
---|
2438 | <literal>RAM/VMM/Shared</literal> shows the total amount of
|
---|
2439 | fused pages, whereas the per-VM metric
|
---|
2440 | <literal>Guest/RAM/Usage/Shared</literal> will return the amount
|
---|
2441 | of fused memory for a given VM. See
|
---|
2442 | <xref linkend="vboxmanage-metrics" /> for information on how to
|
---|
2443 | query metrics.
|
---|
2444 | </para>
|
---|
2445 |
|
---|
2446 | <note>
|
---|
2447 | <para>
|
---|
2448 | Enabling Page Fusion might indirectly increase the chances for
|
---|
2449 | malicious guests to successfully attack other VMs running on
|
---|
2450 | the same host. See <xref linkend="pot-insecure"/>.
|
---|
2451 | </para>
|
---|
2452 | </note>
|
---|
2453 |
|
---|
2454 | </sect2>
|
---|
2455 |
|
---|
2456 | </sect1>
|
---|
2457 |
|
---|
2458 | <sect1 id="guestadd-resizing">
|
---|
2459 |
|
---|
2460 | <title>Controlling Virtual Monitor Topology</title>
|
---|
2461 |
|
---|
2462 | <sect2 id="guestadd-resizing-linux">
|
---|
2463 |
|
---|
2464 | <title>X11/Wayland Desktop Environments</title>
|
---|
2465 |
|
---|
2466 | <para>
|
---|
2467 | The Guest Additions provide services for controlling the guest
|
---|
2468 | system's monitor topology. Monitor topology means the resolution
|
---|
2469 | of each virtual monitor and its state (disabled/enabled). The
|
---|
2470 | resolution of a virtual monitor can be modified from the host
|
---|
2471 | side either by resizing the window that hosts the virtual monitor,
|
---|
2472 | through the view menu or through
|
---|
2473 | <code>VBoxManage controlvm "vmname" setscreenlayout</code>.
|
---|
2474 | On guest operating systems with X11/Wayland desktops this is
|
---|
2475 | put into effect by either of two following services:
|
---|
2476 | </para>
|
---|
2477 |
|
---|
2478 | <screen>
|
---|
2479 | VBoxClient --vmsvga
|
---|
2480 | VBoxDRMClient
|
---|
2481 | </screen>
|
---|
2482 |
|
---|
2483 | <para>
|
---|
2484 | Here are some details about guest screen resolution control
|
---|
2485 | functionality:
|
---|
2486 | </para>
|
---|
2487 |
|
---|
2488 | <itemizedlist>
|
---|
2489 |
|
---|
2490 | <listitem>
|
---|
2491 | <para>
|
---|
2492 | On X11/Wayland desktops the resizing service is started during
|
---|
2493 | desktop session initialization, that is desktop login. On X11
|
---|
2494 | desktops <code>VBoxClient --vmsvga</code> handles screen
|
---|
2495 | topology through the RandR extension.
|
---|
2496 | On Wayland clients <code>VBoxDRMClient</code> is used. The
|
---|
2497 | decision is made automatically at each desktop session start.
|
---|
2498 | </para>
|
---|
2499 | </listitem>
|
---|
2500 | <listitem>
|
---|
2501 | <para>
|
---|
2502 | On 32 bit guest operating systems <code>VBoxDRMClient</code>
|
---|
2503 | is always used, in order to work around bugs.
|
---|
2504 | </para>
|
---|
2505 | </listitem>
|
---|
2506 | <listitem>
|
---|
2507 | <para>
|
---|
2508 | Since the mentioned monitor topology control services are
|
---|
2509 | initialized during the desktop session start, it is impossible
|
---|
2510 | to control the monitor resolution of display managers such as
|
---|
2511 | gdm, lightdm. This default behavior can be changed by setting
|
---|
2512 | the guest property <code>/VirtualBox/GuestAdd/DRMResize</code>
|
---|
2513 | of the virtual machine to any value. Please refer to
|
---|
2514 | <xref linkend="guestadd-guestprops" /> for updating guest
|
---|
2515 | properties. When this guest property is set then
|
---|
2516 | <code>VBoxDRMClient</code> is started during the guest OS boot
|
---|
2517 | and stays active all the time, for both ithe display manager
|
---|
2518 | login screen and the desktop session.
|
---|
2519 | </para>
|
---|
2520 | </listitem>
|
---|
2521 |
|
---|
2522 | </itemizedlist>
|
---|
2523 |
|
---|
2524 | <sect3 id="guestadd-resizing-linux-limitations">
|
---|
2525 |
|
---|
2526 | <title>Known Limitations</title>
|
---|
2527 | <para>
|
---|
2528 | <code>VBoxDRMClient</code> is not able to handle arbitrary guest
|
---|
2529 | monitor topologies. Specifically, disabling a guest monitor
|
---|
2530 | (except the last one) invalidates the monitor topology due to
|
---|
2531 | limitations in the Linux kernel module <code>vmwgfx.ko</code>.
|
---|
2532 | iFor example, when the guest is configured to have 4 monitors
|
---|
2533 | it is not recommended to disable the 2nd or 3rd monitor.
|
---|
2534 | </para>
|
---|
2535 |
|
---|
2536 | </sect3>
|
---|
2537 |
|
---|
2538 | </sect2>
|
---|
2539 |
|
---|
2540 | </sect1>
|
---|
2541 |
|
---|
2542 | </chapter>
|
---|