VirtualBox

source: vbox/trunk/doc/manual/en_US/user_AdvancedTopics.xml@ 96301

Last change on this file since 96301 was 96301, checked in by vboxsync, 3 years ago

doc: comment fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 247.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright (C) 2006-2022 Oracle Corporation
4
5 This file is part of VirtualBox Open Source Edition (OSE), as
6 available from http://www.215389.xyz. This file is free software;
7 you can redistribute it and/or modify it under the terms of the GNU
8 General Public License (GPL) as published by the Free Software
9 Foundation, in version 2 as it comes in the "COPYING" file of the
10 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
11 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
12-->
13<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
14"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
15<!ENTITY % all.entities SYSTEM "all-entities.ent">
16%all.entities;
17]>
18<chapter id="AdvancedTopics">
19
20 <title>Advanced Topics</title>
21
22 <sect1 id="autologon">
23
24 <title>Automated Guest Logins</title>
25
26 <para>
27 &product-name; provides Guest Addition modules for Windows, Linux,
28 and Oracle Solaris to enable automated logins on the guest.
29 </para>
30
31 <para>
32 When a guest operating system is running in a virtual machine, it
33 might be desirable to perform coordinated and automated logins
34 using credentials passed from the host. Credentials are user
35 name, password, and domain name, where each value might be empty.
36 </para>
37
38 <sect2 id="autologon_win">
39
40 <title>Automated Windows Guest Logins</title>
41
42 <para>
43 Windows provides a modular system login subsystem, called
44 Winlogon, which can be customized and extended by means of
45 so-called GINA (Graphical Identification and Authentication)
46 modules. In Windows Vista and later releases, the GINA modules
47 were replaced with a new mechanism called credential providers.
48 The &product-name; Guest Additions for Windows come with both, a
49 GINA and a credential provider module, and therefore enable any
50 Windows guest to perform automated logins.
51 </para>
52
53 <para>
54 To activate the &product-name; GINA or credential provider
55 module, install the Guest Additions using the command line
56 switch <option>/with_autologon</option>. All the following
57 manual steps required for installing these modules will be then
58 done by the installer.
59 </para>
60
61 <para>
62 To manually install the &product-name; GINA module, extract the
63 Guest Additions as shown in
64 <xref linkend="windows-guest-file-extraction" />, and copy the
65 <filename>VBoxGINA.dll</filename> file to the Windows
66 <filename>SYSTEM32</filename> directory. In the registry, create
67 the following key with a value of
68 <filename>VBoxGINA.dll</filename>:
69 </para>
70
71<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL</screen>
72
73 <note>
74 <para>
75 The &product-name; GINA module is implemented as a wrapper
76 around the <filename>MSGINA.DLL</filename> standard Windows
77 GINA module. As a result, it might not work correctly with
78 third-party GINA modules.
79 </para>
80 </note>
81
82 <para>
83 To manually install the &product-name; credential provider
84 module, extract the Guest Additions as shown in
85 <xref linkend="windows-guest-file-extraction" /> and copy the
86 <filename>VBoxCredProv.dll</filename> file to the Windows
87 <filename>SYSTEM32</filename> directory. In the registry, create
88 the following keys:
89 </para>
90
91<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
92Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
93
94HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
95
96HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32</screen>
97
98 <para>
99 All default values, the key named <literal>Default</literal>,
100 must be set to <literal>VBoxCredProv</literal>.
101 </para>
102
103 <para>
104 Create the following string and assign it a value of
105 <literal>Apartment</literal>.
106 </para>
107
108<screen>HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel</screen>
109
110 <para>
111 To set credentials, use the following command on a
112 <emphasis>running</emphasis> VM:
113 </para>
114
115<screen>$ VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST"</screen>
116
117 <para>
118 While the VM is running, the credentials can be queried by the
119 &product-name; login modules, GINA or credential provider, using
120 the &product-name; Guest Additions device driver. When Windows
121 is in <emphasis>logged out</emphasis> mode, the login modules
122 will constantly poll for credentials and if they are present, a
123 login will be attempted. After retrieving the credentials, the
124 login modules will erase them so that the above command will
125 have to be repeated for subsequent logins.
126 </para>
127
128 <para>
129 For security reasons, credentials are not stored in any
130 persistent manner and will be lost when the VM is reset. Also,
131 the credentials are write-only. There is no way to retrieve the
132 credentials from the host side. Credentials can be reset from
133 the host side by setting empty values.
134 </para>
135
136 <para>
137 Depending on the Windows guest version, the following
138 restrictions apply:
139 </para>
140
141 <itemizedlist>
142
143 <listitem>
144 <para>
145 For <emphasis role="bold">Windows XP guests.</emphasis> The
146 login subsystem needs to be configured to use the classic
147 login dialog, as the &product-name; GINA module does not
148 support the Windows XP-style welcome dialog.
149 </para>
150 </listitem>
151
152 <listitem>
153 <para>
154 <emphasis role="bold">Windows Vista, Windows 7, Windows 8,
155 and Windows 10 guests.</emphasis> The login subsystem does
156 not support the so-called Secure Attention Sequence,
157 <literal>Ctrl+Alt+Del</literal>. As a result, the guest's
158 group policy settings need to be changed to not use the
159 Secure Attention Sequence. Also, the user name given is only
160 compared to the true user name, not the user friendly name.
161 This means that when you rename a user, you still have to
162 supply the original user name as Windows never renames user
163 accounts internally.
164 </para>
165 </listitem>
166
167 <listitem>
168 <para>
169 Automatic login handling of the built-in
170 <emphasis role="bold">Windows Remote Desktop
171 Service</emphasis>, formerly known as Terminal Services, is
172 disabled by default. To enable it, create the following
173 registry key with a <literal>DWORD</literal> value of
174 <literal>1</literal>.
175 </para>
176
177<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox Guest Additions\AutoLogon</screen>
178 </listitem>
179
180 </itemizedlist>
181
182 <para>
183 The following command forces &product-name; to keep the
184 credentials after they were read by the guest and on VM reset:
185 </para>
186
187<screen>$ VBoxManage setextradata "Windows XP" VBoxInternal/Devices/VMMDev/0/Config/KeepCredentials 1</screen>
188
189 <para>
190 Note that this is a potential security risk, as a malicious
191 application running on the guest could request this information
192 using the proper interface.
193 </para>
194
195 </sect2>
196
197 <sect2 id="autologon_unix">
198
199 <title>Automated Linux and UNIX Guest Logins</title>
200
201 <para>
202 &product-name; provides a custom PAM module (Pluggable
203 Authentication Module) which can be used to perform automated
204 guest logins on platforms which support this framework.
205 Virtually all modern Linux and UNIX distributions rely on PAM.
206 </para>
207
208 <para>
209 For automated logins on Ubuntu, or Ubuntu-derived, distributions
210 using LightDM as the display manager. See
211 <xref linkend="autologon_unix_lightdm" />.
212 </para>
213
214 <para>
215 The <filename>pam_vbox.so</filename> module itself
216 <emphasis>does not</emphasis> do an actual verification of the
217 credentials passed to the guest OS. Instead it relies on other
218 modules such as <filename>pam_unix.so</filename> or
219 <filename>pam_unix2.so</filename> down in the PAM stack to do
220 the actual validation using the credentials retrieved by
221 <filename>pam_vbox.so</filename>. Therefore
222 <filename>pam_vbox.so</filename> has to be on top of the
223 authentication PAM service list.
224 </para>
225
226 <note>
227 <para>
228 The <filename>pam_vbox.so</filename> module only supports the
229 <literal>auth</literal> primitive. Other primitives such as
230 <literal>account</literal>, <literal>session</literal>, or
231 <literal>password</literal> are not supported.
232 </para>
233 </note>
234
235 <para>
236 The <filename>pam_vbox.so</filename> module is shipped as part
237 of the Guest Additions but it is not installed and/or activated
238 on the guest OS by default. In order to install it, it has to be
239 copied from
240 <filename>/opt/VBoxGuestAdditions-<replaceable>version</replaceable>/other/</filename>
241 to the security modules directory. This is usually
242 <filename>/lib/security/</filename> on 32-bit Linux guests or
243 <filename>/lib64/security/</filename> on 64-bit Linux guests.
244 Please refer to your guest OS documentation for the correct PAM
245 module directory.
246 </para>
247
248 <para>
249 For example, to use <filename>pam_vbox.so</filename> with a
250 Ubuntu Linux guest OS and the GNOME Desktop Manager (GDM) to log
251 in users automatically with the credentials passed by the host,
252 configure the guest OS as follows:
253 </para>
254
255 <orderedlist>
256
257 <listitem>
258 <para>
259 Copy the <filename>pam_vbox.so</filename> module to the
260 security modules directory. In this case,
261 <filename>/lib/security</filename>.
262 </para>
263 </listitem>
264
265 <listitem>
266 <para>
267 Edit the PAM configuration file for GDM, found at
268 <filename>/etc/pam.d/gdm</filename>. Add the line
269 <literal>auth requisite pam_vbox.so</literal> at the top.
270 Additionally, in most Linux distributions there is a file
271 called <filename>/etc/pam.d/common-auth</filename>. This
272 file is included in many other services, like the GDM file
273 mentioned above. There you also have to add the line
274 <literal>auth requisite pam_vbox.so</literal>.
275 </para>
276 </listitem>
277
278 <listitem>
279 <para>
280 If authentication against the shadow database using
281 <filename>pam_unix.so</filename> or
282 <filename>pam_unix2.so</filename> is desired, the argument
283 <literal>try_first_pass</literal> for
284 <filename>pam_unix.so</filename> or
285 <literal>use_first_pass</literal> for
286 <filename>pam_unix2.so</filename> is needed in order to pass
287 the credentials from the &product-name; module to the shadow
288 database authentication module. For Ubuntu, this needs to be
289 added to <filename>/etc/pam.d/common-auth</filename>, to the
290 end of the line referencing
291 <filename>pam_unix.so</filename>. This argument tells the
292 PAM module to use credentials already present in the stack,
293 such as the ones provided by the &product-name; PAM module.
294 </para>
295 </listitem>
296
297 </orderedlist>
298
299 <warning>
300 <para>
301 An incorrectly configured PAM stack can effectively prevent
302 you from logging into your guest system.
303 </para>
304 </warning>
305
306 <para>
307 To make deployment easier, you can pass the argument
308 <literal>debug</literal> right after the
309 <filename>pam_vbox.so</filename> statement. Debug log output
310 will then be recorded using syslog.
311 </para>
312
313 <note>
314 <para>
315 By default, <command>pam_vbox</command> does not wait for
316 credentials to arrive from the host. When a login prompt is
317 shown, for example by GDM/KDM or the text console, and
318 <command>pam_vbox</command> does not yet have credentials it
319 does not wait until they arrive. Instead the next module in
320 the PAM stack, depending on the PAM configuration, will have
321 the chance for authentication.
322 </para>
323 </note>
324
325 <para>
326 <command>pam_vbox</command> supports various guest property
327 parameters that are located in
328 <filename>/VirtualBox/GuestAdd/PAM/</filename>. These parameters
329 allow <command>pam_vbox</command> to wait for credentials to be
330 provided by the host and optionally can show a message while
331 waiting for those. The following guest properties can be set:
332 </para>
333
334 <itemizedlist>
335
336 <listitem>
337 <para>
338 <literal>CredsWait</literal>: Set to 1 if
339 <command>pam_vbox</command> should start waiting until
340 credentials arrive from the host. Until then no other
341 authentication methods such as manually logging in will be
342 available. If this property is empty or gets deleted no
343 waiting for credentials will be performed and
344 <command>pam_vbox</command> will act like before. This
345 property must be set read-only for the guest
346 (<literal>RDONLYGUEST</literal>).
347 </para>
348 </listitem>
349
350 <listitem>
351 <para>
352 <literal>CredsWaitAbort</literal>: Aborts waiting for
353 credentials when set to any value. Can be set from host and
354 the guest.
355 </para>
356 </listitem>
357
358 <listitem>
359 <para>
360 <literal>CredsWaitTimeout</literal>: Timeout, in seconds, to
361 let <command>pam_vbox</command> wait for credentials to
362 arrive. When no credentials arrive within this timeout,
363 authentication of <command>pam_vbox</command> will be set to
364 failed and the next PAM module in chain will be asked. If
365 this property is not specified, set to 0 or an invalid
366 value, an infinite timeout will be used. This property must
367 be set read-only for the guest
368 (<literal>RDONLYGUEST</literal>).
369 </para>
370 </listitem>
371
372 </itemizedlist>
373
374 <para>
375 To customize <command>pam_vbox</command> further there are the
376 following guest properties:
377 </para>
378
379 <itemizedlist>
380
381 <listitem>
382 <para>
383 <literal>CredsMsgWaiting</literal>: Custom message showed
384 while pam_vbox is waiting for credentials from the host.
385 This property must be set read-only for the guest
386 (<literal>RDONLYGUEST</literal>).
387 </para>
388 </listitem>
389
390 <listitem>
391 <para>
392 <literal>CredsMsgWaitTimeout</literal>: Custom message
393 showed when waiting for credentials by
394 <command>pam_vbox</command> has timed out. For example, they
395 did not arrive within time. This property must be set
396 read-only for the guest (<literal>RDONLYGUEST</literal>).
397 </para>
398 </listitem>
399
400 </itemizedlist>
401
402 <note>
403 <para>
404 If a <command>pam_vbox</command> guest property does not have
405 the correct flag set (<literal>RDONLYGUEST</literal>) the
406 property is ignored and, depending on the property, a default
407 value will be used. This can result in pam_vbox not waiting
408 for credentials. Consult the appropriate syslog file for more
409 information and use the <literal>debug</literal> option.
410 </para>
411 </note>
412
413 <sect3 id="autologon_unix_lightdm">
414
415 <title>&product-name; Greeter for Ubuntu/LightDM</title>
416
417 <para>
418 &product-name; comes with a greeter module, named
419 <command>vbox-greeter</command>, that can be used with
420 LightDM. LightDM is the default display manager for Ubuntu
421 Linux and therefore can also be used for automated guest
422 logins.
423 </para>
424
425 <para>
426 <command>vbox-greeter</command> does not need the
427 <command>pam_vbox</command> module described in
428 <xref linkend="autologon_unix"/>in order to function. It comes
429 with its own authentication mechanism provided by LightDM.
430 However, to provide maximum flexibility both modules can be
431 used together on the same guest.
432 </para>
433
434 <para>
435 As with the <command>pam_vbox</command> module,
436 <command>vbox-greeter</command> is shipped as part of the
437 Guest Additions but it is not installed or activated on the
438 guest OS by default. To install
439 <command>vbox-greeter</command> automatically upon Guest
440 Additions installation, use the
441 <option>--with-autologon</option> option when starting the
442 <command>VBoxLinuxAdditions.run</command> file:
443 </para>
444
445<screen># ./VBoxLinuxAdditions.run -- --with-autologon</screen>
446
447 <para>
448 For manual or postponed installation, copy the
449 <filename>vbox-greeter.desktop</filename> file from
450 <filename>/opt/VBoxGuestAdditions-&lt;version&gt;/other/</filename>
451 to the <filename>xgreeters</filename> directory, which is
452 usually <filename>/usr/share/xgreeters/</filename>. See your
453 guest OS documentation for the name of the correct LightDM
454 greeter directory.
455 </para>
456
457 <para>
458 The <command>vbox-greeter</command> module is installed by the
459 &product-name; Guest Additions installer and is located in
460 <filename>/usr/sbin/</filename>. To enable
461 <command>vbox-greeter</command> as the standard greeter
462 module, edit the file
463 <filename>/etc/lightdm/lightdm.conf</filename> as follows:
464 </para>
465
466<screen>[SeatDefaults]
467greeter-session=vbox-greeter</screen>
468
469 <note>
470 <itemizedlist>
471
472 <listitem>
473 <para>
474 The LightDM server must be fully restarted in order for
475 <command>vbox-greeter</command> to be used as the
476 default greeter. As <literal>root</literal> on Ubuntu,
477 run <command>service lightdm --full-restart</command> or
478 restart the guest.
479 </para>
480 </listitem>
481
482 <listitem>
483 <para>
484 <command>vbox-greeter</command> is independent of the
485 graphical session you choose, such as Gnome, KDE, or
486 Unity. However, <command>vbox-greeter</command> does
487 require FLTK 1.3 or later to implement its own user
488 interface.
489 </para>
490 </listitem>
491
492 </itemizedlist>
493 </note>
494
495 <para>
496 There are numerous guest properties which can be used to
497 further customize the login experience. For automatically
498 logging in users, the same guest properties apply as for
499 <command>pam_vbox</command>. See
500 <xref linkend="autologon_unix" />.
501 </para>
502
503 <para>
504 In addition to the previously mentioned guest properties,
505 <command>vbox-greeter</command> enables you to further
506 customize its user interface. The following guest properties
507 are located in the
508 <filename>/VirtualBox/GuestAdd/Greeter/</filename> directory:
509 </para>
510
511 <itemizedlist>
512
513 <listitem>
514 <para>
515 <literal>HideRestart</literal>: Set to 1 if
516 <command>vbox-greeter</command> should hide the button to
517 restart the guest. This property must be set read-only for
518 the guest (<literal>RDONLYGUEST</literal>).
519 </para>
520 </listitem>
521
522 <listitem>
523 <para>
524 <literal>HideShutdown</literal>: Set to 1 if
525 <command>vbox-greeter</command> should hide the button to
526 shutdown the guest. This property must be set read-only
527 for the guest (<literal>RDONLYGUEST</literal>).
528 </para>
529 </listitem>
530
531 <listitem>
532 <para>
533 <literal>BannerPath</literal>: Path to a
534 <filename>.PNG</filename> file to use as a banner image on
535 the top of the greeter. The image size must be 460 x 90
536 pixels, any bit depth. This property must be set read-only
537 for the guest (<literal>RDONLYGUEST</literal>).
538 </para>
539 </listitem>
540
541 <listitem>
542 <para>
543 <literal>UseTheming</literal>: Set to 1 for turning on the
544 following theming options. This property must be set
545 read-only for the guest (<literal>RDONLYGUEST</literal>).
546 </para>
547 </listitem>
548
549 <listitem>
550 <para>
551 <literal>Theme/BackgroundColor</literal>: Hexadecimal
552 RRGGBB color for the background. This property must be set
553 read-only for the guest (<literal>RDONLYGUEST</literal>).
554 </para>
555 </listitem>
556
557 <listitem>
558 <para>
559 <literal>Theme/LogonDialog/HeaderColor</literal>:
560 Hexadecimal RRGGBB foreground color for the header text.
561 This property must be set read-only for the guest
562 (<literal>RDONLYGUEST</literal>).
563 </para>
564 </listitem>
565
566 <listitem>
567 <para>
568 <literal>Theme/LogonDialog/BackgroundColor</literal>:
569 Hexadecimal RRGGBB color for the login dialog background.
570 This property must be set read-only for the guest
571 (<literal>RDONLYGUEST</literal>).
572 </para>
573 </listitem>
574
575 <listitem>
576 <para>
577 <literal>Theme/LogonDialog/ButtonColor</literal>:
578 Hexadecimal RRGGBB background color for the login dialog
579 button. This property must be set read-only for the guest
580 (<literal>RDONLYGUEST</literal>).
581 </para>
582 </listitem>
583
584 </itemizedlist>
585
586 <note>
587 <para>
588 The same restrictions for the guest properties above apply
589 as for the ones specified in the <literal>pam_vbox</literal>
590 section.
591 </para>
592 </note>
593
594 </sect3>
595
596 </sect2>
597
598 </sect1>
599
600 <sect1 id="adv-config-win-guest">
601
602 <title>Advanced Configuration for Windows Guests</title>
603
604 <sect2 id="sysprep">
605
606 <title>Automated Windows System Preparation</title>
607
608 <para>
609 Microsoft offers a system preparation tool called Sysprep, to
610 prepare a Windows system for deployment or redistribution. Some
611 Windows releases include Sysprep on the installation medium, but
612 the tool is also available for download from the Microsoft web
613 site. In a standard For most Windows versions, Sysprep is
614 included in a default installation. Sysprep mainly consists of
615 an executable called <command>sysprep.exe</command> which is
616 invoked by the user to put the Windows installation into
617 preparation mode.
618 </para>
619
620 <para>
621 The Guest Additions offer a way to launch a system preparation
622 on the guest operating system in an automated way, controlled
623 from the host system. See
624 <xref linkend="guestadd-guestcontrol" /> for details of how to
625 use this feature with the special identifier
626 <literal>sysprep</literal> as the program to execute, along with
627 the user name <literal>sysprep</literal> and password
628 <literal>sysprep</literal> for the credentials. Sysprep is then
629 started with the required system rights.
630 </para>
631
632 <note>
633 <para>
634 Specifying the location of <command>sysprep.exe</command> is
635 <emphasis role="bold">not possible</emphasis>. Instead the
636 following paths are used, based on the Windows release:
637 </para>
638
639 <itemizedlist>
640
641 <listitem>
642 <para>
643 <filename>C:\sysprep\sysprep.exe</filename> for Windows XP
644 and earlier
645 </para>
646 </listitem>
647
648 <listitem>
649 <para>
650 <filename>%WINDIR%\System32\sysprep\sysprep.exe</filename>
651 for Windows Vista and later
652 </para>
653 </listitem>
654
655 </itemizedlist>
656
657 <para>
658 The Guest Additions will automatically use the appropriate
659 path to execute the system preparation tool.
660 </para>
661 </note>
662
663 </sect2>
664
665 </sect1>
666
667 <sect1 id="adv-config-linux-guest">
668
669 <title>Advanced Configuration for Linux and Oracle Solaris Guests</title>
670
671 <sect2 id="linux-guest-manual-setup">
672
673 <title>Manual Setup of Selected Guest Services on Linux</title>
674
675 <para>
676 The &product-name; Guest Additions contain several different
677 drivers. If you do not want to configure them all, use the
678 following command to install the Guest Additions:
679 </para>
680
681<screen>$ sh ./VBoxLinuxAdditions.run no_setup</screen>
682
683 <para>
684 After running this script, run the <command>rcvboxadd
685 setup</command> command as <literal>root</literal> to compile
686 the kernel modules.
687 </para>
688
689 <para>
690 On some 64-bit guests, you must replace <filename>lib</filename>
691 with <filename>lib64</filename>. On older guests that do not run
692 the <command>udev</command> service, you must add the
693 <command>vboxadd</command> service to the default runlevel to
694 ensure that the modules are loaded.
695 </para>
696
697 <para>
698 To set up the time synchronization service, add the
699 <command>vboxadd-service</command> service to the default
700 runlevel. To set up the X11 and OpenGL part of the Guest
701 Additions, run the <command>rcvboxadd-x11 setup</command>
702 command. Note that you do not need to enable additional
703 services.
704 </para>
705
706 <para>
707 Use the <command>rcvboxadd setup</command> to recompile the
708 guest kernel modules.
709 </para>
710
711 <para>
712 After compilation, reboot your guest to ensure that the new
713 modules are loaded.
714 </para>
715
716 </sect2>
717
718 <sect2 id="guestxorgsetup">
719
720 <title>Guest Graphics and Mouse Driver Setup in Depth</title>
721
722 <para>
723 This section assumes that you are familiar with configuring the
724 X.Org server using xorg.conf and optionally the newer mechanisms
725 using hal or udev and xorg.conf.d. If not you can learn about
726 them by studying the documentation which comes with X.Org.
727 </para>
728
729 <para>
730 The &product-name; Guest Additions includes drivers for X.Org.
731 By default these drivers are in the following directory:
732 </para>
733
734 <para>
735 <filename>/opt/VBoxGuestAdditions-<replaceable>version</replaceable>/other/</filename>
736 </para>
737
738 <para>
739 The correct versions for the X server are symbolically linked
740 into the X.Org driver directories.
741 </para>
742
743 <para>
744 For graphics integration to work correctly, the X server must
745 load the <literal>vboxvideo</literal> driver. Many recent X
746 server versions look for it automatically if they see that they
747 are running in &product-name;. For an optimal user experience,
748 the guest kernel drivers must be loaded and the Guest Additions
749 tool <command>VBoxClient</command> must be running as a client
750 in the X session.
751 </para>
752
753 <para>
754 For mouse integration to work correctly, the guest kernel
755 drivers must be loaded. In addition, for legacy X servers the
756 correct <literal>vboxmouse</literal> driver must be loaded and
757 associated with <filename>/dev/mouse</filename> or
758 <filename>/dev/psaux</filename>. For most guests, a driver for a
759 PS/2 mouse must be loaded and the correct vboxmouse driver must
760 be associated with <filename>/dev/vboxguest</filename>.
761 </para>
762
763 <para>
764 The &product-name; guest graphics driver can use any graphics
765 configuration for which the virtual resolution fits into the
766 virtual video memory allocated to the virtual machine, minus a
767 small amount used by the guest driver, as described in
768 <xref linkend="settings-display" />. The driver will offer a
769 range of standard modes at least up to the default guest
770 resolution for all active guest monitors. The default mode can
771 be changed by setting the output property VBOX_MODE to
772 "&lt;width&gt;x&lt;height&gt;" for any guest monitor. When
773 VBoxClient and the kernel drivers are active this is done
774 automatically when the host requests a mode change. The driver
775 for older versions can only receive new modes by querying the
776 host for requests at regular intervals.
777 </para>
778
779 <para>
780 With legacy X Servers before version 1.3, you can also add your
781 own modes to the X server configuration file. Add them to the
782 "Modes" list in the "Display" subsection of the "Screen"
783 section. For example, the following section has a custom
784 2048x800 resolution mode added:
785 </para>
786
787<screen>Section "Screen"
788 Identifier "Default Screen"
789 Device "VirtualBox graphics card"
790 Monitor "Generic Monitor"
791 DefaultDepth 24
792 SubSection "Display"
793 Depth 24
794 Modes "2048x800" "800x600" "640x480"
795 EndSubSection
796EndSection</screen>
797
798 </sect2>
799
800 </sect1>
801
802 <sect1 id="cpuhotplug">
803
804 <title>CPU Hot-Plugging</title>
805
806 <para>
807 With virtual machines running modern server operating systems,
808 &product-name; supports CPU hot-plugging.
809 </para>
810
811 <para>
812 On a physical computer CPU hot-plugging would mean that a CPU can
813 be added or removed while the machine is running. &product-name;
814 supports adding and removing of virtual CPUs while a virtual
815 machine is running.
816 </para>
817
818 <para>
819 CPU hot-plugging works only with guest operating systems that
820 support the feature. So far this applies only to Linux and Windows
821 Server. Windows supports only hot-add, while Linux supports
822 hot-add and hot-remove. To use this feature with more than 8 CPUs,
823 a 64-bit Linux guest is required.
824 </para>
825
826 <para>
827 CPU hot-plugging is done using the <command>VBoxManage</command>
828 command-line interface. First, hot-plugging needs to be enabled
829 for a virtual machine:
830 </para>
831
832<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --cpu-hotplug on</screen>
833
834 <para>
835 The <option>--cpus</option> option is used to specify the maximum
836 number of CPUs that the virtual machine can have:
837 </para>
838
839<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --cpus 8</screen>
840
841 <para>
842 When the VM is off, you can then add and remove virtual CPUs with
843 the <command>VBoxManage modifyvm --plug-cpu</command> and
844 <command>VBoxManage modifyvm --unplug-cpu</command> commands, which
845 take the number of the virtual CPU as a parameter, as follows:
846 </para>
847
848<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --plug-cpu 3
849$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --unplug-cpu 3</screen>
850
851 <para>
852 Note that CPU 0 can never be removed.
853 </para>
854
855 <para>
856 While the VM is running, CPUs can be added and removed with the
857 <command>VBoxManage controlvm plugcpu</command> and
858 <command>VBoxManage controlvm unplugcpu</command> commands
859 instead, as follows:
860 </para>
861
862<screen>$ VBoxManage controlvm <replaceable>VM-name</replaceable> plugcpu 3
863$ VBoxManage controlvm <replaceable>VM-name</replaceable> unplugcpu 3</screen>
864
865 <para>
866 See <xref linkend="vboxmanage-modifyvm" /> and
867 <xref linkend="vboxmanage-controlvm" /> for details.
868 </para>
869
870 <para>
871 With Linux guests, the following applies:
872 </para>
873
874 <para>
875 To prevent ejection while the CPU is still used it has to be
876 ejected from within the guest before. The Linux Guest Additions
877 contain a service which receives hot-remove events and ejects the
878 CPU. Also, after a CPU is added to the VM it is not automatically
879 used by Linux. The Linux Guest Additions service will take care of
880 that if installed. If not a CPU can be started with the following
881 command:
882 </para>
883
884<screen>$ echo 1 &gt; /sys/devices/system/cpu/cpu&lt;id&gt;/online</screen>
885
886 </sect1>
887
888<!--<sect1 id="pcipassthrough">
889
890 <title>PCI Passthrough</title>
891
892 <para>
893 When running on Linux hosts with a kernel version later than
894 <literal>2.6.31</literal>, experimental host PCI devices
895 passthrough is available.
896 </para>
897
898 <note>
899 <para>
900 The PCI passthrough module is shipped as an &product-name;
901 extension package, which must be installed separately. See
902 <xref linkend="intro-installing" />.
903 </para>
904 </note>
905
906 <para>
907 This feature enables a guest to directly use physical PCI devices
908 on the host, even if host does not have drivers for this
909 particular device. Both, regular PCI and some PCI Express cards,
910 are supported. AGP and certain PCI Express cards are not supported
911 at the moment if they rely on Graphics Address Remapping Table
912 (GART) unit programming for texture management as it does rather
913 non-trivial operations with pages remapping interfering with
914 IOMMU. This limitation may be lifted in future releases.
915 </para>
916
917 <para>
918 To be fully functional, PCI passthrough support in &product-name;
919 depends upon an IOMMU hardware unit. If the device uses bus
920 mastering, for example it performs DMA to the OS memory on its
921 own, then an IOMMU is required. Otherwise such DMA transactions
922 may write to the wrong physical memory address as the device DMA
923 engine is programmed using a device-specific protocol to perform
924 memory transactions. The IOMMU functions as translation unit
925 mapping physical memory access requests from the device using
926 knowledge of the guest physical address to host physical addresses
927 translation rules.
928 </para>
929
930 <para>
931 Intel's solution for IOMMU is called Intel Virtualization
932 Technology for Directed I/O (VT-d), and AMD's solution is called
933 AMD-Vi. Check your motherboard datasheet for the appropriate
934 technology. Even if your hardware does not have a IOMMU, certain
935 PCI cards may work, such as serial PCI adapters, but the guest
936 will show a warning on boot and the VM execution will terminate if
937 the guest driver will attempt to enable card bus mastering.
938 </para>
939
940 <para>
941 It is very common that the BIOS or the host OS disables the IOMMU
942 by default. So before any attempt to use it please make sure that
943 the following apply:
944 </para>
945
946 <itemizedlist>
947
948 <listitem>
949 <para>
950 Your motherboard has an IOMMU unit.
951 </para>
952 </listitem>
953
954 <listitem>
955 <para>
956 Your CPU supports the IOMMU.
957 </para>
958 </listitem>
959
960 <listitem>
961 <para>
962 The IOMMU is enabled in the BIOS.
963 </para>
964 </listitem>
965
966 <listitem>
967 <para>
968 The VM must run with VT-x/AMD-V and nested paging enabled.
969 </para>
970 </listitem>
971
972 <listitem>
973 <para>
974 Your Linux kernel was compiled with IOMMU support, including
975 DMA remapping. See the <literal>CONFIG_DMAR</literal> kernel
976 compilation option. The PCI stub driver
977 (<literal>CONFIG_PCI_STUB</literal>) is required as well.
978 </para>
979 </listitem>
980
981 <listitem>
982 <para>
983 Your Linux kernel recognizes and uses the IOMMU unit. The
984 <literal>intel_iommu=on</literal> boot option could be needed.
985 Search for DMAR and PCI-DMA in kernel boot log.
986 </para>
987 </listitem>
988
989 </itemizedlist>
990
991 <para>
992 Once you made sure that the host kernel supports the IOMMU, the
993 next step is to select the PCI card and attach it to the guest. To
994 figure out the list of available PCI devices, use the
995 <command>lspci</command> command. The output will look as follows:
996 </para>
997
998<screen>01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450]
99901:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
100002:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit
1001 Ethernet controller (rev 03)
100203:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
100303:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
100406:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8500 GT] (rev a1)</screen>
1005
1006 <para>
1007 The first column is a PCI address, in the format
1008 <literal><replaceable>bus</replaceable>:<replaceable>device</replaceable>.<replaceable>function</replaceable></literal>.
1009 This address could be used to identify the device for further
1010 operations. For example, to attach a PCI network controller on the
1011 system listed above to the second PCI bus in the guest, as device
1012 5, function 0, use the following command:
1013 </para>
1014
1015<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> -\-pciattach 02:00.0@01:05.0</screen>
1016
1017 <para>
1018 To detach the same device, use:
1019 </para>
1020
1021<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> -\-pcidetach 02:00.0</screen>
1022
1023 <para>
1024 Please note that both host and guest could freely assign a
1025 different PCI address to the card attached during runtime, so
1026 those addresses only apply to the address of the card at the
1027 moment of attachment on the host, and during BIOS PCI init on the
1028 guest.
1029 </para>
1030
1031 <para>
1032 If the virtual machine has a PCI device attached, certain
1033 limitations apply:
1034 </para>
1035
1036 <itemizedlist>
1037
1038 <listitem>
1039 <para>
1040 Only PCI cards with non-shared interrupts, such as those using
1041 MSI on the host, are supported at the moment.
1042 </para>
1043 </listitem>
1044
1045 <listitem>
1046 <para>
1047 No guest state can be reliably saved or restored. The internal
1048 state of the PCI card cannot be retrieved.
1049 </para>
1050 </listitem>
1051
1052 <listitem>
1053 <para>
1054 Teleportation, also called live migration, does not work. The
1055 internal state of the PCI card cannot be retrieved.
1056 </para>
1057 </listitem>
1058
1059 <listitem>
1060 <para>
1061 No lazy physical memory allocation. The host will preallocate
1062 the whole RAM required for the VM on startup, as we cannot
1063 catch physical hardware accesses to the physical memory.
1064 </para>
1065 </listitem>
1066
1067 </itemizedlist>
1068
1069 </sect1>-->
1070
1071 <sect1 id="webcam-passthrough">
1072
1073 <title>Webcam Passthrough</title>
1074
1075 <sect2 id="webcam-using-guest">
1076
1077 <title>Using a Host Webcam in the Guest</title>
1078
1079 <para>
1080 &product-name; includes a feature called <emphasis>webcam
1081 passthrough</emphasis>, which enables a guest to use a host
1082 webcam. This complements the general USB passthrough support
1083 which was the typical way of using host webcams in legacy
1084 releases. The webcam passthrough support can handle non-USB
1085 video sources in theory, but this is completely untested.
1086 </para>
1087
1088 <note>
1089 <para>
1090 The webcam passthrough module is shipped as part of the
1091 &product-name; extension pack, which must be installed
1092 separately. See <xref linkend="intro-installing" />.
1093 </para>
1094 </note>
1095
1096 <para>
1097 The host webcam can be attached to the VM using the
1098 <emphasis role="bold">Devices</emphasis> menu in the VM menu
1099 bar. The <emphasis role="bold">Webcams</emphasis> menu contains
1100 a list of available video input devices on the host. Clicking on
1101 a webcam name attaches or detaches the corresponding host
1102 device.
1103 </para>
1104
1105 <para>
1106 The <command>VBoxManage</command> command line tool can be used
1107 to enable webcam passthrough. Please see the host-specific
1108 sections below for additional details. The following commands
1109 are available:
1110 </para>
1111
1112 <itemizedlist>
1113
1114 <listitem>
1115 <para>
1116 Get a list of host webcams, or other video input devices:
1117 </para>
1118
1119<screen>$ VBoxManage list webcams</screen>
1120
1121 <para>
1122 The output format is as follows:
1123 </para>
1124
1125<screen>alias "user friendly name"
1126host path or identifier</screen>
1127
1128 <para>
1129 The alias can be used as a shortcut in other commands. Alias
1130 '.0' means the default video input device on the host. Alias
1131 '.1', '.2'means first, second video input device, and so on.
1132 The device order is host-specific.
1133 </para>
1134 </listitem>
1135
1136 <listitem>
1137 <para>
1138 Attach a webcam to a running VM, as follows:
1139 </para>
1140
1141<screen>VBoxManage controlvm <replaceable>VM name</replaceable> webcam attach [<replaceable>host_path</replaceable>|<replaceable>alias</replaceable> [<replaceable>settings</replaceable>]]</screen>
1142
1143 <para>
1144 This attaches a USB webcam device to the guest.
1145 </para>
1146
1147 <para>
1148 The <literal>settings</literal> parameter is a string
1149 <literal>Setting1=Value1;Setting2=Value2</literal>, which
1150 enables you to configure the emulated webcam device. The
1151 following settings are supported:
1152 </para>
1153
1154 <itemizedlist>
1155
1156 <listitem>
1157 <para>
1158 <literal>MaxFramerate</literal>: The highest rate at
1159 which video frames are sent to the guest. A higher frame
1160 rate requires more CPU power. Therefore sometimes it is
1161 useful to set a lower limit. Default is no limit and
1162 allow the guest to use all frame rates supported by the
1163 host webcam.
1164 </para>
1165 </listitem>
1166
1167 <listitem>
1168 <para>
1169 <literal>MaxPayloadTransferSize</literal>: How many
1170 bytes the emulated webcam can send to the guest at a
1171 time. Default value is 3060 bytes, which is used by some
1172 webcams. Higher values can slightly reduce CPU load, if
1173 the guest is able to use larger buffers. However, a high
1174 <literal>MaxPayloadTransferSize</literal> might be not
1175 supported by some guests.
1176 </para>
1177 </listitem>
1178
1179 </itemizedlist>
1180 </listitem>
1181
1182 <listitem>
1183 <para>
1184 Detach a webcam from a running VM, as follows:
1185 </para>
1186
1187<screen>VBoxManage controlvm <replaceable>VM-name</replaceable> webcam detach [<replaceable>host_path</replaceable>|<replaceable>alias</replaceable>]</screen>
1188 </listitem>
1189
1190 <listitem>
1191 <para>
1192 List the webcams attached to a running VM, as follows:
1193 </para>
1194
1195<screen>VBoxManage controlvm <replaceable>VM-name</replaceable> webcam list</screen>
1196
1197 <para>
1198 The output contains the path or alias which was used in the
1199 <command>webcam attach</command> command for each attached
1200 webcam.
1201 </para>
1202 </listitem>
1203
1204 </itemizedlist>
1205
1206 </sect2>
1207
1208 <sect2 id="webcam-win-hosts">
1209
1210 <title>Windows Hosts</title>
1211
1212 <para>
1213 When the webcam device is detached from the host, the emulated
1214 webcam device is automatically detached from the guest.
1215 </para>
1216
1217 </sect2>
1218
1219 <sect2 id="webcam-mac-hosts">
1220
1221 <title>Mac OS X Hosts</title>
1222
1223 <para>
1224 Mac OS X version 10.9 or later is required.
1225 </para>
1226
1227 <para>
1228 When the webcam device is detached from the host, the emulated
1229 webcam device remains attached to the guest and must be manually
1230 detached using the <command>VBoxManage controlvm
1231 <replaceable>VM-name</replaceable> webcam detach</command>
1232 command.
1233 </para>
1234
1235 </sect2>
1236
1237 <sect2 id="webcam-linux-hosts">
1238
1239 <title>Linux and Oracle Solaris Hosts</title>
1240
1241 <para>
1242 When the webcam is detached from the host the emulated webcam
1243 device is automatically detached from the guest only if the
1244 webcam is streaming video. If the emulated webcam is inactive it
1245 should be manually detached using the <command>VBoxManage
1246 controlvm <replaceable>VM-name</replaceable> webcam
1247 detach</command> command.
1248 </para>
1249
1250 <para>
1251 Aliases <filename>.0</filename> and <filename>.1</filename> are
1252 mapped to <filename>/dev/video0</filename>, alias
1253 <filename>.2</filename> is mapped to
1254 <filename>/dev/video1</filename> and so forth.
1255 </para>
1256
1257 </sect2>
1258
1259 </sect1>
1260
1261 <sect1 id="adv-display-config">
1262
1263 <title>Advanced Display Configuration</title>
1264
1265 <sect2 id="customvesa">
1266
1267 <title>Custom VESA Resolutions</title>
1268
1269 <para>
1270 Apart from the standard VESA resolutions, the &product-name;
1271 VESA BIOS enables you to add up to 16 custom video modes which
1272 will be reported to the guest operating system. When using
1273 Windows guests with the &product-name; Guest Additions, a custom
1274 graphics driver will be used instead of the fallback VESA
1275 solution so this information does not apply.
1276 </para>
1277
1278 <para>
1279 Additional video modes can be configured for each VM using the
1280 extra data facility. The extra data key is called
1281 <literal>CustomVideoMode<replaceable>x</replaceable></literal>
1282 with <replaceable>x</replaceable> being a number from 1 to 16.
1283 Please note that modes will be read from 1 until either the
1284 following number is not defined or 16 is reached. The following
1285 example adds a video mode that corresponds to the native display
1286 resolution of many notebook computers:
1287 </para>
1288
1289<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "CustomVideoMode1" "1400x1050x16"</screen>
1290
1291 <para>
1292 The VESA mode IDs for custom video modes start at
1293 <literal>0x160</literal>. In order to use the above defined
1294 custom video mode, the following command line has to be supplied
1295 to Linux:
1296 </para>
1297
1298<screen>vga = 0x200 | 0x160
1299vga = 864</screen>
1300
1301 <para>
1302 For guest operating systems with &product-name; Guest Additions,
1303 a custom video mode can be set using the video mode hint
1304 feature.
1305 </para>
1306
1307 </sect2>
1308
1309 <sect2 id="max-resolution-guests">
1310
1311 <title>Configuring the Maximum Resolution of Guests When Using the Graphical
1312 Frontend</title>
1313
1314 <para>
1315 When guest systems with the Guest Additions installed are
1316 started using the graphical frontend, the normal &product-name;
1317 application, they will not be allowed to use screen resolutions
1318 greater than the host's screen size unless the user manually
1319 resizes them by dragging the window, switching to full screen or
1320 seamless mode or sending a video mode hint using
1321 <command>VBoxManage</command>. This behavior is what most users
1322 will want, but if you have different needs, you can change it by
1323 issuing one of the following commands from the command line:
1324 </para>
1325
1326 <itemizedlist>
1327
1328 <listitem>
1329 <para>
1330 Remove all limits on guest resolutions.
1331 </para>
1332
1333<screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
1334 </listitem>
1335
1336 <listitem>
1337 <para>
1338 Manually specify a maximum resolution.
1339 </para>
1340
1341<screen>VBoxManage setextradata global GUI/MaxGuestResolution <replaceable>width</replaceable>x<replaceable>height</replaceable></screen>
1342 </listitem>
1343
1344 <listitem>
1345 <para>
1346 Restore the default settings to all guest VMs.
1347 </para>
1348
1349<screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
1350 </listitem>
1351
1352 </itemizedlist>
1353
1354 </sect2>
1355
1356 </sect1>
1357
1358 <sect1 id="adv-storage-config">
1359
1360 <title>Advanced Storage Configuration</title>
1361
1362 <sect2 id="rawdisk">
1363
1364 <title>Using a Raw Host Hard Disk From a Guest</title>
1365
1366 <para>
1367 As an alternative to using virtual disk images as described in
1368 <xref linkend="storage" />, &product-name; can also present
1369 either entire physical hard disks or selected partitions as
1370 virtual disks to virtual machines.
1371 </para>
1372
1373 <para>
1374 With &product-name;, this type of access is called <emphasis>raw
1375 hard disk access</emphasis>. It enables a guest operating system
1376 to access its virtual hard disk without going through the host
1377 OS file system. The actual performance difference for image
1378 files compared to raw disk varies greatly depending on the
1379 overhead of the host file system, whether dynamically growing
1380 images are used, and on host OS caching strategies. The caching
1381 indirectly also affects other aspects such as failure behavior.
1382 For example, whether the virtual disk contains all data written
1383 before a host OS crash. Consult your host OS documentation for
1384 details on this.
1385 </para>
1386
1387 <warning>
1388 <para>
1389 Raw hard disk access is for expert users only. Incorrect use
1390 or use of an outdated configuration can lead to
1391 <emphasis role="bold">total loss of data</emphasis> on the
1392 physical disk. Most importantly, <emphasis>do not</emphasis>
1393 attempt to boot the partition with the currently running host
1394 operating system in a guest. This will lead to severe data
1395 corruption.
1396 </para>
1397 </warning>
1398
1399 <para>
1400 Raw hard disk access, both for entire disks and individual
1401 partitions, is implemented as part of the VMDK image format
1402 support. As a result, you will need to create a special VMDK
1403 image file which defines where the data will be stored. After
1404 creating such a special VMDK image, you can use it like a
1405 regular virtual disk image. For example, you can use the
1406 VirtualBox Manager, see <xref linkend="vdis" />, or
1407 <command>VBoxManage</command> to assign the image to a virtual
1408 machine.
1409 </para>
1410
1411 <sect3 id="rawdisk-access-entire-physical-disk">
1412
1413 <title>Access to Entire Physical Hard Disk</title>
1414
1415 <para>
1416 While this variant is the simplest to set up, you must be
1417 aware that this will give a guest operating system direct and
1418 full access to an <emphasis>entire physical disk</emphasis>.
1419 If your <emphasis>host</emphasis> operating system is also
1420 booted from this disk, please take special care to not access
1421 the partition from the guest at all. On the positive side, the
1422 physical disk can be repartitioned in arbitrary ways without
1423 having to recreate the image file that gives access to the raw
1424 disk.
1425 </para>
1426
1427 <para>
1428 On a Linux host, to create an image that represents an entire
1429 physical hard disk which will not contain any actual data, as
1430 this will all be stored on the physical disk, use the
1431 following command:
1432 </para>
1433
1434<screen>$ VBoxManage createmedium disk --filename <replaceable>path-to-file</replaceable>.vmdk --format=VMDK
1435 --variant RawDisk --property RawDrive=/dev/sda</screen>
1436
1437 <para>
1438 This creates the
1439 <filename><replaceable>path-to-file</replaceable>.vmdk</filename>
1440 file image that must be an absolute path. All data is read and
1441 written from <filename>/dev/sda</filename>.
1442 </para>
1443
1444 <para>
1445 On a Windows host, instead of the above device specification,
1446 for example use <filename>\\.\PhysicalDrive0</filename>. On a
1447 Mac OS X host, instead of the above device specification use
1448 for example <filename>/dev/rdisk1</filename>. Note that on Mac
1449 OS X you can only get access to an entire disk if no volume is
1450 mounted from it.
1451 </para>
1452
1453 <para>
1454 Creating the image requires read/write access for the given
1455 device. Read/write access is also later needed when using the
1456 image from a virtual machine. On some host platforms, such as
1457 Windows, raw disk access may be restricted and not permitted
1458 by the host OS in some situations.
1459 </para>
1460
1461 <para>
1462 Just like with regular disk images, this does not
1463 automatically attach the newly created image to a virtual
1464 machine. This can be done as follows:
1465 </para>
1466
1467<screen>$ VBoxManage storageattach WindowsXP --storagectl "IDE Controller" \
1468 --port 0 --device 0 --type hdd --medium <replaceable>path-to-file</replaceable>.vmdk</screen>
1469
1470 <para>
1471 When this is done the selected virtual machine will boot from
1472 the specified physical disk.
1473 </para>
1474
1475 </sect3>
1476
1477 <sect3 id="rawdisk-access-disk-partitions">
1478
1479 <title>Access to Individual Physical Hard Disk Partitions</title>
1480
1481 <para>
1482 This <emphasis>raw partition support</emphasis> is quite
1483 similar to the full hard disk access described above. However,
1484 in this case, any partitioning information will be stored
1485 inside the VMDK image. This means that you can install a
1486 different boot loader in the virtual hard disk without
1487 affecting the host's partitioning information. While the guest
1488 will be able to <emphasis>see</emphasis> all partitions that
1489 exist on the physical disk, access will be filtered in that
1490 reading from partitions for which no access is allowed the
1491 partitions will only yield zeroes, and all writes to them are
1492 ignored.
1493 </para>
1494
1495 <para>
1496 To create a special image for raw partition support, which
1497 will contain a small amount of data, on a Linux host, use the
1498 command:
1499 </para>
1500
1501<screen>$ VBoxManage createmedium disk --filename <replaceable>path-to-file</replaceable>.vmdk --format=VMDK
1502--variant RawDisk --property RawDrive=/dev/sda --property Partitions=1,5</screen>
1503
1504 <para>
1505 The command is identical to the one for full hard disk access,
1506 except for the additional
1507 <option>--property Partitions=1,5</option>
1508 parameter. This example would create the image
1509 <filename><replaceable>path-to-file</replaceable>.vmdk</filename>,
1510 which must be absolute, and partitions 1 and 5 of
1511 <filename>/dev/sda</filename> would be made accessible to the
1512 guest.
1513 </para>
1514
1515 <para>
1516 &product-name; uses the same partition numbering as your Linux
1517 host. As a result, the numbers given in the above example
1518 would refer to the first primary partition and the first
1519 logical drive in the extended partition, respectively.
1520 </para>
1521
1522 <para>
1523 On a Windows host, instead of the above device specification,
1524 use for example <filename>\\.\PhysicalDrive0</filename>. On a
1525 Mac OS X host, instead of the above device specification use
1526 <filename>/dev/rdisk1</filename>, for example. Note that on OS
1527 X you can only use partitions which are not mounted. Unmount
1528 the respective disk first using
1529 <emphasis>diskutil unmountDisk <filename>/dev/diskX</filename></emphasis>.
1530 Partition numbers are the same on Linux, Windows, and Mac OS X hosts.
1531 </para>
1532
1533 <para>
1534 The numbers for the list of partitions can be taken from the
1535 output of the following command:
1536 </para>
1537
1538<screen>$ VBoxManage list hostdrives</screen>
1539
1540 <para>
1541 The output lists available drives and their partitions with
1542 the partition types and sizes to give the user enough information
1543 to identify the partitions necessary for the guest.
1544 </para>
1545
1546 <para>
1547 Images which give access to individual partitions are specific
1548 to a particular host disk setup. You cannot transfer these
1549 images to another host. Also, whenever the host partitioning
1550 changes, the image <emphasis>must be recreated</emphasis>.
1551 </para>
1552
1553 <para>
1554 Creating the image requires read/write access for the given
1555 device. Read/write access is also later needed when using the
1556 image from a virtual machine. If this is not feasible, there
1557 is a special variant for raw partition access, currently only
1558 available on Linux hosts, that avoids having to give the
1559 current user access to the entire disk. To set up such an
1560 image, use:
1561 </para>
1562
1563<screen>$ VBoxManage createmedium disk --filename <replaceable>path-to-file</replaceable>.vmdk --format=VMDK
1564--variant RawDisk --property RawDrive=/dev/sda --property Partitions=1,5
1565--property Relative=1</screen>
1566
1567 <para>
1568 When used from a virtual machine, the image will then refer
1569 not to the entire disk, but only to the individual partitions.
1570 In this example, <filename>/dev/sda1</filename> and
1571 <filename>/dev/sda5</filename>. As a consequence, read/write
1572 access is only required for the affected partitions, not for
1573 the entire disk. During creation however, read-only access to
1574 the entire disk is required to obtain the partitioning
1575 information.
1576 </para>
1577
1578 <para>
1579 In some configurations it may be necessary to change the MBR
1580 code of the created image. For example, to replace the Linux
1581 boot loader that is used on the host by another boot loader.
1582 This enables for example the guest to boot directly to
1583 Windows, while the host boots Linux from the "same" disk. For
1584 this purpose the <option>--property-file
1585 BootSector=<replaceable>path-to-file-with-boot-sector</replaceable></option>
1586 parameter is provided. It specifies a file name from which to
1587 take the MBR code. The partition table is not modified at all,
1588 so a MBR file from a system with totally different
1589 partitioning can be used. An example of this is:
1590 </para>
1591
1592<screen>$ VBoxManage createmedium disk --filename <replaceable>path-to-file</replaceable>.vmdk --format=VMDK
1593--variant RawDisk --property RawDrive=/dev/sda --property Partitions=1,5
1594--property-file BootSector=winxp.mbr</screen>
1595
1596 <para>
1597 The modified MBR will be stored inside the image, not on the
1598 host disk.
1599 </para>
1600
1601 <para>
1602 The created image can be attached to a storage controller in a
1603 VM configuration as usual.
1604 </para>
1605
1606 </sect3>
1607
1608 </sect2>
1609
1610 <sect2 id="changevpd">
1611
1612 <title>Configuring the Hard Disk Vendor Product Data (VPD)</title>
1613
1614 <para>
1615 &product-name; reports vendor product data for its virtual hard
1616 disks which consist of hard disk serial number, firmware
1617 revision and model number. These can be changed using the
1618 following commands:
1619 </para>
1620
1621<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1622"VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
1623$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1624"VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
1625$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1626"VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
1627
1628 <para>
1629 The serial number is a 20 byte alphanumeric string, the firmware
1630 revision an 8 byte alphanumeric string and the model number a 40
1631 byte alphanumeric string. Instead of Port0, referring to the
1632 first port, specify the desired SATA hard disk port.
1633 </para>
1634
1635 <para>
1636 The above commands apply to virtual machines with an AHCI (SATA)
1637 controller. The commands for virtual machines with an IDE
1638 controller are:
1639 </para>
1640
1641<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1642"VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
1643$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1644"VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision" "firmware"
1645$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1646"VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber" "model"</screen>
1647
1648 <para>
1649 For hard disks, you can mark the drive as having a
1650 non-rotational medium by using the following command:
1651 </para>
1652
1653<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1654"VBoxInternal/Devices/ahci/0/Config/Port0/NonRotational" "1"</screen>
1655
1656 <para>
1657 Additional three parameters are needed for CD/DVD drives to
1658 report the vendor product data:
1659 </para>
1660
1661<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1662"VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
1663VBoxManage setextradata <replaceable>VM-name</replaceable> \
1664"VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
1665VBoxManage setextradata <replaceable>VM-name</replaceable> \
1666"VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
1667
1668 <para>
1669 The vendor id is an 8 byte alphanumeric string, the product id
1670 an 16 byte alphanumeric string and the revision a 4 byte
1671 alphanumeric string. Instead of Port0, referring to the first
1672 port, specify the desired SATA hard disk port.
1673 </para>
1674
1675 </sect2>
1676
1677 <sect2 id="iscsi-intnet">
1678
1679 <title>Access iSCSI Targets Using Internal Networking</title>
1680
1681 <para>
1682 As an experimental feature, &product-name; enables access to an
1683 iSCSI target running in a virtual machine which is configured to
1684 use Internal Networking mode. See
1685 <xref linkend="storage-iscsi" />,
1686 <xref linkend="network_internal" />, and
1687 <xref
1688 linkend="vboxmanage-storageattach" />.
1689 </para>
1690
1691 <para>
1692 The IP stack accessing Internal Networking must be configured in
1693 the virtual machine which accesses the iSCSI target. A free
1694 static IP and a MAC address not used by other virtual machines
1695 must be chosen. In the example below, adapt the name of the
1696 virtual machine, the MAC address, the IP configuration, and the
1697 Internal Networking name (MyIntNet) according to your needs. The
1698 following eight commands must first be issued:
1699 </para>
1700
1701<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1702VBoxInternal/Devices/IntNetIP/0/Trusted 1
1703$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1704VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f
1705$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1706VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1
1707$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1708VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0
1709$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1710VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet
1711$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1712VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet
1713$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1714VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/TrunkType 2
1715$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1716VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1</screen>
1717
1718 <para>
1719 Finally the iSCSI disk must be attached with the
1720 <option>--intnet</option> option to tell the iSCSI initiator to
1721 use internal networking, as follows:
1722 </para>
1723
1724<screen>$ VBoxManage storageattach ... --medium iscsi --server 10.0.9.30 \
1725--target iqn.2008-12.com.sun:sampletarget --intnet</screen>
1726
1727 <para>
1728 Compared to a regular iSCSI setup, the IP address of the target
1729 <emphasis>must</emphasis> be specified as a numeric IP address,
1730 as there is no DNS resolver for internal networking.
1731 </para>
1732
1733 <para>
1734 The virtual machine with the iSCSI target should be started
1735 before the VM using it is powered on. If a virtual machine using
1736 an iSCSI disk is started without having the iSCSI target powered
1737 up, it can take up to 200 seconds to detect this situation. The
1738 VM will fail to power up.
1739 </para>
1740
1741 </sect2>
1742
1743 </sect1>
1744
1745 <sect1 id="changenat">
1746
1747 <title>Fine Tuning the &product-name; NAT Engine</title>
1748
1749 <sect2 id="nat-address-config">
1750
1751 <title>Configuring the Address of a NAT Network Interface</title>
1752
1753 <para>
1754 In NAT mode, the guest network interface is assigned to the IPv4
1755 range <literal>10.0.<replaceable>x</replaceable>.0/24</literal>
1756 by default where <replaceable>x</replaceable> corresponds to the
1757 instance of the NAT interface +2. So
1758 <replaceable>x</replaceable> is 2 when there is only one NAT
1759 instance active. In that case the guest is assigned to the
1760 address <literal>10.0.2.15</literal>, the gateway is set to
1761 <literal>10.0.2.2</literal> and the name server can be found at
1762 <literal>10.0.2.3</literal>.
1763 </para>
1764
1765 <para>
1766 If the NAT network needs to be changed, use the following
1767 command:
1768 </para>
1769
1770<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
1771--natnet1 "192.168/16"</screen>
1772
1773 <para>
1774 This command would reserve the network addresses from
1775 <literal>192.168.0.0</literal> to
1776 <literal>192.168.254.254</literal> for the first NAT network
1777 instance of <replaceable>VM-name</replaceable> The guest IP
1778 would be assigned to <literal>192.168.0.15</literal> and the
1779 default gateway could be found at
1780 <literal>192.168.0.2</literal>.
1781 </para>
1782
1783 </sect2>
1784
1785 <sect2 id="nat-adv-tftp">
1786
1787 <title>Configuring the Boot Server (Next Server) of a NAT Network Interface</title>
1788
1789 <para>
1790 For network booting in NAT mode, by default &product-name; uses
1791 a built-in TFTP server at the IP address 10.0.2.4. This default
1792 behavior should work fine for typical remote-booting scenarios.
1793 However, it is possible to change the boot server IP and the
1794 location of the boot image with the following commands:
1795 </para>
1796
1797<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
1798--nattftpserver1 10.0.2.2
1799$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
1800--nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen>
1801
1802 </sect2>
1803
1804 <sect2 id="nat-adv-settings">
1805
1806 <title>Tuning TCP/IP Buffers for NAT</title>
1807
1808 <para>
1809 The &product-name; NAT stack performance is often determined by
1810 its interaction with the host's TCP/IP stack and the size of
1811 several buffers, <literal>SO_RCVBUF</literal> and
1812 <literal>SO_SNDBUF</literal>. For certain setups users might
1813 want to adjust the buffer size for a better performance. This
1814 can by achieved using the following commands, where values are
1815 in kilobytes and can range from 8 to 1024:
1816 </para>
1817
1818<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
1819--natsettings1 16000,128,128,0,0</screen>
1820
1821 <para>
1822 This example illustrates tuning the NAT settings. The first
1823 parameter is the MTU, then the size of the socket's send buffer
1824 and the size of the socket's receive buffer, the initial size of
1825 the TCP send window, and lastly the initial size of the TCP
1826 receive window. Note that specifying zero means fallback to the
1827 default value.
1828 </para>
1829
1830 <para>
1831 Each of these buffers has a default size of 64KB and default MTU
1832 is 1500.
1833 </para>
1834
1835 </sect2>
1836
1837 <sect2 id="nat-bind-sockets">
1838
1839 <title>Binding NAT Sockets to a Specific Interface</title>
1840
1841 <para>
1842 By default, &product-name;'s NAT engine will route TCP/IP
1843 packets through the default interface assigned by the host's
1844 TCP/IP stack. The technical reason for this is that the NAT
1845 engine uses sockets for communication. If you want to change
1846 this behavior, you can tell the NAT engine to bind to a
1847 particular IP address instead. For example, use the following
1848 command:
1849 </para>
1850
1851<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
1852--natbindip1 "10.45.0.2"</screen>
1853
1854 <para>
1855 After this, all outgoing traffic will be sent through the
1856 interface with the IP address 10.45.0.2. Ensure that this
1857 interface is up and running before changing the NAT bind
1858 address.
1859 </para>
1860
1861 </sect2>
1862
1863 <sect2 id="nat-adv-dns">
1864
1865 <title>Enabling DNS Proxy in NAT Mode</title>
1866
1867 <para>
1868 The NAT engine by default offers the same DNS servers to the
1869 guest that are configured on the host. In some scenarios, it can
1870 be desirable to hide the DNS server IPs from the guest, for
1871 example when this information can change on the host due to
1872 expiring DHCP leases. In this case, you can tell the NAT engine
1873 to act as DNS proxy using the following command:
1874 </para>
1875
1876<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --natdnsproxy1 on</screen>
1877
1878 </sect2>
1879
1880 <sect2 id="nat_host_resolver_proxy">
1881
1882 <title>Using the Host's Resolver as a DNS Proxy in NAT Mode</title>
1883
1884 <para>
1885 For resolving network names, the DHCP server of the NAT engine
1886 offers a list of registered DNS servers of the host. If for some
1887 reason you need to hide this DNS server list and use the host's
1888 resolver settings, thereby forcing the &product-name; NAT engine
1889 to intercept DNS requests and forward them to host's resolver,
1890 use the following command:
1891 </para>
1892
1893<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --natdnshostresolver1 on</screen>
1894
1895 <para>
1896 Note that this setting is similar to the DNS proxy mode, however
1897 whereas the proxy mode just forwards DNS requests to the
1898 appropriate servers, the resolver mode will interpret the DNS
1899 requests and use the host's DNS API to query the information and
1900 return it to the guest.
1901 </para>
1902
1903 <sect3 id="nat_host_resolver_name_intercepting">
1904
1905 <title>User-Defined Host Name Resolving</title>
1906
1907 <para>
1908 In some cases it might be useful to intercept the name
1909 resolving mechanism, providing a user-defined IP address on a
1910 particular DNS request. The intercepting mechanism enables the
1911 user to map not only a single host but domains and even more
1912 complex naming conventions if required.
1913 </para>
1914
1915 <para>
1916 The following command sets a rule for mapping a name to a
1917 specified IP:
1918 </para>
1919
1920<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
1921"VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/AttachedDriver/Config/HostResolverMappings/ \
1922<replaceable>unique-rule-name-of-interception-rule</replaceable>/HostIP" <replaceable>IPv4</replaceable>
1923
1924VBoxManage setextradata <replaceable>VM-name</replaceable> \
1925"VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/AttachedDriver/Config/HostResolverMappings/ \
1926<replaceable>unique-rule-name</replaceable>/HostName" <replaceable>hostname</replaceable></screen>
1927
1928 <para>
1929 The following command sets a rule for mapping a pattern name
1930 to a specified IP:
1931 </para>
1932
1933<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
1934"VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/AttachedDriver/Config/HostResolverMappings/ \
1935<replaceable>unique-rule-name</replaceable>/HostIP" <replaceable>IPv4</replaceable>
1936
1937VBoxManage setextradata <replaceable>VM-name</replaceable> \
1938"VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/AttachedDriver/Config/HostResolverMappings/ \
1939<replaceable>unique-rule-name</replaceable>/HostNamePattern" <replaceable>hostpattern</replaceable></screen>
1940
1941 <para>
1942 The host name pattern can include the following wildcard
1943 characters: pipe (<literal>|</literal>), question mark
1944 (<literal>?</literal>), and asterisk (<literal>*</literal>).
1945 </para>
1946
1947 <para>
1948 This example demonstrates how to instruct the host-resolver
1949 mechanism to resolve all domain and probably some mirrors of
1950 www.blocked-site.info site with IP 127.0.0.1:
1951 </para>
1952
1953<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1954"VBoxInternal/Devices/e1000/0/LUN#0/AttachedDriver/Config/HostResolverMappings/all_blocked_site/HostIP" 127.0.0.1
1955$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
1956"VBoxInternal/Devices/e1000/0/LUN#0/AttachedDriver/Config/HostResolverMappings/all_blocked_site/HostNamePattern" "*.blocked-site.*|*.fb.org"</screen>
1957
1958 <para>
1959 The host resolver mechanism should be enabled to use
1960 user-defined mapping rules, otherwise they do not have any
1961 effect.
1962 </para>
1963
1964 </sect3>
1965
1966 </sect2>
1967
1968 <sect2 id="nat-adv-alias">
1969
1970 <title>Configuring Aliasing of the NAT Engine</title>
1971
1972 <para>
1973 By default, the NAT core uses aliasing and uses random ports
1974 when generating an alias for a connection. This works well for
1975 the most protocols like SSH, FTP and so on. Though some
1976 protocols might need a more transparent behavior or may depend
1977 on the real port number the packet was sent from. You can change
1978 the NAT mode by using the following commands:
1979 </para>
1980
1981<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
1982--nataliasmode1 proxyonly</screen>
1983
1984<screen>$ VBoxManage modifyvm "Linux Guest" --nataliasmode1 sameports</screen>
1985
1986 <para>
1987 The first example disables aliasing and switches NAT into
1988 transparent mode, the second example enforces preserving of port
1989 values. These modes can be combined if necessary.
1990 </para>
1991
1992 </sect2>
1993
1994 </sect1>
1995
1996 <sect1 id="changedmi">
1997
1998 <title>Configuring the BIOS DMI Information</title>
1999
2000 <para>
2001 The DMI data that &product-name; provides to guests can be changed
2002 for a specific VM. Use the following commands to configure the DMI
2003 BIOS information. In case your VM is configured to use EFI
2004 firmware you need to replace <literal>pcbios</literal> by
2005 <literal>efi</literal> in the keys.
2006 </para>
2007
2008 <itemizedlist>
2009
2010 <listitem>
2011 <para>
2012 DMI BIOS information (type 0)
2013 </para>
2014
2015<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2016"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
2017$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2018"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
2019$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2020"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
2021$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2022"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
2023$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2024"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
2025$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2026"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
2027$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2028"VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4</screen>
2029 </listitem>
2030
2031 <listitem>
2032 <para>
2033 DMI system information (type 1)
2034 </para>
2035
2036<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2037"VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
2038$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2039"VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
2040$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2041"VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
2042$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2043"VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
2044$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2045"VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
2046$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2047"VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
2048$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2049"VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid" \
2050"9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
2051 </listitem>
2052
2053 <listitem>
2054 <para>
2055 DMI board information (type 2)
2056 </para>
2057
2058<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2059"VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor" "Board Vendor"
2060$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2061"VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct" "Board Product"
2062$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2063"VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion" "Board Version"
2064$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2065"VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial" "Board Serial"
2066$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2067"VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag" "Board Tag"
2068$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2069"VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass" "Board Location"
2070$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2071"VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType" 10</screen>
2072 </listitem>
2073
2074 <listitem>
2075 <para>
2076 DMI system enclosure or chassis (type 3)
2077 </para>
2078
2079<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2080"VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor" "Chassis Vendor"
2081$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2082"VBoxInternal/Devices/pcbios/0/Config/DmiChassisType" 3
2083$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2084"VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion" "Chassis Version"
2085$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2086"VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial" "Chassis Serial"
2087$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2088"VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag" "Chassis Tag"</screen>
2089 </listitem>
2090
2091 <listitem>
2092 <para>
2093 DMI processor information (type 4)
2094 </para>
2095
2096<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2097"VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer" "GenuineIntel"
2098$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2099"VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion" "Pentium(R) III"</screen>
2100 </listitem>
2101
2102 <listitem>
2103 <para>
2104 DMI OEM strings (type 11)
2105 </para>
2106
2107<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2108"VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer" "vboxVer_1.2.3"
2109$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2110"VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev" "vboxRev_12345"</screen>
2111 </listitem>
2112
2113 </itemizedlist>
2114
2115 <para>
2116 If a DMI string is not set, the default value of &product-name; is
2117 used. To set an empty string use
2118 <literal>"&lt;EMPTY&gt;"</literal>.
2119 </para>
2120
2121 <para>
2122 Note that in the above list, all quoted parameters (DmiBIOSVendor,
2123 DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be
2124 strings. If such a string is a valid number, the parameter is
2125 treated as number and the VM will most probably refuse to start
2126 with an <literal>VERR_CFGM_NOT_STRING</literal> error. In that
2127 case, use
2128 <literal>"string:<replaceable>value</replaceable>"</literal>. For
2129 example:
2130 </para>
2131
2132<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2133"VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen>
2134
2135 <para>
2136 Changing this information can be necessary to provide the DMI
2137 information of the host to the guest to prevent Windows from
2138 asking for a new product key. On Linux hosts, the DMI BIOS
2139 information can be obtained with the following command:
2140 </para>
2141
2142<screen>$ dmidecode -t0</screen>
2143
2144 <para>
2145 The DMI system information can be obtained as follows:
2146 </para>
2147
2148<screen>$ dmidecode -t1</screen>
2149
2150 </sect1>
2151
2152 <sect1 id="changeacpicust">
2153
2154 <title>Configuring Custom ACPI Tables</title>
2155
2156 <para>
2157 You can configure &product-name; to present up to four custom ACPI
2158 tables to the guest. Use a command such as the following to
2159 configure custom ACPI tables. Note that
2160 <literal>CustomTable1</literal>, <literal>CustomTable2</literal>,
2161 and <literal>CustomTable3</literal> are available in addition to
2162 <literal>CustomTable0</literal>.
2163 </para>
2164
2165<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
2166"VBoxInternal/Devices/acpi/0/Config/CustomTable0" "/<replaceable>path-to-table</replaceable>.bin"</screen>
2167
2168 <para>
2169 Configuring custom ACPI tables can for example avoid the need for
2170 asking for a new product key on Windows Vista, Windows 7, Windows
2171 8 and later guests. On Linux hosts, one of the system's ACPI
2172 tables can be read from
2173 <filename>/sys/firmware/acpi/tables/</filename>.
2174 </para>
2175
2176 </sect1>
2177
2178 <sect1 id="fine-tune-timers">
2179
2180 <title>Fine Tuning Timers and Time Synchronization</title>
2181
2182 <sect2 id="changetscmode">
2183
2184 <title>Configuring the Guest Time Stamp Counter (TSC) to Reflect Guest
2185 Execution</title>
2186
2187 <para>
2188 By default, &product-name; keeps all sources of time visible to
2189 the guest synchronized to a single time source, the monotonic
2190 host time. This reflects the assumptions of many guest operating
2191 systems, which expect all time sources to reflect "wall clock"
2192 time. In special circumstances it may be useful however to make
2193 the time stamp counter (TSC) in the guest reflect the time
2194 actually spent executing the guest.
2195 </para>
2196
2197 <para>
2198 This special TSC handling mode can be enabled on a per-VM basis,
2199 and for best results must be used only in combination with
2200 hardware virtualization. To enable this mode use the following
2201 command:
2202 </para>
2203
2204<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
2205
2206 <para>
2207 To revert to the default TSC handling mode use:
2208 </para>
2209
2210<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/TM/TSCTiedToExecution"</screen>
2211
2212 <para>
2213 Note that if you use the special TSC handling mode with a guest
2214 operating system which is very strict about the consistency of
2215 time sources you may get a warning or error message about the
2216 timing inconsistency. It may also cause clocks to become
2217 unreliable with some guest operating systems depending on how
2218 they use the TSC.
2219 </para>
2220
2221 </sect2>
2222
2223 <sect2 id="warpguest">
2224
2225 <title>Accelerate or Slow Down the Guest Clock</title>
2226
2227 <para>
2228 For certain purposes it can be useful to accelerate or to slow
2229 down the virtual guest clock. This can be achieved as follows:
2230 </para>
2231
2232<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
2233
2234 <para>
2235 The above example will double the speed of the guest clock while
2236 </para>
2237
2238<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
2239
2240 <para>
2241 will halve the speed of the guest clock. Note that changing the
2242 rate of the virtual clock can confuse the guest and can even
2243 lead to abnormal guest behavior. For instance, a higher clock
2244 rate means shorter timeouts for virtual devices with the result
2245 that a slightly increased response time of a virtual device due
2246 to an increased host load can cause guest failures. Note further
2247 that any time synchronization mechanism will frequently try to
2248 resynchronize the guest clock with the reference clock, which is
2249 the host clock if the &product-name; Guest Additions are active.
2250 Therefore any time synchronization should be disabled if the
2251 rate of the guest clock is changed as described above. See
2252 <xref linkend="changetimesync" />.
2253 </para>
2254
2255 </sect2>
2256
2257 <sect2 id="changetimesync">
2258
2259 <title>Tuning the Guest Additions Time Synchronization Parameters</title>
2260
2261 <para>
2262 The &product-name; Guest Additions ensure that the guest's
2263 system time is synchronized with the host time. There are
2264 several parameters which can be tuned. The parameters can be set
2265 for a specific VM using the following command:
2266 </para>
2267
2268<screen>$ VBoxManage guestproperty set <replaceable>VM-name</replaceable> "/VirtualBox/GuestAdd/VBoxService/<replaceable>property</replaceable>" <replaceable>value</replaceable></screen>
2269
2270 <para>
2271 <replaceable>property</replaceable> is one of the following:
2272 </para>
2273
2274 <variablelist>
2275
2276 <varlistentry>
2277 <term>
2278 <option>--timesync-interval</option>
2279 </term>
2280
2281 <listitem>
2282 <para>
2283 Specifies the interval at which to synchronize the time
2284 with the host. The default is 10000 ms (10 seconds).
2285 </para>
2286 </listitem>
2287 </varlistentry>
2288
2289 <varlistentry>
2290 <term>
2291 <option>--timesync-min-adjust</option>
2292 </term>
2293
2294 <listitem>
2295 <para>
2296 The minimum absolute drift value measured in milliseconds
2297 to make adjustments for. The default is 1000 ms on OS/2
2298 and 100 ms elsewhere.
2299 </para>
2300 </listitem>
2301 </varlistentry>
2302
2303 <varlistentry>
2304 <term>
2305 <option>--timesync-latency-factor</option>
2306 </term>
2307
2308 <listitem>
2309 <para>
2310 The factor to multiply the time query latency with to
2311 calculate the dynamic minimum adjust time. The default is
2312 8 times, which means as follows:
2313 </para>
2314
2315 <para>
2316 Measure the time it takes to determine the host time, the
2317 guest has to contact the VM host service which may take
2318 some time. Multiply this value by 8 and do an adjustment
2319 only if the time difference between host and guest is
2320 bigger than this value. Do not do any time adjustment
2321 otherwise.
2322 </para>
2323 </listitem>
2324 </varlistentry>
2325
2326 <varlistentry>
2327 <term>
2328 <option>--timesync-max-latency</option>
2329 </term>
2330
2331 <listitem>
2332 <para>
2333 The max host timer query latency to accept. The default is
2334 250 ms.
2335 </para>
2336 </listitem>
2337 </varlistentry>
2338
2339 <varlistentry>
2340 <term>
2341 <option>--timesync-set-threshold</option>
2342 </term>
2343
2344 <listitem>
2345 <para>
2346 The absolute drift threshold, given as milliseconds where
2347 to start setting the time instead of trying to smoothly
2348 adjust it. The default is 20 minutes.
2349 </para>
2350 </listitem>
2351 </varlistentry>
2352
2353 <varlistentry>
2354 <term>
2355 <option>--timesync-set-start</option>
2356 </term>
2357
2358 <listitem>
2359 <para>
2360 Set the time when starting the time sync service.
2361 </para>
2362 </listitem>
2363 </varlistentry>
2364
2365 <varlistentry>
2366 <term>
2367 <option>--timesync-set-on-restore 0|1</option>
2368 </term>
2369
2370 <listitem>
2371 <para>
2372 Set the time after the VM was restored from a saved state
2373 when passing 1 as parameter. This is the default. Disable
2374 by passing 0. In the latter case, the time will be
2375 adjusted smoothly, which can take a long time.
2376 </para>
2377 </listitem>
2378 </varlistentry>
2379
2380 </variablelist>
2381
2382 <para>
2383 All these parameters can be specified as command line parameters
2384 to VBoxService as well.
2385 </para>
2386
2387 </sect2>
2388
2389 <sect2 id="disabletimesync">
2390
2391 <title>Disabling the Guest Additions Time Synchronization</title>
2392
2393 <para>
2394 Once installed and started, the &product-name; Guest Additions
2395 will try to synchronize the guest time with the host time. This
2396 can be prevented by forbidding the guest service from reading
2397 the host clock:
2398 </para>
2399
2400<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1</screen>
2401
2402 </sect2>
2403
2404 </sect1>
2405
2406 <sect1 id="vboxbowsolaris11">
2407
2408 <title>Installing the Alternate Bridged Networking Driver on Oracle Solaris 11
2409 Hosts</title>
2410
2411 <para>
2412 &product-name; includes a network filter driver that utilizes
2413 Oracle Solaris 11's Crossbow functionality. By default, this new
2414 driver is installed for Oracle Solaris 11 hosts that have support
2415 for it.
2416 </para>
2417
2418 <para>
2419 To force installation of the older STREAMS based network filter
2420 driver, execute as root the following command before installing
2421 the &product-name; package:
2422 </para>
2423
2424<screen>$ touch /etc/vboxinst_vboxflt</screen>
2425
2426 <para>
2427 To force installation of the Crossbow based network filter driver,
2428 execute as root the following command before installing the
2429 &product-name; package:
2430 </para>
2431
2432<screen>$ touch /etc/vboxinst_vboxbow</screen>
2433
2434 <para>
2435 To check which driver is currently being used by &product-name;,
2436 execute:
2437 </para>
2438
2439<screen>$ modinfo | grep vbox</screen>
2440
2441 <para>
2442 If the output contains "vboxbow", it indicates &product-name; is
2443 using the Crossbow network filter driver, while the name "vboxflt"
2444 indicates usage of the older STREAMS network filter.
2445 </para>
2446
2447 </sect1>
2448
2449 <sect1 id="vboxbowvnictemplates">
2450
2451 <title>&product-name; VNIC Templates for VLANs on Oracle Solaris 11 Hosts</title>
2452
2453 <para>
2454 &product-name; supports Virtual Network Interface (VNIC) templates
2455 for configuring VMs over VLANs. An &product-name; VNIC template is
2456 a VNIC whose name starts with
2457 <filename>vboxvnic_template</filename>. The string is
2458 case-sensitive.
2459 </para>
2460
2461 <para>
2462 On Oracle Solaris 11 hosts, when Crossbow-based bridged networking
2463 is used, a VNIC template may be used to specify the VLAN ID to use
2464 while bridging over a network link.
2465 </para>
2466
2467 <para>
2468 The following is an example of how to use a VNIC template to
2469 configure a VM over a VLAN. Create an &product-name; VNIC
2470 template, by executing as root:
2471 </para>
2472
2473<screen># dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0</screen>
2474
2475 <para>
2476 This will create a temporary VNIC template over interface
2477 <command>nge0</command> with the VLAN ID 23. To create VNIC
2478 templates that are persistent across host reboots, skip the
2479 <option>-t</option> parameter in the above command. You may check
2480 the current state of links using the following command:
2481 </para>
2482
2483<screen>$ dladm show-link
2484LINK CLASS MTU STATE BRIDGE OVER
2485nge0 phys 1500 up -- --
2486nge1 phys 1500 down -- --
2487vboxvnic_template0 vnic 1500 up -- nge0
2488
2489$ dladm show-vnic
2490LINK OVER SPEED MACADDRESS MACADDRTYPE VID
2491vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23</screen>
2492
2493 <para>
2494 Once the VNIC template is created, any VMs that need to be on VLAN
2495 23 over the interface <command>nge0</command> can be configured to
2496 bridge using this VNIC template.
2497 </para>
2498
2499 <para>
2500 VNIC templates makes managing VMs on VLANs simpler and efficient.
2501 The VLAN details are not stored as part of every VM's
2502 configuration but rather inherited from the VNIC template while
2503 starting the VM. The VNIC template itself can be modified anytime
2504 using the <command>dladm</command> command.
2505 </para>
2506
2507 <para>
2508 VNIC templates can be created with additional properties such as
2509 bandwidth limits and CPU fanout. Refer to your Oracle Solaris
2510 network documentation for details. The additional properties are
2511 also applied to VMs which bridge using the VNIC template.
2512 </para>
2513
2514 </sect1>
2515
2516 <sect1 id="addhostonlysolaris">
2517
2518 <title>Configuring Multiple Host-Only Network Interfaces on Oracle Solaris
2519 Hosts</title>
2520
2521 <para>
2522 By default &product-name; provides you with one host-only network
2523 interface. Adding more host-only network interfaces on Oracle
2524 Solaris hosts requires manual configuration. Here is how to add
2525 another host-only network interface.
2526 </para>
2527
2528 <para>
2529 Begin by stopping all running VMs. Then, unplumb the existing
2530 "vboxnet0" interface by execute the following command as root:
2531 </para>
2532
2533<screen># ifconfig vboxnet0 unplumb</screen>
2534
2535 <para>
2536 If you have several vboxnet interfaces, you will need to unplumb
2537 all of them. Once all vboxnet interfaces are unplumbed, remove the
2538 driver by executing the following command as root:
2539 </para>
2540
2541<screen># rem_drv vboxnet</screen>
2542
2543 <para>
2544 Edit the file
2545 <filename>/platform/i86pc/kernel/drv/vboxnet.conf</filename> and
2546 add a line for the new interface we want to add as shown below:
2547 </para>
2548
2549<screen>name="vboxnet" parent="pseudo" instance=1;
2550name="vboxnet" parent="pseudo" instance=2;</screen>
2551
2552 <para>
2553 Add as many of these lines as required with each line having a
2554 unique instance number.
2555 </para>
2556
2557 <para>
2558 Next, reload the vboxnet driver by executing the following command
2559 as root:
2560 </para>
2561
2562<screen># add_drv vboxnet</screen>
2563
2564 <para>
2565 On Oracle Solaris 11.1 and newer hosts you may want to rename the
2566 default vanity interface name. To check what name has been
2567 assigned, execute:
2568 </para>
2569
2570<screen>$ dladm show-phys
2571LINK MEDIA STATE SPEED DUPLEX DEVICE
2572net0 Ethernet up 100 full e1000g0
2573net2 Ethernet up 1000 full vboxnet1
2574net1 Ethernet up 1000 full vboxnet0</screen>
2575
2576 <para>
2577 In the above example, we can rename "net2" to "vboxnet1" before
2578 proceeding to plumb the interface. This can be done by executing
2579 as root:
2580 </para>
2581
2582<screen># dladm rename-link net2 vboxnet1</screen>
2583
2584 <para>
2585 Now plumb all the interfaces using <command>ifconfig
2586 vboxnet<replaceable>X</replaceable> plumb</command>, where
2587 <replaceable>X</replaceable> would be 1 in this case. Once the
2588 interface is plumbed, it may be configured like any other network
2589 interface. Refer to the <command>ifconfig</command> documentation
2590 for further details.
2591 </para>
2592
2593 <para>
2594 To make the settings for the newly added interfaces persistent
2595 across reboots, you will need to edit the files
2596 <filename>/etc/inet/netmasks</filename>, and if you are using NWAM
2597 <filename>/etc/nwam/llp</filename> and add the appropriate entries
2598 to set the netmask and static IP for each of those interfaces. The
2599 &product-name; installer only updates these configuration files
2600 for the one "vboxnet0" interface it creates by default.
2601 </para>
2602
2603 </sect1>
2604
2605 <sect1 id="solariscodedumper">
2606
2607 <title>Configuring the &product-name; CoreDumper on Oracle Solaris Hosts</title>
2608
2609 <para>
2610 &product-name; is capable of producing its own core files for
2611 extensive debugging when things go wrong. Currently this is only
2612 available on Oracle Solaris hosts.
2613 </para>
2614
2615 <para>
2616 The &product-name; CoreDumper can be enabled using the following
2617 command:
2618 </para>
2619
2620<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> VBoxInternal2/CoreDumpEnabled 1</screen>
2621
2622 <para>
2623 You can specify which directory to use for core dumps with this
2624 command, as follows:
2625 </para>
2626
2627<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> VBoxInternal2/CoreDumpDir <replaceable>path-to-directory</replaceable></screen>
2628
2629 <para>
2630 Make sure the directory you specify is on a volume with sufficient
2631 free space and that the &product-name; process has sufficient
2632 permissions to write files to this directory. If you skip this
2633 command and do not specify any core dump directory, the current
2634 directory of the &product-name; executable will be used. This
2635 would most likely fail when writing cores as they are protected
2636 with root permissions. It is recommended you explicitly set a core
2637 dump directory.
2638 </para>
2639
2640 <para>
2641 You must specify when the &product-name; CoreDumper should be
2642 triggered. This is done using the following commands:
2643 </para>
2644
2645<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> VBoxInternal2/CoreDumpReplaceSystemDump 1
2646$ VBoxManage setextradata <replaceable>VM-name</replaceable> VBoxInternal2/CoreDumpLive 1</screen>
2647
2648 <para>
2649 At least one of the above two commands will have to be provided if
2650 you have enabled the &product-name; CoreDumper.
2651 </para>
2652
2653 <para>
2654 Setting <literal>CoreDumpReplaceSystemDump</literal> sets up the
2655 VM to override the host's core dumping mechanism and in the event
2656 of any crash only the &product-name; CoreDumper would produce the
2657 core file.
2658 </para>
2659
2660 <para>
2661 Setting <literal>CoreDumpLive</literal> sets up the VM to produce
2662 cores whenever the VM process receives a
2663 <literal>SIGUSR2</literal> signal. After producing the core file,
2664 the VM will not be terminated and will continue to run. You can
2665 thus take cores of the VM process using the following command:
2666 </para>
2667
2668<screen>$ kill -s SIGUSR2 <replaceable>VM-process-id</replaceable></screen>
2669
2670 <para>
2671 The &product-name; CoreDumper creates core files of the form
2672 <filename>core.vb.<replaceable>process-name</replaceable>.<replaceable>process-ID</replaceable></filename>
2673 such as <filename>core.vb.VBoxHeadless.11321</filename>.
2674 </para>
2675
2676 </sect1>
2677
2678 <sect1 id="vboxandsolzvmm">
2679
2680 <title>&product-name; and Oracle Solaris Kernel Zones</title>
2681
2682 <para>
2683 Oracle Solaris kernel zones on x86-based systems make use of
2684 hardware-assisted virtualization features like &product-name;
2685 does. However, for kernel zones and &product-name; to share this
2686 hardware resource, they need to cooperate.
2687 </para>
2688
2689 <para>
2690 By default, due to performance reasons, &product-name; acquires
2691 the hardware-assisted virtualization resource (VT-x/AMD-V)
2692 globally on the host machine and uses it until the last
2693 &product-name; VM that requires it is powered off. This prevents
2694 other software from using VT-x/AMD-V during the time
2695 &product-name; has taken control of it.
2696 </para>
2697
2698 <para>
2699 &product-name; can be instructed to relinquish use of
2700 hardware-assisted virtualization features when not executing guest
2701 code, thereby allowing kernel zones to make use of them. To do
2702 this, shutdown all &product-name; VMs and execute the following
2703 command:
2704 </para>
2705
2706<screen>$ VBoxManage setproperty hwvirtexclusive off</screen>
2707
2708 <para>
2709 This command needs to be executed only once as the setting is
2710 stored as part of the global &product-name; settings which will
2711 continue to persist across host-reboots and &product-name;
2712 upgrades.
2713 </para>
2714
2715 </sect1>
2716
2717 <sect1 id="guitweaks">
2718
2719 <title>Locking Down the &product-name; GUI</title>
2720
2721 <sect2 id="customize-vm-manager">
2722
2723 <title>Customizing the VirtualBox Manager</title>
2724
2725 <para>
2726 There are several advanced customization settings for locking
2727 down the VirtualBox Manager. Locking down means removing some
2728 features that the user should not see.
2729 </para>
2730
2731<screen>VBoxManage setextradata global GUI/Customizations <replaceable>property</replaceable>[,<replaceable>property</replaceable> ...]</screen>
2732
2733 <para>
2734 <replaceable>property</replaceable> is one of the following
2735 properties:
2736 </para>
2737
2738 <variablelist>
2739
2740 <varlistentry>
2741 <term>
2742 <literal>noSelector</literal>
2743 </term>
2744
2745 <listitem>
2746 <para>
2747 Do not allow users to start the VirtualBox Manager. Trying
2748 to do so will show a window containing a proper error
2749 message.
2750 </para>
2751 </listitem>
2752 </varlistentry>
2753
2754 <varlistentry>
2755 <term>
2756 <literal>noMenuBar</literal>
2757 </term>
2758
2759 <listitem>
2760 <para>
2761 VM windows will not contain a menu bar.
2762 </para>
2763 </listitem>
2764 </varlistentry>
2765
2766 <varlistentry>
2767 <term>
2768 <literal>noStatusBar</literal>
2769 </term>
2770
2771 <listitem>
2772 <para>
2773 VM windows will not contain a status bar.
2774 </para>
2775 </listitem>
2776 </varlistentry>
2777
2778 </variablelist>
2779
2780 <para>
2781 To disable any of these VirtualBox Manager customizations use
2782 the following command:
2783 </para>
2784
2785<screen>$ VBoxManage setextradata global GUI/Customizations</screen>
2786
2787 </sect2>
2788
2789 <sect2 id="customize-vm-selector">
2790
2791 <title>VM Selector Customization</title>
2792
2793 <para>
2794 The following per-machine VM extradata settings can be used to
2795 change the behavior of the VM selector window in respect of
2796 certain VMs:
2797 </para>
2798
2799<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> <replaceable>property</replaceable> true</screen>
2800
2801 <para>
2802 <replaceable>property</replaceable> can be any of the following:
2803 </para>
2804
2805 <variablelist>
2806
2807 <varlistentry>
2808 <term>
2809 <literal>GUI/HideDetails</literal>
2810 </term>
2811
2812 <listitem>
2813 <para>
2814 Do not show the VM configuration of a certain VM. The
2815 details window will remain just empty if this VM is
2816 selected.
2817 </para>
2818 </listitem>
2819 </varlistentry>
2820
2821 <varlistentry>
2822 <term>
2823 <literal>GUI/PreventReconfiguration</literal>
2824 </term>
2825
2826 <listitem>
2827 <para>
2828 Do not allow the user to open the
2829 <emphasis role="bold">Settings</emphasis> dialog for a
2830 certain VM.
2831 </para>
2832 </listitem>
2833 </varlistentry>
2834
2835 <varlistentry>
2836 <term>
2837 <literal>GUI/PreventSnapshotOperations</literal>
2838 </term>
2839
2840 <listitem>
2841 <para>
2842 Prevent snapshot operations for a VM from the GUI, either
2843 at runtime or when the VM is powered off.
2844 </para>
2845 </listitem>
2846 </varlistentry>
2847
2848 <varlistentry>
2849 <term>
2850 <literal>GUI/HideFromManager</literal>
2851 </term>
2852
2853 <listitem>
2854 <para>
2855 Hide a certain VM in the VM selector window.
2856 </para>
2857 </listitem>
2858 </varlistentry>
2859
2860 <varlistentry>
2861 <term>
2862 <literal>GUI/PreventApplicationUpdate</literal>
2863 </term>
2864
2865 <listitem>
2866 <para>
2867 Disable the automatic update check and hide the
2868 corresponding menu item.
2869 </para>
2870 </listitem>
2871 </varlistentry>
2872
2873 </variablelist>
2874
2875 <para>
2876 Note that these settings do not prevent the user from
2877 reconfiguring the VM by using the <command>VBoxManage
2878 modifyvm</command> command.
2879 </para>
2880
2881 </sect2>
2882
2883 <sect2 id="config-vm-selector-menu">
2884
2885 <title>Configure VM Selector Menu Entries</title>
2886
2887 <para>
2888 You can disable certain entries in the global settings page of
2889 the VM selector:
2890 </para>
2891
2892<screen>$ VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
2893
2894 <para>
2895 <replaceable>property</replaceable> is one of the following:
2896 </para>
2897
2898 <variablelist>
2899
2900 <varlistentry>
2901 <term>
2902 <literal>General</literal>
2903 </term>
2904
2905 <listitem>
2906 <para>
2907 Do not show the <emphasis role="bold">General</emphasis>
2908 settings pane.
2909 </para>
2910 </listitem>
2911 </varlistentry>
2912
2913 <varlistentry>
2914 <term>
2915 <literal>Input</literal>
2916 </term>
2917
2918 <listitem>
2919 <para>
2920 Do not show the <emphasis role="bold">Input</emphasis>
2921 settings pane.
2922 </para>
2923 </listitem>
2924 </varlistentry>
2925
2926 <varlistentry>
2927 <term>
2928 <literal>Update</literal>
2929 </term>
2930
2931 <listitem>
2932 <para>
2933 Do not show the <emphasis role="bold">Update</emphasis>
2934 settings pane.
2935 </para>
2936 </listitem>
2937 </varlistentry>
2938
2939 <varlistentry>
2940 <term>
2941 <literal>Language</literal>
2942 </term>
2943
2944 <listitem>
2945 <para>
2946 Do not show the <emphasis role="bold">Language</emphasis>
2947 settings pane.
2948 </para>
2949 </listitem>
2950 </varlistentry>
2951
2952 <varlistentry>
2953 <term>
2954 <literal>Display</literal>
2955 </term>
2956
2957 <listitem>
2958 <para>
2959 Do not show the <emphasis role="bold">Display</emphasis>
2960 settings pane.
2961 </para>
2962 </listitem>
2963 </varlistentry>
2964
2965 <varlistentry>
2966 <term>
2967 <literal>Network</literal>
2968 </term>
2969
2970 <listitem>
2971 <para>
2972 Do not show the <emphasis role="bold">Network</emphasis>
2973 settings pane.
2974 </para>
2975 </listitem>
2976 </varlistentry>
2977
2978 <varlistentry>
2979 <term>
2980 <literal>Extensions</literal>
2981 </term>
2982
2983 <listitem>
2984 <para>
2985 Do not show the
2986 <emphasis role="bold">Extensions</emphasis> settings pane.
2987 </para>
2988 </listitem>
2989 </varlistentry>
2990
2991 <varlistentry>
2992 <term>
2993 <literal>Proxy</literal>
2994 </term>
2995
2996 <listitem>
2997 <para>
2998 Do not show the <emphasis role="bold">Proxy</emphasis>
2999 settings pane.
3000 </para>
3001 </listitem>
3002 </varlistentry>
3003
3004 </variablelist>
3005
3006 <para>
3007 This is a global setting. You can specify any combination of
3008 properties. To restore the default behavior, use the following
3009 command:
3010 </para>
3011
3012<screen>$ VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages</screen>
3013
3014 </sect2>
3015
3016 <sect2 id="config-vm-window-menu">
3017
3018 <title>Configure VM Window Menu Entries</title>
3019
3020 <para>
3021 You can disable certain menu actions in the VM window:
3022 </para>
3023
3024<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMenus OPTION[,OPTION...]</screen>
3025
3026 <para>
3027 where <literal>OPTION</literal> is one of the following
3028 keywords:
3029 </para>
3030
3031 <variablelist>
3032
3033 <varlistentry>
3034 <term>
3035 <literal>All</literal>
3036 </term>
3037
3038 <listitem>
3039 <para>
3040 Do not show any menu in the VM window.
3041 </para>
3042 </listitem>
3043 </varlistentry>
3044
3045 <varlistentry>
3046 <term>
3047 <literal>Application</literal>
3048 </term>
3049
3050 <listitem>
3051 <para>
3052 Do not show
3053 <emphasis role="bold">Application/File</emphasis> menu in
3054 the VM window.
3055 </para>
3056 </listitem>
3057 </varlistentry>
3058
3059 <varlistentry>
3060 <term>
3061 <literal>Machine</literal>
3062 </term>
3063
3064 <listitem>
3065 <para>
3066 Do not show the <emphasis role="bold">Machine</emphasis>
3067 menu in the VM window.
3068 </para>
3069 </listitem>
3070 </varlistentry>
3071
3072 <varlistentry>
3073 <term>
3074 <literal>View</literal>
3075 </term>
3076
3077 <listitem>
3078 <para>
3079 Do not show the <emphasis role="bold">View</emphasis> menu
3080 in the VM window.
3081 </para>
3082 </listitem>
3083 </varlistentry>
3084
3085 <varlistentry>
3086 <term>
3087 <literal>Input</literal>
3088 </term>
3089
3090 <listitem>
3091 <para>
3092 Do not show <emphasis role="bold">Input</emphasis> menu in
3093 the VM window.
3094 </para>
3095 </listitem>
3096 </varlistentry>
3097
3098 <varlistentry>
3099 <term>
3100 <literal>Devices</literal>
3101 </term>
3102
3103 <listitem>
3104 <para>
3105 Do not show the <emphasis role="bold">Devices</emphasis>
3106 menu in the VM window.
3107 </para>
3108 </listitem>
3109 </varlistentry>
3110
3111 <varlistentry>
3112 <term>
3113 <literal>Help</literal>
3114 </term>
3115
3116 <listitem>
3117 <para>
3118 Do not show the <emphasis role="bold">Help</emphasis> menu
3119 in the VM window.
3120 </para>
3121 </listitem>
3122 </varlistentry>
3123
3124 <varlistentry>
3125 <term>
3126 <literal>Debug</literal>
3127 </term>
3128
3129 <listitem>
3130 <para>
3131 Do not show the <emphasis role="bold">Debug</emphasis>
3132 menu in the VM window. The Debug menu is only visible if
3133 the GUI was started with special command line parameters
3134 or environment variable settings.
3135 </para>
3136 </listitem>
3137 </varlistentry>
3138
3139 </variablelist>
3140
3141 <para>
3142 This is a per-VM or global setting. Any combination of the above
3143 is allowed. To restore the default behavior, use the following
3144 command:
3145 </para>
3146
3147<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMenus</screen>
3148
3149 <para>
3150 You can also disable certain menu actions of certain menus. Use
3151 the following command to disable certain actions of the
3152 <emphasis role="bold">Application</emphasis> menu. This is only
3153 available on Mac OS X hosts.
3154 </para>
3155
3156<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
3157
3158 <para>
3159 where <literal>OPTION</literal> is one of the following
3160 keywords:
3161 </para>
3162
3163 <variablelist>
3164
3165 <varlistentry>
3166 <term>
3167 <literal>All</literal>
3168 </term>
3169
3170 <listitem>
3171 <para>
3172 Do not show any menu item in this menu.
3173 </para>
3174 </listitem>
3175 </varlistentry>
3176
3177 <varlistentry>
3178 <term>
3179 <literal>About</literal>
3180 </term>
3181
3182 <listitem>
3183 <para>
3184 Do not show the <emphasis role="bold">About</emphasis>
3185 menu item in this menu.
3186 </para>
3187 </listitem>
3188 </varlistentry>
3189
3190 <varlistentry>
3191 <term>
3192 <literal>Preferences</literal>
3193 </term>
3194
3195 <listitem>
3196 <para>
3197 Do not show the
3198 <emphasis role="bold">Preferences</emphasis> menu item in
3199 this menu.
3200 </para>
3201 </listitem>
3202 </varlistentry>
3203
3204 <varlistentry>
3205 <term>
3206 <literal>NetworkAccessManager</literal>
3207 </term>
3208
3209 <listitem>
3210 <para>
3211 Do not show the <emphasis role="bold">Network Operations
3212 Manager</emphasis> menu item in this menu.
3213 </para>
3214 </listitem>
3215 </varlistentry>
3216
3217 <varlistentry>
3218 <term>
3219 <literal>ResetWarnings</literal>
3220 </term>
3221
3222 <listitem>
3223 <para>
3224 Do not show the <emphasis role="bold">Reset All
3225 Warnings</emphasis> menu item in this menu.
3226 </para>
3227 </listitem>
3228 </varlistentry>
3229
3230 <varlistentry>
3231 <term>
3232 <literal>Close</literal>
3233 </term>
3234
3235 <listitem>
3236 <para>
3237 Do not show the <emphasis role="bold">Close</emphasis>
3238 menu item in this menu.
3239 </para>
3240 </listitem>
3241 </varlistentry>
3242
3243 </variablelist>
3244
3245 <para>
3246 This is a per-VM or global setting. Any combination of the above
3247 is allowed. To restore the default behavior, use the following
3248 command:
3249 </para>
3250
3251<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMenus</screen>
3252
3253 <para>
3254 Use the following command to disable certain actions of the
3255 <emphasis role="bold">Machine</emphasis> menu:
3256 </para>
3257
3258<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMachineMenuActions OPTION[,OPTION...]</screen>
3259
3260 <para>
3261 where <literal>OPTION</literal> is one of the following
3262 keywords:
3263 </para>
3264
3265 <variablelist>
3266
3267 <varlistentry>
3268 <term>
3269 <literal>All</literal>
3270 </term>
3271
3272 <listitem>
3273 <para>
3274 Do not show any menu item in this menu.
3275 </para>
3276 </listitem>
3277 </varlistentry>
3278
3279 <varlistentry>
3280 <term>
3281 <literal>SettingsDialog</literal>
3282 </term>
3283
3284 <listitem>
3285 <para>
3286 Do not show the <emphasis role="bold">Settings</emphasis>
3287 menu item in this menu.
3288 </para>
3289 </listitem>
3290 </varlistentry>
3291
3292 <varlistentry>
3293 <term>
3294 <literal>TakeSnapshot</literal>
3295 </term>
3296
3297 <listitem>
3298 <para>
3299 Do not show the <emphasis role="bold">Take
3300 Snapshot...</emphasis> menu item in this menu.
3301 </para>
3302 </listitem>
3303 </varlistentry>
3304
3305 <varlistentry>
3306 <term>
3307 <literal>InformationDialog</literal>
3308 </term>
3309
3310 <listitem>
3311 <para>
3312 Do not show the <emphasis role="bold">Session
3313 Information...</emphasis> menu item in this menu.
3314 </para>
3315 </listitem>
3316 </varlistentry>
3317
3318 <varlistentry>
3319 <term>
3320 <literal>FileManagerDialog</literal>
3321 </term>
3322
3323 <listitem>
3324 <para>
3325 Do not show the <emphasis role="bold">File
3326 Manager...</emphasis> menu item in this menu.
3327 </para>
3328 </listitem>
3329 </varlistentry>
3330
3331 <varlistentry>
3332 <term>
3333 <literal>Pause</literal>
3334 </term>
3335
3336 <listitem>
3337 <para>
3338 Do not show the <emphasis role="bold">Pause</emphasis>
3339 menu item in this menu.
3340 </para>
3341 </listitem>
3342 </varlistentry>
3343
3344 <varlistentry>
3345 <term>
3346 <literal>Reset</literal>
3347 </term>
3348
3349 <listitem>
3350 <para>
3351 Do not show the <emphasis role="bold">Reset</emphasis>
3352 menu item in this menu.
3353 </para>
3354 </listitem>
3355 </varlistentry>
3356
3357 <varlistentry>
3358 <term>
3359 <literal>Shutdown</literal>
3360 </term>
3361
3362 <listitem>
3363 <para>
3364 Do not show the <emphasis role="bold">ACPI
3365 Shutdown</emphasis> menu item in this menu.
3366 </para>
3367 </listitem>
3368 </varlistentry>
3369
3370 </variablelist>
3371
3372 <para>
3373 This is a per-VM or global setting. Any combination of the above
3374 is allowed. To restore the default behavior, use
3375 </para>
3376
3377<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMachineMenuActions</screen>
3378
3379 <para>
3380 Use the following command to disable certain actions of the
3381 <emphasis role="bold">View</emphasis> menu:
3382 </para>
3383
3384<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeViewMenuActions OPTION[,OPTION...]</screen>
3385
3386 <para>
3387 where <literal>OPTION</literal> is one of the following
3388 keywords:
3389 </para>
3390
3391 <variablelist>
3392
3393 <varlistentry>
3394 <term>
3395 <literal>All</literal>
3396 </term>
3397
3398 <listitem>
3399 <para>
3400 Do not show any menu item in this menu.
3401 </para>
3402 </listitem>
3403 </varlistentry>
3404
3405 <varlistentry>
3406 <term>
3407 <literal>Fullscreen</literal>
3408 </term>
3409
3410 <listitem>
3411 <para>
3412 Do not show the <emphasis role="bold">Full-screen
3413 Mode</emphasis> menu item in this menu.
3414 </para>
3415 </listitem>
3416 </varlistentry>
3417
3418 <varlistentry>
3419 <term>
3420 <literal>Seamless</literal>
3421 </term>
3422
3423 <listitem>
3424 <para>
3425 Do not show the <emphasis role="bold">Seamless
3426 Mode</emphasis> menu item in this menu.
3427 </para>
3428 </listitem>
3429 </varlistentry>
3430
3431 <varlistentry>
3432 <term>
3433 <literal>Scale</literal>
3434 </term>
3435
3436 <listitem>
3437 <para>
3438 Do not show the <emphasis role="bold">Scaled
3439 Mode</emphasis> menu item in this menu.
3440 </para>
3441 </listitem>
3442 </varlistentry>
3443
3444 <varlistentry>
3445 <term>
3446 <literal>GuestAutoresize</literal>
3447 </term>
3448
3449 <listitem>
3450 <para>
3451 Do not show the <emphasis role="bold">Auto-resize Guest
3452 Display</emphasis> menu item in this menu.
3453 </para>
3454 </listitem>
3455 </varlistentry>
3456
3457 <varlistentry>
3458 <term>
3459 <literal>AdjustWindow</literal>
3460 </term>
3461
3462 <listitem>
3463 <para>
3464 Do not show the <emphasis role="bold">Adjust Window
3465 Size</emphasis> menu item in this menu.
3466 </para>
3467 </listitem>
3468 </varlistentry>
3469
3470 <varlistentry>
3471 <term>
3472 <literal>TakeScreenshot</literal>
3473 </term>
3474
3475 <listitem>
3476 <para>
3477 Do not show the <emphasis role="bold">Take
3478 Screenshot...</emphasis> menu item in this menu.
3479 </para>
3480 </listitem>
3481 </varlistentry>
3482
3483 <varlistentry>
3484 <term>
3485 <literal>Recording</literal>
3486 </term>
3487
3488 <listitem>
3489 <para>
3490 Do not show the <emphasis role="bold">Recording</emphasis>
3491 menu item in this menu.
3492 </para>
3493 </listitem>
3494 </varlistentry>
3495
3496 <varlistentry>
3497 <term>
3498 <literal>VRDEServer</literal>
3499 </term>
3500
3501 <listitem>
3502 <para>
3503 Do not show the <emphasis role="bold">Remote
3504 Display</emphasis> menu item in this menu.
3505 </para>
3506 </listitem>
3507 </varlistentry>
3508
3509 <varlistentry>
3510 <term>
3511 <literal>MenuBar</literal>
3512 </term>
3513
3514 <listitem>
3515 <para>
3516 Do not show the <emphasis role="bold">Menu Bar</emphasis>
3517 menu item in this menu.
3518 </para>
3519 </listitem>
3520 </varlistentry>
3521
3522 <varlistentry>
3523 <term>
3524 <literal>MenuBarSettings</literal>
3525 </term>
3526
3527 <listitem>
3528 <para>
3529 Do not show the <emphasis role="bold">Menu Bar
3530 Settings...</emphasis> menu item in this menu.
3531 </para>
3532 </listitem>
3533 </varlistentry>
3534
3535 <varlistentry>
3536 <term>
3537 <literal>StatusBar</literal>
3538 </term>
3539
3540 <listitem>
3541 <para>
3542 Do not show the <emphasis role="bold">Status
3543 Bar</emphasis> menu item in this menu.
3544 </para>
3545 </listitem>
3546 </varlistentry>
3547
3548 <varlistentry>
3549 <term>
3550 <literal>StatusbarSettings</literal>
3551 </term>
3552
3553 <listitem>
3554 <para>
3555 Do not show the <emphasis role="bold">Statusbar
3556 Settings...</emphasis> menu item in this menu.
3557 </para>
3558 </listitem>
3559 </varlistentry>
3560
3561 </variablelist>
3562
3563 <para>
3564 This is a per-VM or global setting. Any combination of the above
3565 is allowed. To restore the default behavior, use
3566 </para>
3567
3568<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeViewMenuActions</screen>
3569
3570 <para>
3571 Use the following command to disable certain actions of the
3572 <emphasis role="bold">Input</emphasis> menu:
3573 </para>
3574
3575<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeInputMenuActions OPTION[,OPTION...]</screen>
3576
3577 <para>
3578 where <literal>OPTION</literal> is one of the following
3579 keywords:
3580 </para>
3581
3582 <variablelist>
3583
3584 <varlistentry>
3585 <term>
3586 <literal>All</literal>
3587 </term>
3588
3589 <listitem>
3590 <para>
3591 Do not show any menu item in this menu.
3592 </para>
3593 </listitem>
3594 </varlistentry>
3595
3596 <varlistentry>
3597 <term>
3598 <literal>Keyboard</literal>
3599 </term>
3600
3601 <listitem>
3602 <para>
3603 Do not show the <emphasis role="bold">Keyboard</emphasis>
3604 menu item in this menu.
3605 </para>
3606 </listitem>
3607 </varlistentry>
3608
3609 <varlistentry>
3610 <term>
3611 <literal>KeyboardSettings</literal>
3612 </term>
3613
3614 <listitem>
3615 <para>
3616 Do not show the <emphasis role="bold">Keyboard
3617 Settings...</emphasis> menu item in this menu.
3618 </para>
3619 </listitem>
3620 </varlistentry>
3621
3622 <varlistentry>
3623 <term>
3624 <literal>SoftKeyboard</literal>
3625 </term>
3626
3627 <listitem>
3628 <para>
3629 Do not show the <emphasis role="bold">Soft
3630 Keyboard...</emphasis> menu item in this menu.
3631 </para>
3632 </listitem>
3633 </varlistentry>
3634
3635 <varlistentry>
3636 <term>
3637 <literal>TypeCAD</literal>
3638 </term>
3639
3640 <listitem>
3641 <para>
3642 Do not show the <emphasis role="bold">Insert
3643 Ctrl-Alt-Del</emphasis> menu item in this menu.
3644 </para>
3645 </listitem>
3646 </varlistentry>
3647
3648 <varlistentry>
3649 <term>
3650 <literal>TypeCABS</literal>
3651 </term>
3652
3653 <listitem>
3654 <para>
3655 Do not show the <emphasis role="bold">Insert
3656 Ctrl-Alt-Backspace</emphasis> menu item in this menu.
3657 </para>
3658 </listitem>
3659 </varlistentry>
3660
3661 <varlistentry>
3662 <term>
3663 <literal>TypeCtrlBreak</literal>
3664 </term>
3665
3666 <listitem>
3667 <para>
3668 Do not show the <emphasis role="bold">Insert
3669 Ctrl-Break</emphasis> menu item in this menu.
3670 </para>
3671 </listitem>
3672 </varlistentry>
3673
3674 <varlistentry>
3675 <term>
3676 <literal>TypeInsert</literal>
3677 </term>
3678
3679 <listitem>
3680 <para>
3681 Do not show the <emphasis role="bold">Insert
3682 Insert</emphasis> menu item in this menu.
3683 </para>
3684 </listitem>
3685 </varlistentry>
3686
3687 <varlistentry>
3688 <term>
3689 <literal>TypePrintScreen</literal>
3690 </term>
3691
3692 <listitem>
3693 <para>
3694 Do not show the <emphasis role="bold">Insert Print
3695 Screen</emphasis> menu item in this menu.
3696 </para>
3697 </listitem>
3698 </varlistentry>
3699
3700 <varlistentry>
3701 <term>
3702 <literal>TypeAltPrintScreen</literal>
3703 </term>
3704
3705 <listitem>
3706 <para>
3707 Do not show the <emphasis role="bold">Insert Alt Print
3708 Screen</emphasis> menu item in this menu.
3709 </para>
3710 </listitem>
3711 </varlistentry>
3712
3713 <varlistentry>
3714 <term>
3715 <literal>TypeHostKeyCombo</literal>
3716 </term>
3717
3718 <listitem>
3719 <para>
3720 Do not show the <emphasis role="bold">Insert Host Key
3721 Combo</emphasis> menu item in this menu.
3722 </para>
3723 </listitem>
3724 </varlistentry>
3725
3726 <varlistentry>
3727 <term>
3728 <literal>MouseIntegration</literal>
3729 </term>
3730
3731 <listitem>
3732 <para>
3733 Do not show the
3734 <emphasis role="bold">MouseIntegration</emphasis> menu
3735 item in this menu.
3736 </para>
3737 </listitem>
3738 </varlistentry>
3739
3740 </variablelist>
3741
3742 <para>
3743 This is a per-VM or global setting. Any combination of the above
3744 is allowed. To restore the default behavior, use
3745 </para>
3746
3747<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeInputMenuActions</screen>
3748
3749 <para>
3750 Use the following command to disable certain actions of the
3751 <emphasis role="bold">Devices</emphasis> menu:
3752 </para>
3753
3754<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDevicesMenuActions OPTION[,OPTION...]</screen>
3755
3756 <para>
3757 where <literal>OPTION</literal> is one of the following keywords
3758 to disable actions in the
3759 <emphasis role="bold">Devices</emphasis> menu:
3760 </para>
3761
3762 <variablelist>
3763
3764 <varlistentry>
3765 <term>
3766 <literal>All</literal>
3767 </term>
3768
3769 <listitem>
3770 <para>
3771 Do not show any menu item in this menu.
3772 </para>
3773 </listitem>
3774 </varlistentry>
3775
3776 <varlistentry>
3777 <term>
3778 <literal>HardDrives</literal>
3779 </term>
3780
3781 <listitem>
3782 <para>
3783 Do not show the <emphasis role="bold">Hard
3784 Disks</emphasis> menu item in this menu.
3785 </para>
3786 </listitem>
3787 </varlistentry>
3788
3789 <varlistentry>
3790 <term>
3791 <literal>OpticalDevices</literal>
3792 </term>
3793
3794 <listitem>
3795 <para>
3796 Do not show the <emphasis role="bold">Optical
3797 Devices</emphasis> menu item in this menu.
3798 </para>
3799 </listitem>
3800 </varlistentry>
3801
3802 <varlistentry>
3803 <term>
3804 <literal>FloppyDevices</literal>
3805 </term>
3806
3807 <listitem>
3808 <para>
3809 Do not show the <emphasis role="bold">Floppy
3810 Drives</emphasis> menu item in this menu.
3811 </para>
3812 </listitem>
3813 </varlistentry>
3814
3815 <varlistentry>
3816 <term>
3817 <literal>Audio</literal>
3818 </term>
3819
3820 <listitem>
3821 <para>
3822 Do not show the <emphasis role="bold">Audio</emphasis>
3823 menu item in this menu.
3824 </para>
3825 </listitem>
3826 </varlistentry>
3827
3828 <varlistentry>
3829 <term>
3830 <literal>Network</literal>
3831 </term>
3832
3833 <listitem>
3834 <para>
3835 Do not show the <emphasis role="bold">Network</emphasis>
3836 menu item in this menu.
3837 </para>
3838 </listitem>
3839 </varlistentry>
3840
3841 <varlistentry>
3842 <term>
3843 <literal>NetworkSettings</literal>
3844 </term>
3845
3846 <listitem>
3847 <para>
3848 Do not show the <emphasis role="bold">Network
3849 Settings</emphasis> menu item in this menu.
3850 </para>
3851 </listitem>
3852 </varlistentry>
3853
3854 <varlistentry>
3855 <term>
3856 <literal>USBDevices</literal>
3857 </term>
3858
3859 <listitem>
3860 <para>
3861 Do not show the <emphasis role="bold">USB </emphasis> menu
3862 item in this menu.
3863 </para>
3864 </listitem>
3865 </varlistentry>
3866
3867 <varlistentry>
3868 <term>
3869 <literal>WebCams</literal>
3870 </term>
3871
3872 <listitem>
3873 <para>
3874 Do not show the <emphasis role="bold">WebCams </emphasis>
3875 menu item in this menu.
3876 </para>
3877 </listitem>
3878 </varlistentry>
3879
3880 <varlistentry>
3881 <term>
3882 <literal>SharedFolders</literal>
3883 </term>
3884
3885 <listitem>
3886 <para>
3887 Do not show the <emphasis role="bold">Shared
3888 Folders</emphasis> menu item in this menu.
3889 </para>
3890 </listitem>
3891 </varlistentry>
3892
3893 <varlistentry>
3894 <term>
3895 <literal>SharedFoldersSettings</literal>
3896 </term>
3897
3898 <listitem>
3899 <para>
3900 Do not show the <emphasis role="bold">Shared Folders
3901 Settings...</emphasis> menu item in this menu.
3902 </para>
3903 </listitem>
3904 </varlistentry>
3905
3906 <varlistentry>
3907 <term>
3908 <literal>SharedClipboard</literal>
3909 </term>
3910
3911 <listitem>
3912 <para>
3913 Do not show the <emphasis role="bold">Shared
3914 Clipboard</emphasis> menu item in this menu.
3915 </para>
3916 </listitem>
3917 </varlistentry>
3918
3919 <varlistentry>
3920 <term>
3921 <literal>DragAndDrop</literal>
3922 </term>
3923
3924 <listitem>
3925 <para>
3926 Do not show the <emphasis role="bold">Drag and
3927 Drop</emphasis> menu item in this menu.
3928 </para>
3929 </listitem>
3930 </varlistentry>
3931
3932 <varlistentry>
3933 <term>
3934 <literal>InstallGuestTools</literal>
3935 </term>
3936
3937 <listitem>
3938 <para>
3939 Do not show the <emphasis role="bold">Insert Guest
3940 Additions CD image...</emphasis> menu item in this menu.
3941 </para>
3942 </listitem>
3943 </varlistentry>
3944
3945 </variablelist>
3946
3947 <para>
3948 This is a per-VM or global or global setting. Any combination of
3949 the above is allowed. To restore the default behavior, use
3950 </para>
3951
3952<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDevicesMenuActions</screen>
3953
3954 <para>
3955 Use the following command to disable certain actions of the
3956 <emphasis role="bold">Debug</emphasis> menu:
3957 </para>
3958
3959<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDebuggerMenuActions OPTION[,OPTION...]</screen>
3960
3961 <para>
3962 where <literal>OPTION</literal> is one of the following keywords
3963 to disable actions in the <emphasis>Debug</emphasis> menu, which
3964 is normally completely disabled:
3965 </para>
3966
3967 <variablelist>
3968
3969 <varlistentry>
3970 <term>
3971 <literal>All</literal>
3972 </term>
3973
3974 <listitem>
3975 <para>
3976 Do not show any menu item in this menu.
3977 </para>
3978 </listitem>
3979 </varlistentry>
3980
3981 <varlistentry>
3982 <term>
3983 <literal>Statistics</literal>
3984 </term>
3985
3986 <listitem>
3987 <para>
3988 Do not show the
3989 <emphasis role="bold">Statistics...</emphasis> menu item
3990 in this menu.
3991 </para>
3992 </listitem>
3993 </varlistentry>
3994
3995 <varlistentry>
3996 <term>
3997 <literal>CommandLine</literal>
3998 </term>
3999
4000 <listitem>
4001 <para>
4002 Do not show the <emphasis role="bold">Command
4003 Line...</emphasis> menu item in this menu.
4004 </para>
4005 </listitem>
4006 </varlistentry>
4007
4008 <varlistentry>
4009 <term>
4010 <literal>Logging</literal>
4011 </term>
4012
4013 <listitem>
4014 <para>
4015 Do not show the
4016 <emphasis role="bold">Logging...</emphasis> menu item in
4017 this menu.
4018 </para>
4019 </listitem>
4020 </varlistentry>
4021
4022 <varlistentry>
4023 <term>
4024 <literal>LogDialog</literal>
4025 </term>
4026
4027 <listitem>
4028 <para>
4029 Do not show the <emphasis role="bold">Show
4030 Log...</emphasis> menu item in this menu.
4031 </para>
4032 </listitem>
4033 </varlistentry>
4034
4035 <varlistentry>
4036 <term>
4037 <literal>GuestControlConsole</literal>
4038 </term>
4039
4040 <listitem>
4041 <para>
4042 Do not show the <emphasis role="bold">Guest Control
4043 Terminal...</emphasis> menu item in this menu.
4044 </para>
4045 </listitem>
4046 </varlistentry>
4047
4048 </variablelist>
4049
4050 <para>
4051 This is a per-VM or global setting. Any combination of the above
4052 is allowed. To restore the default behavior, use
4053 </para>
4054
4055<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDebuggerMenuActions</screen>
4056
4057 <para>
4058 Use the following command to disable certain actions of the
4059 <emphasis role="bold">View</emphasis> menu:
4060 </para>
4061
4062<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeHelpMenuActions OPTION[,OPTION...]</screen>
4063
4064 <para>
4065 where <literal>OPTION</literal> is one of the following keywords
4066 to disable actions in the <emphasis role="bold">Help</emphasis>
4067 menu, which is normally completely disabled:
4068 </para>
4069
4070 <variablelist>
4071
4072 <varlistentry>
4073 <term>
4074 <literal>All</literal>
4075 </term>
4076
4077 <listitem>
4078 <para>
4079 Do not show any menu item in this menu.
4080 </para>
4081 </listitem>
4082 </varlistentry>
4083
4084 <varlistentry>
4085 <term>
4086 <literal>Contents</literal>
4087 </term>
4088
4089 <listitem>
4090 <para>
4091 Do not show the
4092 <emphasis role="bold">Contents...</emphasis> menu item in
4093 this menu.
4094 </para>
4095 </listitem>
4096 </varlistentry>
4097
4098 <varlistentry>
4099 <term>
4100 <literal>WebSite</literal>
4101 </term>
4102
4103 <listitem>
4104 <para>
4105 Do not show the <emphasis role="bold">VirtualBox Web
4106 Site...</emphasis> menu item in this menu.
4107 </para>
4108 </listitem>
4109 </varlistentry>
4110
4111 <varlistentry>
4112 <term>
4113 <literal>BugTracker</literal>
4114 </term>
4115
4116 <listitem>
4117 <para>
4118 Do not show the <emphasis role="bold">VirtualBox Bug
4119 Tracker...</emphasis> menu item in this menu.
4120 </para>
4121 </listitem>
4122 </varlistentry>
4123
4124 <varlistentry>
4125 <term>
4126 <literal>Forums</literal>
4127 </term>
4128
4129 <listitem>
4130 <para>
4131 Do not show the <emphasis role="bold">VirtualBox
4132 Forums...</emphasis> menu item in this menu.
4133 </para>
4134 </listitem>
4135 </varlistentry>
4136
4137 <varlistentry>
4138 <term>
4139 <literal>Oracle</literal>
4140 </term>
4141
4142 <listitem>
4143 <para>
4144 Do not show the <emphasis role="bold">Oracle Web
4145 Site...</emphasis> menu item in this menu.
4146 </para>
4147 </listitem>
4148 </varlistentry>
4149
4150 <varlistentry>
4151 <term>
4152 <literal>About</literal>
4153 </term>
4154
4155 <listitem>
4156 <para>
4157 Do not show the <emphasis role="bold">About
4158 VirtualBox...</emphasis> menu item in this menu. Only for
4159 non-Mac OS X hosts.
4160 </para>
4161 </listitem>
4162 </varlistentry>
4163
4164 </variablelist>
4165
4166 <para>
4167 This is a per-VM or global setting. Any combination of the above
4168 is allowed. To restore the default behavior, use
4169 </para>
4170
4171<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeHelpMenuActions</screen>
4172
4173 </sect2>
4174
4175 <sect2 id="config-vm-window-status-bar">
4176
4177 <title>Configure VM Window Status Bar Entries</title>
4178
4179 <para>
4180 You can disable certain status bar items:
4181 </para>
4182
4183<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedStatusBarIndicators OPTION[,OPTION...]</screen>
4184
4185 <para>
4186 where <literal>OPTION</literal> is one of the following
4187 keywords:
4188 </para>
4189
4190 <variablelist>
4191
4192 <varlistentry>
4193 <term>
4194 <literal>HardDisks</literal>
4195 </term>
4196
4197 <listitem>
4198 <para>
4199 Do not show the hard disk icon in the VM window status
4200 bar. By default the hard disk icon is only shown if the VM
4201 configuration contains one or more hard disks.
4202 </para>
4203 </listitem>
4204 </varlistentry>
4205
4206 <varlistentry>
4207 <term>
4208 <literal>OpticalDisks</literal>
4209 </term>
4210
4211 <listitem>
4212 <para>
4213 Do not show the CD icon in the VM window status bar. By
4214 default the CD icon is only shown if the VM configuration
4215 contains one or more CD drives.
4216 </para>
4217 </listitem>
4218 </varlistentry>
4219
4220 <varlistentry>
4221 <term>
4222 <literal>FloppyDisks</literal>
4223 </term>
4224
4225 <listitem>
4226 <para>
4227 Do not show the floppy icon in the VM window status bar.
4228 By default the floppy icon is only shown if the VM
4229 configuration contains one or more floppy drives.
4230 </para>
4231 </listitem>
4232 </varlistentry>
4233
4234 <varlistentry>
4235 <term>
4236 <literal>Network</literal>
4237 </term>
4238
4239 <listitem>
4240 <para>
4241 Do not show the network icon in the VM window status bar.
4242 By default the network icon is only shown if the VM
4243 configuration contains one or more active network
4244 adapters.
4245 </para>
4246 </listitem>
4247 </varlistentry>
4248
4249 <varlistentry>
4250 <term>
4251 <literal>USB</literal>
4252 </term>
4253
4254 <listitem>
4255 <para>
4256 Do not show the USB icon in the status bar.
4257 </para>
4258 </listitem>
4259 </varlistentry>
4260
4261 <varlistentry>
4262 <term>
4263 <literal>SharedFolders</literal>
4264 </term>
4265
4266 <listitem>
4267 <para>
4268 Do not show the shared folders icon in the status bar.
4269 </para>
4270 </listitem>
4271 </varlistentry>
4272
4273 <varlistentry>
4274 <term>
4275 <literal>Capture</literal>
4276 </term>
4277
4278 <listitem>
4279 <para>
4280 Do not show the capture icon in the status bar.
4281 </para>
4282 </listitem>
4283 </varlistentry>
4284
4285 <varlistentry>
4286 <term>
4287 <literal>Features</literal>
4288 </term>
4289
4290 <listitem>
4291 <para>
4292 Do not show the CPU features icon in the status bar.
4293 </para>
4294 </listitem>
4295 </varlistentry>
4296
4297 <varlistentry>
4298 <term>
4299 <literal>Mouse</literal>
4300 </term>
4301
4302 <listitem>
4303 <para>
4304 Do not show the mouse icon in the status bar.
4305 </para>
4306 </listitem>
4307 </varlistentry>
4308
4309 <varlistentry>
4310 <term>
4311 <literal>Keyboard</literal>
4312 </term>
4313
4314 <listitem>
4315 <para>
4316 Do not show the keyboard icon in the status bar.
4317 </para>
4318 </listitem>
4319 </varlistentry>
4320
4321 </variablelist>
4322
4323 <para>
4324 This is a per-VM or global setting. Any combination of the above
4325 is allowed. If all options are specified, no icons are displayed
4326 in the status bar of the VM window. To restore the default
4327 behavior, use
4328 </para>
4329
4330<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedStatusBarIndicators</screen>
4331
4332 </sect2>
4333
4334 <sect2 id="config-vm-window-visual-modes">
4335
4336 <title>Configure VM Window Visual Modes</title>
4337
4338 <para>
4339 You can disable certain VM visual modes:
4340 </para>
4341
4342<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/RestrictedVisualStates <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
4343
4344 <para>
4345 <replaceable>property</replaceable> is one of the following:
4346 </para>
4347
4348 <variablelist>
4349
4350 <varlistentry>
4351 <term>
4352 <literal>Fullscreen</literal>
4353 </term>
4354
4355 <listitem>
4356 <para>
4357 Do not allow to switch the VM into full screen mode.
4358 </para>
4359 </listitem>
4360 </varlistentry>
4361
4362 <varlistentry>
4363 <term>
4364 <literal>Seamless</literal>
4365 </term>
4366
4367 <listitem>
4368 <para>
4369 Do not allow to switch the VM into seamless mode.
4370 </para>
4371 </listitem>
4372 </varlistentry>
4373
4374 <varlistentry>
4375 <term>
4376 <literal>Scale</literal>
4377 </term>
4378
4379 <listitem>
4380 <para>
4381 Do not allow to switch the VM into scale mode.
4382 </para>
4383 </listitem>
4384 </varlistentry>
4385
4386 </variablelist>
4387
4388 <para>
4389 This is a per-VM setting. You can specify any combination of
4390 properties. To restore the default behavior, use the following
4391 command:
4392 </para>
4393
4394<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/RestrictedVisualStates</screen>
4395
4396 </sect2>
4397
4398 <sect2 id="host-key-customize">
4399
4400 <title>Host Key Customization</title>
4401
4402 <para>
4403 To disable all Host key combinations, open the preferences and
4404 change the Host key to None. This might be useful when using
4405 &product-name; in a kiosk mode.
4406 </para>
4407
4408 <para>
4409 To redefine or disable certain Host key actions, use the
4410 following command:
4411 </para>
4412
4413<screen>$ VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=F,...."</screen>
4414
4415 <para>
4416 The following table shows the possible Host key actions,
4417 together with their default Host key shortcut. Setting an action
4418 to None will disable that Host key action.
4419 </para>
4420
4421 <table id="table-host-key-customize" tabstyle="oracle-all">
4422 <title>Host Key Customization</title>
4423 <tgroup cols="3">
4424 <thead>
4425 <row>
4426 <entry><para>
4427 <emphasis role="bold">Action</emphasis>
4428 </para></entry>
4429 <entry><para>
4430 <emphasis role="bold">Default Key</emphasis>
4431 </para></entry>
4432 <entry><para>
4433 <emphasis role="bold">Action</emphasis>
4434 </para></entry>
4435 </row>
4436 </thead>
4437 <tbody>
4438 <row>
4439 <entry><para>
4440 <literal>TakeSnapshot</literal>
4441 </para></entry>
4442 <entry><para>
4443 T
4444 </para></entry>
4445 <entry><para>
4446 Take a snapshot
4447 </para></entry>
4448 </row>
4449 <row>
4450 <entry><para>
4451 <literal>TakeScreenshot</literal>
4452 </para></entry>
4453 <entry><para>
4454 E
4455 </para></entry>
4456 <entry><para>
4457 Take a screenshot
4458 </para></entry>
4459 </row>
4460 <row>
4461 <entry><para>
4462 <literal>MouseIntegration</literal>
4463 </para></entry>
4464 <entry><para>
4465 I
4466 </para></entry>
4467 <entry><para>
4468 Toggle mouse integration
4469 </para></entry>
4470 </row>
4471 <row>
4472 <entry><para>
4473 <literal>TypeCAD</literal>
4474 </para></entry>
4475 <entry><para>
4476 Del
4477 </para></entry>
4478 <entry><para>
4479 Inject Ctrl+Alt+Del
4480 </para></entry>
4481 </row>
4482 <row>
4483 <entry><para>
4484 <literal>TypeCABS</literal>
4485 </para></entry>
4486 <entry><para>
4487 Backspace
4488 </para></entry>
4489 <entry><para>
4490 Inject Ctrl+Alt+Backspace
4491 </para></entry>
4492 </row>
4493 <row>
4494 <entry><para>
4495 <literal>Pause</literal>
4496 </para></entry>
4497 <entry><para>
4498 P
4499 </para></entry>
4500 <entry><para>
4501 Pause the VM
4502 </para></entry>
4503 </row>
4504 <row>
4505 <entry><para>
4506 <literal>Reset</literal>
4507 </para></entry>
4508 <entry><para>
4509 R
4510 </para></entry>
4511 <entry>Hard reset the guest</entry>
4512 </row>
4513 <row>
4514 <entry><para>
4515 <literal>SaveState</literal>
4516 </para></entry>
4517 <entry><para></para></entry>
4518 <entry><para>
4519 Save the VM state and terminate the VM
4520 </para></entry>
4521 </row>
4522 <row>
4523 <entry><para>
4524 <literal>Shutdown</literal>
4525 </para></entry>
4526 <entry><para>
4527 H
4528 </para></entry>
4529 <entry><para>
4530 Press the virtual ACPI power button
4531 </para></entry>
4532 </row>
4533 <row>
4534 <entry><para>
4535 <literal>PowerOff</literal>
4536 </para></entry>
4537 <entry><para></para></entry>
4538 <entry><para>
4539 Power off the VM without saving the state
4540 </para></entry>
4541 </row>
4542 <row>
4543 <entry><para>
4544 <literal>Close</literal>
4545 </para></entry>
4546 <entry><para>
4547 Q
4548 </para></entry>
4549 <entry><para>
4550 Show the Close VM dialog
4551 </para></entry>
4552 </row>
4553 <row>
4554 <entry><para>
4555 <literal>FullscreenMode</literal>
4556 </para></entry>
4557 <entry><para>
4558 F
4559 </para></entry>
4560 <entry><para>
4561 Switch the VM into full screen mode
4562 </para></entry>
4563 </row>
4564 <row>
4565 <entry><para>
4566 <literal>SeamlessMode</literal>
4567 </para></entry>
4568 <entry><para>
4569 L
4570 </para></entry>
4571 <entry><para>
4572 Switch the VM into seamless mode
4573 </para></entry>
4574 </row>
4575 <row>
4576 <entry><para>
4577 <literal>ScaleMode</literal>
4578 </para></entry>
4579 <entry><para>
4580 C
4581 </para></entry>
4582 <entry><para>
4583 Switch the VM into scaled mode
4584 </para></entry>
4585 </row>
4586 <row>
4587 <entry><para>
4588 <literal>GuestAutoResize</literal>
4589 </para></entry>
4590 <entry><para>
4591 G
4592 </para></entry>
4593 <entry><para>
4594 Automatically resize the guest window
4595 </para></entry>
4596 </row>
4597 <row>
4598 <entry><para>
4599 <literal>WindowAdjust</literal>
4600 </para></entry>
4601 <entry><para>
4602 A
4603 </para></entry>
4604 <entry><para>
4605 Immediately resize the guest window
4606 </para></entry>
4607 </row>
4608 <row>
4609 <entry><para>
4610 <literal>PopupMenu</literal>
4611 </para></entry>
4612 <entry><para>
4613 Home
4614 </para></entry>
4615 <entry><para>
4616 Show the popup menu in full screen mode and seamless
4617 mode
4618 </para></entry>
4619 </row>
4620 <row>
4621 <entry><para>
4622 <literal>SettingsDialog</literal>
4623 </para></entry>
4624 <entry><para>
4625 S
4626 </para></entry>
4627 <entry><para>
4628 Open the VM Settings dialog
4629 </para></entry>
4630 </row>
4631 <row>
4632 <entry><para>
4633 <literal>InformationDialog</literal>
4634 </para></entry>
4635 <entry><para>
4636 N
4637 </para></entry>
4638 <entry><para>
4639 Show the VM Session Information window
4640 </para></entry>
4641 </row>
4642 <row>
4643 <entry><para>
4644 <literal>NetworkAdaptersDialog</literal>
4645 </para></entry>
4646 <entry><para></para></entry>
4647 <entry><para>
4648 Show the VM Network Adapters dialog
4649 </para></entry>
4650 </row>
4651 <row>
4652 <entry><para>
4653 <literal>SharedFoldersDialog</literal>
4654 </para></entry>
4655 <entry><para></para></entry>
4656 <entry><para>
4657 Show the VM Shared Folders dialog
4658 </para></entry>
4659 </row>
4660 <row>
4661 <entry><para>
4662 <literal>InstallGuestAdditions</literal>
4663 </para></entry>
4664 <entry><para>
4665 D
4666 </para></entry>
4667 <entry><para>
4668 Mount the ISO containing the Guest Additions
4669 </para></entry>
4670 </row>
4671 </tbody>
4672 </tgroup>
4673 </table>
4674
4675 <para>
4676 To disable full screen mode and seamless mode, use the following
4677 command:
4678 </para>
4679
4680<screen>$ VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
4681
4682 </sect2>
4683
4684 <sect2 id="terminate-vm-action">
4685
4686 <title>Action when Terminating the VM</title>
4687
4688 <para>
4689 You can disallow certain actions when terminating a VM. To
4690 disallow specific actions, use the following command:
4691 </para>
4692
4693<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/RestrictedCloseActions <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
4694
4695 <para>
4696 <replaceable>property</replaceable> is one of the following:
4697 </para>
4698
4699 <variablelist>
4700
4701 <varlistentry>
4702 <term>
4703 <literal>SaveState</literal>
4704 </term>
4705
4706 <listitem>
4707 <para>
4708 Do not allow the user to save the VM state when
4709 terminating the VM.
4710 </para>
4711 </listitem>
4712 </varlistentry>
4713
4714 <varlistentry>
4715 <term>
4716 <literal>Shutdown</literal>
4717 </term>
4718
4719 <listitem>
4720 <para>
4721 Do not allow the user to shutdown the VM by sending the
4722 ACPI power-off event to the guest.
4723 </para>
4724 </listitem>
4725 </varlistentry>
4726
4727 <varlistentry>
4728 <term>
4729 <literal>PowerOff</literal>
4730 </term>
4731
4732 <listitem>
4733 <para>
4734 Do not allow the user to power off the VM.
4735 </para>
4736 </listitem>
4737 </varlistentry>
4738
4739 <varlistentry>
4740 <term>
4741 <literal>PowerOffRestoringSnapshot</literal>
4742 </term>
4743
4744 <listitem>
4745 <para>
4746 Do not allow the user to return to the last snapshot when
4747 powering off the VM.
4748 </para>
4749 </listitem>
4750 </varlistentry>
4751
4752 <varlistentry>
4753 <term>
4754 <literal>Detach</literal>
4755 </term>
4756
4757 <listitem>
4758 <para>
4759 Do not allow the user to detach from the VM process if the
4760 VM was started in separate mode.
4761 </para>
4762 </listitem>
4763 </varlistentry>
4764
4765 </variablelist>
4766
4767 <para>
4768 This is a per-VM setting. You can specify any combination of
4769 properties. If all properties are specified, the VM cannot be
4770 shut down.
4771 </para>
4772
4773 </sect2>
4774
4775 <sect2 id="terminate-vm-default-action">
4776
4777 <title>Default Action when Terminating the VM</title>
4778
4779 <para>
4780 You can define a specific action for terminating a VM. In
4781 contrast to the setting decribed in the previous section, this
4782 setting allows only one action when the user terminates the VM.
4783 No exit menu is shown. Use the following command:
4784 </para>
4785
4786<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/DefaultCloseAction <replaceable>action</replaceable></screen>
4787
4788 <para>
4789 <replaceable>action</replaceable> is one of the following:
4790 </para>
4791
4792 <variablelist>
4793
4794 <varlistentry>
4795 <term>
4796 <literal>SaveState</literal>
4797 </term>
4798
4799 <listitem>
4800 <para>
4801 Save the VM state before terminating the VM process.
4802 </para>
4803 </listitem>
4804 </varlistentry>
4805
4806 <varlistentry>
4807 <term>
4808 <literal>Shutdown</literal>
4809 </term>
4810
4811 <listitem>
4812 <para>
4813 The VM is shut down by sending the ACPI power-off event to
4814 the guest.
4815 </para>
4816 </listitem>
4817 </varlistentry>
4818
4819 <varlistentry>
4820 <term>
4821 <literal>PowerOff</literal>
4822 </term>
4823
4824 <listitem>
4825 <para>
4826 The VM is powered off.
4827 </para>
4828 </listitem>
4829 </varlistentry>
4830
4831 <varlistentry>
4832 <term>
4833 <literal>PowerOffRestoringSnapshot</literal>
4834 </term>
4835
4836 <listitem>
4837 <para>
4838 The VM is powered off and the saved state returns to the
4839 last snapshot.
4840 </para>
4841 </listitem>
4842 </varlistentry>
4843
4844 <varlistentry>
4845 <term>
4846 <literal>Detach</literal>
4847 </term>
4848
4849 <listitem>
4850 <para>
4851 Terminate the frontend but leave the VM process running.
4852 </para>
4853 </listitem>
4854 </varlistentry>
4855
4856 </variablelist>
4857
4858 <para>
4859 This is a per-VM setting. You can specify any combination of
4860 properties. If all properties are specified, the VM cannot be
4861 shut down.
4862 </para>
4863
4864 </sect2>
4865
4866 <sect2 id="guru-meditation-action">
4867
4868 <title>Action for Handling a Guru Meditation</title>
4869
4870 <para>
4871 A VM runs into a Guru Meditation if there is a problem which
4872 cannot be fixed by other means than terminating the process. The
4873 default is to show a message window which instructs the user to
4874 open a bug report.
4875 </para>
4876
4877 <para>
4878 This behavior can be configured as follows:
4879 </para>
4880
4881<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/GuruMeditationHandler <replaceable>mode</replaceable></screen>
4882
4883 <para>
4884 <replaceable>mode</replaceable> is one of the following:
4885 </para>
4886
4887 <variablelist>
4888
4889 <varlistentry>
4890 <term>
4891 <literal>Default</literal>
4892 </term>
4893
4894 <listitem>
4895 <para>
4896 A message window is shown. After the user confirmed, the
4897 VM is terminated.
4898 </para>
4899 </listitem>
4900 </varlistentry>
4901
4902 <varlistentry>
4903 <term>
4904 <literal>PowerOff</literal>
4905 </term>
4906
4907 <listitem>
4908 <para>
4909 The VM is immediately powered-off without showing any
4910 message window. The VM logfile will show information about
4911 what happened.
4912 </para>
4913 </listitem>
4914 </varlistentry>
4915
4916 <varlistentry>
4917 <term>
4918 <literal>Ignore</literal>
4919 </term>
4920
4921 <listitem>
4922 <para>
4923 The VM is left in stuck mode. Execution is stopped but no
4924 message window is shown. The VM has to be powered off
4925 manually.
4926 </para>
4927 </listitem>
4928 </varlistentry>
4929
4930 </variablelist>
4931
4932 <para>
4933 This is a per-VM setting.
4934 </para>
4935
4936 </sect2>
4937
4938 <sect2 id="mouse-capture">
4939
4940 <title>Configuring Automatic Mouse Capturing</title>
4941
4942 <para>
4943 By default, the mouse is captured if the user clicks on the
4944 guest window and the guest expects relative mouse coordinates at
4945 this time. This happens if the pointing device is configured as
4946 PS/2 mouse and the guest has not yet started the &product-name;
4947 Guest Additions. For instance, the guest is booting or the Guest
4948 Additions are not installed, or if the pointing device is
4949 configured as a USB tablet but the guest has no USB driver
4950 loaded yet. Once the Guest Additions become active or the USB
4951 guest driver is started, the mouse capture is automatically
4952 released.
4953 </para>
4954
4955 <para>
4956 The default behavior is sometimes not desired. Therefore it can
4957 be configured as follows:
4958 </para>
4959
4960<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/MouseCapturePolicy <replaceable>mode</replaceable></screen>
4961
4962 <para>
4963 <replaceable>mode</replaceable> is one of the following:
4964 </para>
4965
4966 <variablelist>
4967
4968 <varlistentry>
4969 <term>
4970 <literal>Default</literal>
4971 </term>
4972
4973 <listitem>
4974 <para>
4975 The default behavior as described above.
4976 </para>
4977 </listitem>
4978 </varlistentry>
4979
4980 <varlistentry>
4981 <term>
4982 <literal>HostComboOnly</literal>
4983 </term>
4984
4985 <listitem>
4986 <para>
4987 The mouse is only captured if the Host Key is toggled.
4988 </para>
4989 </listitem>
4990 </varlistentry>
4991
4992 <varlistentry>
4993 <term>
4994 <literal>Disabled</literal>
4995 </term>
4996
4997 <listitem>
4998 <para>
4999 The mouse is never captured, also not by toggling the Host
5000 Key
5001 </para>
5002 </listitem>
5003 </varlistentry>
5004
5005 </variablelist>
5006
5007 <para>
5008 This is a per-VM setting.
5009 </para>
5010
5011 </sect2>
5012
5013 <sect2 id="legacy-fullscreen-mode">
5014
5015 <title>Requesting Legacy Full-Screen Mode</title>
5016
5017 <para>
5018 &product-name; uses special window manager facilities to switch
5019 a multi-screen machine to full-screen on a multi-monitor host
5020 system. However, not all window managers provide these
5021 facilities correctly. &product-name; can be configured to use a
5022 legacy method of switching to full-screen mode instead, by using
5023 the command:
5024 </para>
5025
5026<screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode true</screen>
5027
5028 <para>
5029 You can go back to the default method by using the following
5030 command:
5031 </para>
5032
5033<screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode</screen>
5034
5035 <para>
5036 This is a global setting.
5037 </para>
5038
5039 </sect2>
5040
5041 <sect2 id="restrict-network-attachments">
5042
5043 <title>Removing Certain Modes of Networking From the GUI</title>
5044
5045 <para>
5046 It is possible to remove networking modes from &product-name;
5047 GUI. To do this, use the following command:
5048 </para>
5049
5050<screen>VBoxManage setextradata global GUI/RestrictedNetworkAttachmentTypes <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
5051
5052 <para>
5053 <replaceable>property</replaceable> is one of the following:
5054 </para>
5055
5056 <variablelist>
5057
5058 <varlistentry>
5059 <term>
5060 <literal>NAT</literal>
5061 </term>
5062
5063 <listitem>
5064 <para>
5065 Remove the <emphasis role="bold">NAT</emphasis> option
5066 from the GUI.
5067 </para>
5068 </listitem>
5069 </varlistentry>
5070
5071 <varlistentry>
5072 <term>
5073 <literal>NATNetwork</literal>
5074 </term>
5075
5076 <listitem>
5077 <para>
5078 Remove the <emphasis role="bold">NAT network</emphasis>
5079 option from the GUI.
5080 </para>
5081 </listitem>
5082 </varlistentry>
5083
5084 <varlistentry>
5085 <term>
5086 <literal>BridgedAdapter</literal>
5087 </term>
5088
5089 <listitem>
5090 <para>
5091 Remove the <emphasis role="bold">Bridged
5092 networking</emphasis> option from the GUI.
5093 </para>
5094 </listitem>
5095 </varlistentry>
5096
5097 <varlistentry>
5098 <term>
5099 <literal>InternalNetwork</literal>
5100 </term>
5101
5102 <listitem>
5103 <para>
5104 Remove the <emphasis role="bold">Internal
5105 networking</emphasis> option from the GUI.
5106 </para>
5107 </listitem>
5108 </varlistentry>
5109
5110 <varlistentry>
5111 <term>
5112 <literal>HostOnlyAdapter</literal>
5113 </term>
5114
5115 <listitem>
5116 <para>
5117 Remove the <emphasis role="bold">Host Only
5118 networking</emphasis> option from the GUI.
5119 </para>
5120 </listitem>
5121 </varlistentry>
5122
5123 <varlistentry>
5124 <term>
5125 <literal>GenericDriver</literal>
5126 </term>
5127
5128 <listitem>
5129 <para>
5130 Remove the <emphasis role="bold">Generic
5131 networking</emphasis> option from the GUI.
5132 </para>
5133 </listitem>
5134 </varlistentry>
5135
5136 </variablelist>
5137
5138 <para>
5139 This is a global setting. You can specify any combination of
5140 properties. To restore the default behavior, use the following
5141 command:
5142 </para>
5143
5144<screen>VBoxManage setextradata global GUI/RestrictedNetworkAttachmentTypes</screen>
5145
5146 </sect2>
5147
5148 </sect1>
5149
5150 <sect1 id="vboxwebsrv-daemon">
5151
5152 <title>Starting the &product-name; Web Service Automatically</title>
5153
5154 <para>
5155 The &product-name; web service, <command>vboxwebsrv</command>, is
5156 used for controlling &product-name; remotely. It is documented in
5157 detail in the &product-name; Software Development Kit (SDK). See
5158 <xref linkend="VirtualBoxAPI" />. Web service start scripts are
5159 available for supported host operating systems. The following
5160 sections describe how to use the scripts. The &product-name; web
5161 service is never started automatically as a result of a standard
5162 installation.
5163 </para>
5164
5165 <sect2 id="vboxwebsrv-linux">
5166
5167 <title>Linux: Starting the Web Service With init</title>
5168
5169 <para>
5170 On Linux, the web service can be automatically started during
5171 host boot by adding appropriate parameters to the file
5172 <filename>/etc/default/virtualbox</filename>. There is one
5173 mandatory parameter, <literal>VBOXWEB_USER</literal>, which must
5174 be set to the user which will later start the VMs. The
5175 parameters in the following table all start with the
5176 <literal>VBOXWEB_</literal> prefix string. For example:
5177 <literal>VBOXWEB_HOST</literal> and
5178 <literal>VBOXWEB_PORT</literal>.
5179 </para>
5180
5181 <table id="table-websrv-config-params" tabstyle="oracle-all">
5182 <title>Web Service Configuration Parameters</title>
5183 <tgroup cols="3">
5184 <thead>
5185 <row>
5186 <entry><para>
5187 <emphasis role="bold">Parameter</emphasis>
5188 </para></entry>
5189 <entry><para>
5190 <emphasis role="bold">Description</emphasis>
5191 </para></entry>
5192 <entry><para>
5193 <emphasis role="bold">Default</emphasis>
5194 </para></entry>
5195 </row>
5196 </thead>
5197 <tbody>
5198 <row>
5199 <entry><para>
5200 <literal>USER</literal>
5201 </para></entry>
5202 <entry><para>
5203 The user which the web service runs as
5204 </para></entry>
5205 <entry><para></para></entry>
5206 </row>
5207 <row>
5208 <entry><para>
5209 <literal>HOST</literal>
5210 </para></entry>
5211 <entry><para>
5212 The host to bind the web service to
5213 </para></entry>
5214 <entry><para>
5215 localhost
5216 </para></entry>
5217 </row>
5218 <row>
5219 <entry><para>
5220 <literal>PORT</literal>
5221 </para></entry>
5222 <entry><para>
5223 The port to bind the web service to
5224 </para></entry>
5225 <entry><para>
5226 18083
5227 </para></entry>
5228 </row>
5229 <row>
5230 <entry><para>
5231 <literal>SSL_KEYFILE</literal>
5232 </para></entry>
5233 <entry><para>
5234 Server key and certificate file, in PEM format
5235 </para></entry>
5236 <entry><para></para></entry>
5237 </row>
5238 <row>
5239 <entry><para>
5240 <literal>SSL_PASSWORDFILE</literal>
5241 </para></entry>
5242 <entry><para>
5243 File name for password to server key
5244 </para></entry>
5245 <entry><para></para></entry>
5246 </row>
5247 <row>
5248 <entry><para>
5249 <literal>SSL_CACERT</literal>
5250 </para></entry>
5251 <entry><para>
5252 CA certificate file, in PEM format
5253 </para></entry>
5254 <entry><para></para></entry>
5255 </row>
5256 <row>
5257 <entry><para>
5258 <literal>SSL_CAPATH</literal>
5259 </para></entry>
5260 <entry><para>
5261 CA certificate path
5262 </para></entry>
5263 <entry><para></para></entry>
5264 </row>
5265 <row>
5266 <entry><para>
5267 <literal>SSL_DHFILE</literal>
5268 </para></entry>
5269 <entry><para>
5270 DH file name or DH key length in bits
5271 </para></entry>
5272 <entry><para></para></entry>
5273 </row>
5274 <row>
5275 <entry><para>
5276 <literal>SSL_RANDFILE</literal>
5277 </para></entry>
5278 <entry><para>
5279 File containing seed for random number generator
5280 </para></entry>
5281 <entry><para></para></entry>
5282 </row>
5283 <row>
5284 <entry><para>
5285 <literal>TIMEOUT</literal>
5286 </para></entry>
5287 <entry><para>
5288 Session timeout in seconds, 0 disables timeouts
5289 </para></entry>
5290 <entry><para>
5291 300
5292 </para></entry>
5293 </row>
5294 <row>
5295 <entry><para>
5296 <literal>CHECK_INTERVAL</literal>
5297 </para></entry>
5298 <entry><para>
5299 Frequency of timeout checks in seconds
5300 </para></entry>
5301 <entry><para>
5302 5
5303 </para></entry>
5304 </row>
5305 <row>
5306 <entry><para>
5307 <literal>THREADS</literal>
5308 </para></entry>
5309 <entry><para>
5310 Maximum number of worker threads to run in parallel
5311 </para></entry>
5312 <entry><para>
5313 100
5314 </para></entry>
5315 </row>
5316 <row>
5317 <entry><para>
5318 <literal>KEEPALIVE</literal>
5319 </para></entry>
5320 <entry><para>
5321 Maximum number of requests before a socket will be
5322 closed
5323 </para></entry>
5324 <entry><para>
5325 100
5326 </para></entry>
5327 </row>
5328 <row>
5329 <entry><para>
5330 <literal>ROTATE</literal>
5331 </para></entry>
5332 <entry><para>
5333 Number of log files, 0 disables log rotation
5334 </para></entry>
5335 <entry><para>
5336 10
5337 </para></entry>
5338 </row>
5339 <row>
5340 <entry><para>
5341 <literal>LOGSIZE</literal>
5342 </para></entry>
5343 <entry><para>
5344 Maximum log file size to trigger rotation, in bytes
5345 </para></entry>
5346 <entry><para>
5347 1MB
5348 </para></entry>
5349 </row>
5350 <row>
5351 <entry><para>
5352 <literal>LOGINTERVAL</literal>
5353 </para></entry>
5354 <entry><para>
5355 Maximum time interval to trigger log rotation, in
5356 seconds
5357 </para></entry>
5358 <entry><para>
5359 1 day
5360 </para></entry>
5361 </row>
5362 </tbody>
5363 </tgroup>
5364 </table>
5365
5366 <para>
5367 Setting the parameter <literal>SSL_KEYFILE</literal> enables the
5368 SSL/TLS support. Using encryption is strongly encouraged, as
5369 otherwise everything, including passwords, is transferred in
5370 clear text.
5371 </para>
5372
5373 </sect2>
5374
5375 <sect2 id="vboxwebsrv-solaris">
5376
5377 <title>Oracle Solaris: Starting the Web Service With SMF</title>
5378
5379 <para>
5380 On Oracle Solaris hosts, the &product-name; web service daemon
5381 is integrated into the SMF framework. You can change the
5382 parameters, but do not have to if the defaults below already
5383 match your needs:
5384 </para>
5385
5386<screen>svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
5387svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
5388svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root</screen>
5389
5390 <para>
5391 The table in <xref linkend="vboxwebsrv-linux"/> showing the
5392 parameter names and defaults also applies for Oracle Solaris.
5393 The parameter names must be changed to lowercase and a prefix of
5394 <literal>config/</literal> has to be added. For example:
5395 <literal>config/user</literal> or
5396 <literal>config/ssl_keyfile</literal>. If you make any change,
5397 do not forget to run the following command to put the changes
5398 into effect immediately:
5399 </para>
5400
5401<screen>svcadm refresh svc:/application/virtualbox/webservice:default</screen>
5402
5403 <para>
5404 If you forget the above command then the previous settings are
5405 used when enabling the service. Check the current property
5406 settings as follows:
5407 </para>
5408
5409<screen>svcprop -p config svc:/application/virtualbox/webservice:default</screen>
5410
5411 <para>
5412 When everything is configured correctly you can start the
5413 &product-name; web service with the following command:
5414 </para>
5415
5416<screen>svcadm enable svc:/application/virtualbox/webservice:default</screen>
5417
5418 <para>
5419 For more information about SMF, please refer to the Oracle
5420 Solaris documentation.
5421 </para>
5422
5423 </sect2>
5424
5425 <sect2 id="vboxwebsrv-osx">
5426
5427 <title>Mac OS X: Starting the Web Service With launchd</title>
5428
5429 <para>
5430 On Mac OS X, launchd is used to start the &product-name;
5431 webservice. An example configuration file can be found in
5432 <filename>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</filename>.
5433 It can be enabled by changing the <literal>Disabled</literal>
5434 key from <literal>true</literal> to <literal>false</literal>. To
5435 manually start the service use the following command:
5436 </para>
5437
5438<screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
5439
5440 <para>
5441 For additional information on how launchd services could be
5442 configured see:
5443 </para>
5444
5445 <para>
5446 <ulink
5447 url="https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" />.
5448 </para>
5449
5450 </sect2>
5451
5452 </sect1>
5453
5454 <sect1 id="vboxwatchdog">
5455
5456 <title>&product-name; Watchdog</title>
5457
5458 <para>
5459 The memory ballooning service, formerly known as
5460 <command>VBoxBalloonCtrl</command>, was renamed to VBoxWatchdog.
5461 This service now incorporates the following host services that are
5462 meant to be run in a server environment:
5463 </para>
5464
5465 <itemizedlist>
5466
5467 <listitem>
5468 <para>
5469 <emphasis role="bold">Memory ballooning control.</emphasis>
5470 This service automatically takes care of a VM's configured
5471 memory balloon. See <xref linkend="guestadd-balloon" />. This
5472 service is useful for server environments where VMs may
5473 dynamically require more or less memory during runtime.
5474 </para>
5475
5476 <para>
5477 The service periodically checks a VM's current memory balloon
5478 and its free guest RAM and automatically adjusts the current
5479 memory balloon by inflating or deflating it accordingly. This
5480 handling only applies to running VMs having recent Guest
5481 Additions installed.
5482 </para>
5483 </listitem>
5484
5485 <listitem>
5486 <para>
5487 <emphasis role="bold">Host isolation detection.</emphasis>
5488 This service provides a way to detect whether the host cannot
5489 reach the specific &product-name; server instance anymore and
5490 take appropriate actions, such as shutting down, saving the
5491 current state or even powering down certain VMs.
5492 </para>
5493 </listitem>
5494
5495 </itemizedlist>
5496
5497 <para>
5498 All configuration values can be either specified using the command
5499 line or global extradata, whereas command line values always have
5500 a higher priority when set. Some of the configuration values also
5501 be specified on a per-VM basis. So the overall lookup order is:
5502 command line, per-VM basis extradata if available, global
5503 extradata.
5504 </para>
5505
5506 <sect2 id="vboxwatchdog-ballonctrl">
5507
5508 <title>Memory Ballooning Control</title>
5509
5510 <para>
5511 The memory ballooning control inflates and deflates the memory
5512 balloon of VMs based on the VMs free memory and the desired
5513 maximum balloon size.
5514 </para>
5515
5516 <para>
5517 To set up the memory ballooning control the maximum ballooning
5518 size a VM can reach needs to be set. This can be specified using
5519 the command line, as follows:
5520 </para>
5521
5522<screen>--balloon-max &lt;Size in MB&gt;</screen>
5523
5524 <para>
5525 Using a per-VM basis extradata value, as follows:
5526 </para>
5527
5528<screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
5529
5530 <para>
5531 Using a global extradata value, as follows:
5532 </para>
5533
5534<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
5535
5536 <note>
5537 <para>
5538 If no maximum ballooning size is specified by at least one of
5539 the parameters above, no ballooning will be performed at all.
5540 </para>
5541 </note>
5542
5543 <para>
5544 Setting the ballooning increment in MB can be either done using
5545 command line, as follows:
5546 </para>
5547
5548<screen>--balloon-inc &lt;Size in MB&gt;</screen>
5549
5550 <para>
5551 Using a global extradata value, as follows:
5552 </para>
5553
5554<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
5555
5556 <para>
5557 The default ballooning increment is 256 MB if not specified.
5558 </para>
5559
5560 <para>
5561 The same options apply for a ballooning decrement. Using the
5562 command line, as follows:
5563 </para>
5564
5565<screen>--balloon-dec &lt;Size in MB&gt;</screen>
5566
5567 <para>
5568 Using a global extradata value, as follows:
5569 </para>
5570
5571<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
5572
5573 <para>
5574 The default ballooning decrement is 128 MB if not specified.
5575 </para>
5576
5577 <para>
5578 The lower limit in MB for a balloon can be defined using the
5579 command line, as follows:
5580 </para>
5581
5582<screen>--balloon-lower-limit &lt;Size in MB&gt;</screen>
5583
5584 <para>
5585 Using a global extradata value, as follows:
5586 </para>
5587
5588<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
5589
5590 <para>
5591 The default lower limit is 128 MB if not specified.
5592 </para>
5593
5594 </sect2>
5595
5596 <sect2 id="vboxwatchdog-hostisln">
5597
5598 <title>Host Isolation Detection</title>
5599
5600 <para>
5601 To detect whether a host is being isolated, that is, the host
5602 cannot reach the &product-name; server instance anymore, the
5603 host needs to set an alternating value to a global extradata
5604 value within a time period. If this value is not set within that
5605 time period a timeout occurred and the so-called host isolation
5606 response will be performed to the VMs handled. Which VMs are
5607 handled can be controlled by defining VM groups and assigning
5608 VMs to those groups. By default no groups are set, meaning that
5609 all VMs on the server will be handled when no host response is
5610 received within 30 seconds.
5611 </para>
5612
5613 <para>
5614 Set the groups handled by the host isolation detection using the
5615 following command line:
5616 </para>
5617
5618<screen>--apimon-groups=&lt;string[,stringN]&gt;</screen>
5619
5620 <para>
5621 Using a global extradata value, as follows:
5622 </para>
5623
5624<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
5625
5626 <para>
5627 Set the host isolation timeout using the following command line:
5628 </para>
5629
5630<screen>--apimon-isln-timeout=&lt;ms&gt;</screen>
5631
5632 <para>
5633 Using a global extradata value, as follows:
5634 </para>
5635
5636<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
5637
5638 <para>
5639 Set the actual host isolation response using the following
5640 command line:
5641 </para>
5642
5643<screen>--apimon-isln-response=&lt;cmd&gt;</screen>
5644
5645 <para>
5646 Using a global extradata value, as follows:
5647 </para>
5648
5649<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
5650
5651 <para>
5652 The following response commands are available:
5653 </para>
5654
5655 <itemizedlist>
5656
5657 <listitem>
5658 <para>
5659 <literal>none</literal>. This has no effect.
5660 </para>
5661 </listitem>
5662
5663 <listitem>
5664 <para>
5665 <literal>pause</literal>. Pauses the execution of a VM.
5666 </para>
5667 </listitem>
5668
5669 <listitem>
5670 <para>
5671 <literal>poweroff</literal>. Shuts down the VM by pressing
5672 the virtual power button. The VM will not have the chance of
5673 saving any data or veto the shutdown process.
5674 </para>
5675 </listitem>
5676
5677 <listitem>
5678 <para>
5679 <literal>save</literal>. Saves the current machine state and
5680 powers off the VM afterwards. If saving the machine state
5681 fails the VM will be paused.
5682 </para>
5683 </listitem>
5684
5685 <listitem>
5686 <para>
5687 <literal>shutdown</literal>. Shuts down the VM in a gentle
5688 way by sending an <literal>ACPI</literal> shutdown event to
5689 the VM's operating system. The OS then has the chance of
5690 doing a clean shutdown.
5691 </para>
5692 </listitem>
5693
5694 </itemizedlist>
5695
5696 </sect2>
5697
5698 <sect2 id="vboxwatchdog-moreinfo">
5699
5700 <title>More Information</title>
5701
5702 <para>
5703 For more advanced options and parameters like verbose logging
5704 check the built-in command line help accessible with
5705 <option>--help</option>.
5706 </para>
5707
5708 </sect2>
5709
5710 <sect2 id="vboxwatchdog-linux">
5711
5712 <title>Linux: Starting the Watchdog Service With init</title>
5713
5714 <para>
5715 On Linux, the watchdog service can be automatically started
5716 during host boot by adding appropriate parameters to the file
5717 <filename>/etc/default/virtualbox</filename>. There is one
5718 mandatory parameter, <literal>VBOXWATCHDOG_USER</literal>, which
5719 must be set to the user which will later start the VMs. For
5720 backward compatibility you can also specify
5721 <literal>VBOXBALLOONCTRL_USER</literal>.
5722 </para>
5723
5724 <para>
5725 The parameters in the following table all start with the
5726 <literal>VBOXWATCHDOG_</literal> prefix string. For example:
5727 <literal>VBOXWATCHDOG_BALLOON_INTERVAL</literal> and
5728 <literal>VBOXWATCHDOG_LOGSIZE</literal>. Legacy parameters such
5729 as <literal>VBOXBALLOONCTRL_INTERVAL</literal> can still be
5730 used.
5731 </para>
5732
5733 <table id="table-vboxwatchdog-config-params" tabstyle="oracle-all">
5734 <title>&product-name; Watchdog Configuration Parameters</title>
5735 <tgroup cols="3">
5736 <thead>
5737 <row>
5738 <entry><para>
5739 <emphasis role="bold">Parameter</emphasis>
5740 </para></entry>
5741 <entry><para>
5742 <emphasis role="bold">Description</emphasis>
5743 </para></entry>
5744 <entry><para>
5745 <emphasis role="bold">Default</emphasis>
5746 </para></entry>
5747 </row>
5748 </thead>
5749 <tbody>
5750 <row>
5751 <entry><para>
5752 <literal>USER</literal>
5753 </para></entry>
5754 <entry><para>
5755 The user which the watchdog service runs as
5756 </para></entry>
5757 <entry><para></para></entry>
5758 </row>
5759 <row>
5760 <entry><para>
5761 <literal>ROTATE</literal>
5762 </para></entry>
5763 <entry><para>
5764 Number of log files, 0 disables log rotation
5765 </para></entry>
5766 <entry><para>
5767 10
5768 </para></entry>
5769 </row>
5770 <row>
5771 <entry><para>
5772 <literal>LOGSIZE</literal>
5773 </para></entry>
5774 <entry><para>
5775 Maximum log file size to trigger rotation, in bytes
5776 </para></entry>
5777 <entry><para>
5778 1MB
5779 </para></entry>
5780 </row>
5781 <row>
5782 <entry><para>
5783 <literal>LOGINTERVAL</literal>
5784 </para></entry>
5785 <entry><para>
5786 Maximum time interval to trigger log rotation, in
5787 seconds
5788 </para></entry>
5789 <entry><para>
5790 1 day
5791 </para></entry>
5792 </row>
5793 <row>
5794 <entry><para>
5795 <literal>BALLOON_INTERVAL</literal>
5796 </para></entry>
5797 <entry><para>
5798 Interval for checking the balloon size, in
5799 milliseconds
5800 </para></entry>
5801 <entry><para>
5802 30000
5803 </para></entry>
5804 </row>
5805 <row>
5806 <entry><para>
5807 <literal>BALLOON_INCREMENT</literal>
5808 </para></entry>
5809 <entry><para>
5810 Balloon size increment, in megabytes
5811 </para></entry>
5812 <entry><para>
5813 256
5814 </para></entry>
5815 </row>
5816 <row>
5817 <entry><para>
5818 <literal>BALLOON_DECREMENT</literal>
5819 </para></entry>
5820 <entry><para>
5821 Balloon size decrement, in megabytes
5822 </para></entry>
5823 <entry><para>
5824 128
5825 </para></entry>
5826 </row>
5827 <row>
5828 <entry><para>
5829 <literal>BALLOON_LOWERLIMIT</literal>
5830 </para></entry>
5831 <entry><para>
5832 Balloon size lower limit, in megabytes
5833 </para></entry>
5834 <entry><para>
5835 64
5836 </para></entry>
5837 </row>
5838 <row>
5839 <entry><para>
5840 <literal>BALLOON_SAFETYMARGIN</literal>
5841 </para></entry>
5842 <entry><para>
5843 Free memory required for decreasing the balloon size,
5844 in megabytes
5845 </para></entry>
5846 <entry><para>
5847 1024
5848 </para></entry>
5849 </row>
5850 </tbody>
5851 </tgroup>
5852 </table>
5853
5854 </sect2>
5855
5856 <sect2 id="vboxwatchdog-solaris">
5857
5858 <title>Oracle Solaris: Starting the Watchdog Service With SMF</title>
5859
5860 <para>
5861 On Oracle Solaris hosts, the &product-name; watchdog service
5862 daemon is integrated into the SMF framework. You can change the
5863 parameters, but do not have to if the defaults already match
5864 your needs:
5865 </para>
5866
5867<screen>svccfg -s svc:/application/virtualbox/balloonctrl:default setprop \
5868 config/balloon_interval=10000
5869svccfg -s svc:/application/virtualbox/balloonctrl:default setprop \
5870config/balloon_safetymargin=134217728</screen>
5871
5872 <para>
5873 <xref linkend="table-vboxwatchdog-config-params"/> also applies
5874 for Oracle Solaris. The parameter names must be changed to
5875 lowercase and a prefix of <literal>config/</literal> has to be
5876 added. For example: <literal>config/user</literal> or
5877 <literal>config/balloon_safetymargin</literal>. If you made any
5878 change, do not forget to run the following command to put the
5879 changes into effect immediately:
5880 </para>
5881
5882<screen>svcadm refresh svc:/application/virtualbox/balloonctrl:default</screen>
5883
5884 <para>
5885 If you forget the above command then the previous settings will
5886 be used when enabling the service. Check the current property
5887 settings with the following command:
5888 </para>
5889
5890<screen>svcprop -p config svc:/application/virtualbox/balloonctrl:default</screen>
5891
5892 <para>
5893 When everything is configured correctly you can start the
5894 &product-name; watchdog service with the following command:
5895 </para>
5896
5897<screen>svcadm enable svc:/application/virtualbox/balloonctrl:default</screen>
5898
5899 <para>
5900 For more information about SMF, please refer to the Oracle
5901 Solaris documentation.
5902 </para>
5903
5904 </sect2>
5905
5906 </sect1>
5907
5908 <sect1 id="otherextpacks">
5909
5910 <title>Other Extension Packs</title>
5911
5912 <para>
5913 Another extension pack called VNC is available. This extension
5914 pack is open source and replaces the previous integration of the
5915 VNC remote access protocol. This is experimental code, and is
5916 initially available in the &product-name; source code package
5917 only. It is to a large portion code contributed by users, and is
5918 not supported in any way by Oracle.
5919 </para>
5920
5921 <para>
5922 The keyboard handling is severely limited, and only the US
5923 keyboard layout works. Other keyboard layouts will have at least
5924 some keys which produce the wrong results, often with quite
5925 surprising effects, and for layouts which have significant
5926 differences to the US keyboard layout it is most likely unusable.
5927 </para>
5928
5929 <para>
5930 It is possible to install both the &product-name; Extension Pack
5931 and VNC, but only one VRDE module can be active at any time. The
5932 following command switches to the VNC VRDE module in VNC:
5933 </para>
5934
5935<screen>VBoxManage setproperty vrdeextpack VNC</screen>
5936
5937 <para>
5938 Configuring the remote access works very similarly to VRDP, see
5939 <xref linkend="vrde" />, with some limitations. VNC does not
5940 support specifying several port numbers, and the authentication is
5941 done differently. VNC can only deal with password authentication,
5942 and there is no option to use password hashes. This leaves no
5943 other choice than having a clear-text password in the VM
5944 configuration, which can be set with the following command:
5945 </para>
5946
5947<screen>VBoxManage modifyvm <replaceable>VM-name</replaceable> --vrde-property VNCPassword=secret</screen>
5948
5949 <para>
5950 The user is responsible for keeping this password secret, and it
5951 should be removed when a VM configuration is passed to another
5952 person, for whatever purpose. Some VNC servers claim to have
5953 encrypted passwords in the configuration. This is not true
5954 encryption, it is only concealing the passwords, which is only as
5955 secure as using clear-text passwords.
5956 </para>
5957
5958 <para>
5959 The following command switches back to VRDP, if installed:
5960 </para>
5961
5962<screen>VBoxManage setproperty vrdeextpack "&product-name; Extension Pack"</screen>
5963
5964 </sect1>
5965
5966 <sect1 id="autostart">
5967
5968 <title>Starting Virtual Machines During System Boot</title>
5969
5970 <para>
5971 You can start VMs automatically during system boot on Linux,
5972 Oracle Solaris, and Mac OS X platforms for all users.
5973 </para>
5974
5975 <sect2 id="autostart-linux">
5976
5977 <title>Linux: Starting the Autostart Service With init</title>
5978
5979 <para>
5980 On Linux, the autostart service is activated by setting two
5981 variables in <filename>/etc/default/virtualbox</filename>. The
5982 first one is <literal>VBOXAUTOSTART_DB</literal> which contains
5983 an absolute path to the autostart database directory. The
5984 directory should have write access for every user who should be
5985 able to start virtual machines automatically. Furthermore the
5986 directory should have the sticky bit set. The second variable is
5987 <literal>VBOXAUTOSTART_CONFIG</literal> which points the service
5988 to the autostart configuration file which is used during boot to
5989 determine whether to allow individual users to start a VM
5990 automatically and configure startup delays. The configuration
5991 file can be placed in <filename>/etc/vbox</filename> and
5992 contains several options. One is
5993 <literal>default_policy</literal> which controls whether the
5994 autostart service allows or denies to start a VM for users which
5995 are not in the exception list. The exception list starts with
5996 <literal>exception_list</literal> and contains a comma separated
5997 list with usernames. Furthermore a separate startup delay can be
5998 configured for every user to avoid overloading the host. A
5999 sample configuration is given below:
6000 </para>
6001
6002<screen>
6003# Default policy is to deny starting a VM, the other option is "allow".
6004default_policy = deny
6005
6006# Bob is allowed to start virtual machines but starting them
6007# will be delayed for 10 seconds
6008bob = {
6009 allow = true
6010 startup_delay = 10
6011}
6012
6013# Alice is not allowed to start virtual machines, useful to exclude certain users
6014# if the default policy is set to allow.
6015alice = {
6016 allow = false
6017}
6018</screen>
6019
6020 <para>
6021 Any user who wants to enable autostart for individual machines
6022 must set the path to the autostart database directory with the
6023 following command:
6024 </para>
6025
6026<screen>VBoxManage setproperty autostartdbpath <replaceable>autostart-directory</replaceable></screen>
6027
6028 </sect2>
6029
6030 <sect2 id="autostart-solaris">
6031
6032 <title>Oracle Solaris: Starting the Autostart Service With SMF</title>
6033
6034 <para>
6035 On Oracle Solaris hosts, the &product-name; autostart daemon is
6036 integrated into the SMF framework. To enable it you must point
6037 the service to an existing configuration file which has the same
6038 format as on Linux, see <xref linkend="autostart-linux" />. For
6039 example:
6040 </para>
6041
6042<screen># svccfg -s svc:/application/virtualbox/autostart:default setprop \
6043 config/config=/etc/vbox/autostart.cfg</screen>
6044
6045 <para>
6046 When everything is configured correctly you can start the
6047 &product-name; autostart service with the following command:
6048 </para>
6049
6050<screen># svcadm enable svc:/application/virtualbox/autostart:default</screen>
6051
6052 <para>
6053 For more information about SMF, see the Oracle Solaris
6054 documentation.
6055 </para>
6056
6057 </sect2>
6058
6059 <sect2 id="autostart-osx">
6060
6061 <title>Mac OS X: Starting the Autostart Service With launchd</title>
6062
6063 <para>
6064 On Mac OS X, launchd is used to start the &product-name;
6065 autostart service. An example configuration file can be found in
6066 <filename>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</filename>.
6067 To enable the service copy the file to
6068 <filename>/Library/LaunchDaemons</filename> and change the
6069 <literal>Disabled</literal> key from <literal>true</literal> to
6070 <literal>false</literal>. Furthermore replace the second
6071 parameter to an existing configuration file which has the same
6072 format as on Linux, see <xref linkend="autostart-linux" />.
6073 </para>
6074
6075 <para>
6076 To manually start the service use the following command:
6077 </para>
6078
6079<screen># launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
6080
6081 <para>
6082 For additional information on how launchd services can be
6083 configured see:
6084 </para>
6085
6086 <para>
6087 <ulink
6088 url="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html" />.
6089 </para>
6090
6091 </sect2>
6092
6093 <sect2 id="autostart-windows">
6094
6095 <title>Windows: Starting the Autostart Service</title>
6096
6097 <para>
6098 On Windows, autostart functionality consist of two components.
6099 The first component is a configuration file where the
6100 administrator can both set a delayed start for the VMs and
6101 temporarily disable autostarting for a particular user. The
6102 configuration file should be located in a folder accessible by
6103 all required users but it should have permissions allowing only
6104 reading by everyone but administrators. The configuration file
6105 contains several options. The
6106 <literal>default_policy</literal> controls whether the autostart
6107 service allows or denies starting of a VM for users that are not
6108 in the exception list. The exception list starts with
6109 <literal>exception_list</literal> and contains a comma separated
6110 list with usernames. Furthermore, a separate startup delay can
6111 be configured for every user to avoid overloading the host. A
6112 sample configuration is given below:
6113 </para>
6114
6115<screen>
6116 # Default policy is to deny starting a VM, the other option is "allow".
6117 default_policy = deny
6118
6119 # Bob is allowed to start virtual machines but starting them
6120 # will be delayed for 10 seconds
6121 bob = {
6122 allow = true
6123 startup_delay = 10
6124 }
6125
6126 # Alice is not allowed to start virtual machines, useful to exclude certain users
6127 # if the default policy is set to allow.
6128 alice = {
6129 allow = false
6130 }
6131</screen>
6132
6133 <para>
6134 The user name can be specified using the following forms:
6135 "user", "domain\user", ".\user" and "user@domain". An
6136 administrator must add the
6137 <literal>VBOXAUTOSTART_CONFIG</literal> environment variable
6138 into system variables containing the path to the configuration
6139 file described above. The environment variable tells the
6140 autostart services which configuration file is used.
6141 </para>
6142
6143 <para>
6144 The second component of autostart functionality is a Windows
6145 service. Every instance of this works on behalf of a particular
6146 user using their credentials.
6147 </para>
6148
6149 <para>
6150 To enable autostarting for a particular user, a member of the
6151 administrators group must run the following command:
6152 </para>
6153
6154<screen>VBoxAutostartSvc install --user=<replaceable>user</replaceable> [--password-file=<replaceable>password_file</replaceable>]</screen>
6155
6156 <para>
6157 The password file should contain the password followed by a line
6158 break. The rest of the file is ignored. The user will be asked
6159 for a password if the password file is not specified.
6160 </para>
6161
6162 <para>
6163 To disable autostarting for particular user, a member of the
6164 administrators group must run the following command:
6165 </para>
6166
6167<screen>VBoxAutostartSvc delete --user=<replaceable>user</replaceable></screen>
6168
6169 <para>
6170 If a user has changed their password then a member of the
6171 administrators group must either reinstall the service or change
6172 the service credentials using Windows Service Manager. Due to
6173 Windows security policies, the autostart service cannot be
6174 installed for users with empty passwords.
6175 </para>
6176
6177 <para>
6178 Finally, the user should define which VMs should be started at
6179 boot. The user should run the following command for every VM
6180 they wish to start at boot:
6181 </para>
6182
6183<screen>VBoxManage modifyvm <replaceable>VM name or UUID</replaceable> --autostart-enabled on</screen>
6184
6185 <para>
6186 The user can remove a particular VM from the VMs starting at
6187 boot by running the following command:
6188 </para>
6189
6190<screen>VBoxManage modifyvm <replaceable>VM name or UUID</replaceable> --autostart-enabled off</screen>
6191
6192 <note>
6193 <para>
6194 On Windows hosts, starting VMs via the autostart service might cause some
6195 issues, as the virtual machines are starting within the same session as
6196 VBoxSVC. For more information see <xref linkend="vboxsvc-session-0" />.
6197 </para>
6198 </note>
6199
6200 </sect2>
6201
6202 </sect1>
6203
6204 <sect1 id="vmencryption">
6205
6206 <title>Encryption of VMs</title>
6207
6208 <para>
6209 &product-name; enables you to transparently encrypt the VM data
6210 stored in the configuration file, saved state and EFI boot data
6211 for the guest.
6212 </para>
6213
6214 <para>
6215 &product-name; uses the AES algorithm in various modes. The selected
6216 mode depends on encrypting component of the VM. &product-name;
6217 supports 128-bit or 256-bit data encryption keys (DEK). The DEK
6218 is stored encrypted in the VM configuration file and is decrypted
6219 during VM opening.
6220 </para>
6221
6222 <para>
6223 Since the DEK is stored as part of the VM configuration file, it
6224 is important that it is kept safe. Losing the DEK means that the
6225 data stored in the VM is lost irrecoverably. Having complete and
6226 up to date backups of all data related to the VM is the
6227 responsibility of the user.
6228 </para>
6229
6230 <para>
6231 The VM, even if it is encrypted, may contain mediums encrypted with
6232 different passwords. To deal with this, the password for the VM itself
6233 also has password identifier such as passwords for mediums. The password
6234 ID is an arbitrary string which uniquely identifies the password in the
6235 VM and its mediums. It is allowed to use the same password for VM and
6236 its mediums with the same ID.
6237 </para>
6238
6239 <sect2 id="vmencryption-limitations">
6240
6241 <title>Limitations of VM Encryption</title>
6242
6243 <para>
6244 There are some limitations the user needs to be aware of when
6245 using this feature:
6246 </para>
6247
6248 <itemizedlist>
6249
6250 <listitem>
6251 <para>
6252 Exporting appliances containing encrypted VM is not
6253 possible because the OVF specification does not support
6254 this. The VM is therefore decrypted during export.
6255 </para>
6256 </listitem>
6257
6258 <listitem>
6259 <para>
6260 The DEK is kept in memory while the VM is running to be able
6261 to encrypt and decrypt VM data. While this should be obvious
6262 the user needs to be aware of this because an attacker might
6263 be able to extract the key on a compromised host and decrypt
6264 the data.
6265 </para>
6266 </listitem>
6267
6268 <listitem>
6269 <para>
6270 When encrypting or decrypting the VM, the password is passed
6271 in clear text using the &product-name; API. This needs to be
6272 kept in mind, especially when using third party API clients
6273 which make use of the webservice where the password might be
6274 transmitted over the network. The use of HTTPS is mandatory
6275 in such a case.
6276 </para>
6277 </listitem>
6278
6279 </itemizedlist>
6280
6281 </sect2>
6282
6283 <sect2 id="vmencryption-encryption">
6284
6285 <title>Encrypting VMs</title>
6286
6287 <para>
6288 Encrypting VMs can be done either using the GUI or
6289 <command>VBoxManage</command>. To encrypt an unencrypted
6290 VM with <command>VBoxManage</command>, use:
6291 </para>
6292
6293<screen>VBoxManage encryptvm <replaceable>uuid</replaceable>|<replaceable>vmname</replaceable> setencryption --new-password <replaceable>filename</replaceable>|- \
6294--cipher <replaceable>cipher-ID</replaceable> --new-password-id "<replaceable>ID</replaceable></screen>
6295
6296 <para>
6297 To supply the encryption password point
6298 <command>VBoxManage</command> to the file where the password is
6299 stored or specify <option>-</option> to let VBoxManage ask you
6300 for the password on the command line.
6301 </para>
6302
6303 <para>
6304 The cipher parameter specifies the cipher to use for encryption
6305 and can be either <literal>AES-128</literal> or
6306 <literal>AES-256</literal>. Appropriate mode GCM, CTR or XTS will
6307 be selected by VM depending on encrypting component.
6308 The specified password identifier can be freely chosen by the user
6309 and is used for correct identification when supplying multiple
6310 passwords for the VM.
6311 </para>
6312
6313 </sect2>
6314
6315 <sect2 id="vmencryption-addpassword">
6316
6317 <title>Opening the encrypted VM</title>
6318
6319 <para>
6320 At the time the &product-name; has just started up the encrypted
6321 VM can not be opened and it stays inaccessible. Also the encrypted
6322 VM stays inaccessible if it just registered without password or
6323 password is incorrect. The user needs to provide the password
6324 through either GUI or <command>VBoxManage</command> using the
6325 following command:
6326 </para>
6327
6328<screen>VBoxManage encryptvm <replaceable>uuid</replaceable>|<replaceable>vmname</replaceable> addpassword --password <replaceable>filename</replaceable>|- --password-id <replaceable>ID</replaceable></screen>
6329
6330 <para>
6331 To supply the encryption password point
6332 <command>VBoxManage</command> to the file where the password is
6333 stored or specify <option>-</option> to let VBoxManage ask you
6334 for the password on the command line.
6335 </para>
6336
6337 <para>
6338 If <replaceable>ID</replaceable> is the same as the password
6339 identifier supplied when encrypting the VM it updates the
6340 accessibility state.
6341 </para>
6342
6343 <para>
6344 If user needs to remove the entered password from the VM memory
6345 it can call <command>VBoxManage</command> using the following
6346 command:
6347 </para>
6348
6349<screen>VBoxManage encryptvm <replaceable>uuid</replaceable>|<replaceable>vmname</replaceable> removepassword <replaceable>ID</replaceable></screen>
6350
6351 <para>
6352 If <replaceable>ID</replaceable> is the same as the password
6353 identifier supplied when encrypting the VM it updates the
6354 accessibility state.
6355 </para>
6356
6357 <note>
6358 <para>
6359 If machine becomes inaccessible all passwords are purged.
6360 One has to add required passwords again using
6361 <command>VBoxManage encryptvm
6362 <replaceable>vmname</replaceable> addpassword</command>
6363 command, see <xref linkend="vmencryption-addpassword" />.
6364 </para>
6365 </note>
6366
6367 </sect2>
6368
6369 <sect2 id="vmencryption-decryption">
6370
6371 <title>Decrypting Encrypted VMs</title>
6372
6373 <para>
6374 In some circumstances it might be required to decrypt previously
6375 encrypted VMs. This can be done in the GUI or using
6376 <command>VBoxManage</command> with the following command:
6377 </para>
6378
6379<screen>VBoxManage encryptvm <replaceable>uuid</replaceable>|<replaceable>vmname</replaceable> setencryption --old-password <replaceable>file</replaceable>|-</screen>
6380
6381 <para>
6382 The only required parameter is the password the VM was
6383 encrypted with. The options are the same as for encrypting
6384 VMs.
6385 </para>
6386
6387 </sect2>
6388
6389 </sect1>
6390
6391 <sect1 id="vboxexpertstoragemgmt">
6392
6393 <title>&product-name; Expert Storage Management</title>
6394
6395 <para>
6396 In case the snapshot model of &product-name; is not sufficient it
6397 is possible to enable a special mode which makes it possible to
6398 reconfigure storage attachments while the VM is paused. The user
6399 has to make sure that the disk data stays consistent to the guest
6400 because unlike with hotplugging the guest is not informed about
6401 detached or newly attached media.
6402 </para>
6403
6404 <para>
6405 The expert storage management mode can be enabled per VM
6406 executing:
6407 </para>
6408
6409<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal2/SilentReconfigureWhilePaused" 1</screen>
6410
6411 <para>
6412 You can reconfigure storage attachments later while the VM is
6413 paused by using the <command>VBoxManage storageattach</command>
6414 command.
6415 </para>
6416
6417 </sect1>
6418
6419 <sect1 id="hostpowertweaks">
6420
6421 <title>Handling of Host Power Management Events</title>
6422
6423 <para>
6424 Some host power management events are handled by &product-name;.
6425 The actual behavior depends on the platform:
6426 </para>
6427
6428 <itemizedlist>
6429
6430 <listitem>
6431 <para>
6432 <emphasis role="bold">Host Suspends.</emphasis> This event is
6433 generated when the host is about to suspend, that is, the host
6434 saves the state to some non-volatile storage and powers off.
6435 </para>
6436
6437 <para>
6438 This event is currently only handled on Windows hosts and Mac
6439 OS X hosts. When this event is generated, &product-name; will
6440 pause all running VMs.
6441 </para>
6442 </listitem>
6443
6444 <listitem>
6445 <para>
6446 <emphasis role="bold">Host Resumes.</emphasis> This event is
6447 generated when the host woke up from the suspended state.
6448 </para>
6449
6450 <para>
6451 This event is currently only handled on Windows hosts and Mac
6452 OS X hosts. When this event is generated, &product-name; will
6453 resume all VMs which are where paused before.
6454 </para>
6455 </listitem>
6456
6457 <listitem>
6458 <para>
6459 <emphasis role="bold">Battery Low.</emphasis> The battery
6460 level reached a critical level, usually less than 5 percent
6461 charged.
6462 </para>
6463
6464 <para>
6465 This event is currently only handled on Windows hosts and Mac
6466 OS X hosts. When this event is generated, &product-name; will
6467 save the state and terminate all VMs in preparation of a
6468 potential host powerdown.
6469 </para>
6470
6471 <para>
6472 The behavior can be configured. By executing the following
6473 command, no VM is saved:
6474 </para>
6475
6476<screen>$ VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
6477
6478 <para>
6479 This is a global setting as well as a per-VM setting. The
6480 per-VM value has higher precedence than the global value. The
6481 following command will save the state of all VMs but will not
6482 save the state of VM "foo":
6483 </para>
6484
6485<screen>$ VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 1
6486$ VBoxManage setextradata "foo" "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
6487
6488 <para>
6489 The first line is actually not required as by default the
6490 savestate action is performed.
6491 </para>
6492 </listitem>
6493
6494 </itemizedlist>
6495
6496 </sect1>
6497
6498 <sect1 id="sse412passthrough">
6499
6500 <title>Passing Through SSE4.1/SSE4.2 Instructions</title>
6501
6502 <para>
6503 To provide SSE 4.1/SSE 4.2 support to guests, the host CPU has to
6504 implement these instruction sets. The instruction sets are exposed
6505 to guests by default, but it is possible to disable the
6506 instructions for certain guests by using the following commands:
6507 </para>
6508
6509<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
6510VBoxInternal/CPUM/IsaExts/SSE4.1 0
6511$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
6512VBoxInternal/CPUM/IsaExts/SSE4.2 0</screen>
6513
6514 <para>
6515 These are per-VM settings which are enabled by default.
6516 </para>
6517
6518 </sect1>
6519
6520 <sect1 id="hidledssync">
6521
6522 <title>Support for Keyboard Indicator Synchronization</title>
6523
6524 <para>
6525 This feature makes the host keyboard indicators (LEDs) match those
6526 of the VM's emulated keyboard when the machine window is active.
6527 It is currently implemented for Mac OS X and Windows hosts. This
6528 feature is enabled by default on supported host OSes. You can
6529 disable this feature by running the following command:
6530 </para>
6531
6532<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/HidLedsSync 0</screen>
6533
6534 <para>
6535 This is a per-VM setting that is enabled by default.
6536 </para>
6537
6538 </sect1>
6539
6540 <sect1 id="usbtrafficcapturing">
6541
6542 <title>Capturing USB Traffic for Selected Devices</title>
6543
6544 <para>
6545 You can capture USB traffic for single USB devices or on the root
6546 hub level, which captures the traffic of all USB devices attached
6547 to the root hub. &product-name; stores the traffic in a format
6548 which is compatible with Wireshark. To capture the traffic of a
6549 specific USB device it must be attached to the VM with
6550 <command>VBoxManage</command> using the following command:
6551 </para>
6552
6553<screen>VBoxManage controlvm <replaceable>VM-name</replaceable> usbattach <replaceable>device uuid</replaceable>|<replaceable>address</replaceable> --capturefile <replaceable>filename</replaceable></screen>
6554
6555 <para>
6556 In order to enable capturing on the root hub use the following
6557 command while the VM is not running:
6558 </para>
6559
6560<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
6561VBoxInternal/Devices/usb-ehci/0/LUN#0/Config/CaptureFilename <replaceable>filename</replaceable></screen>
6562
6563 <para>
6564 The command above enables capturing on the root hub attached to
6565 the EHCI controller. To enable it for the OHCI or XHCI controller
6566 replace <literal>usb-ehci</literal> with
6567 <literal>usb-ohci</literal> or <literal>usb-xhci</literal>,
6568 respectively.
6569 </para>
6570
6571 </sect1>
6572
6573 <sect1 id="heartbeatservice">
6574
6575 <title>Configuring the Heartbeat Service</title>
6576
6577 <para>
6578 &product-name; ships a simple heartbeat service. Once the Guest
6579 Additions are active, the guest sends frequent heartbeat pings to
6580 the host. If the guest stops sending the heartbeat pings without
6581 properly terminating the service, the VM process will log this
6582 event in the VBox.log file. In the future it might be possible to
6583 configure dedicated actions but for now there is only a warning in
6584 the log file.
6585 </para>
6586
6587 <para>
6588 There are two parameters to configure. The <emphasis>heartbeat
6589 interval</emphasis> defines the time between two heartbeat pings.
6590 The default value is 2 seconds, that is, the heartbeat service of
6591 the &product-name; Guest Additions will send a heartbeat ping
6592 every two seconds. The value in nanoseconds can be configured like
6593 this:
6594 </para>
6595
6596<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
6597VBoxInternal/Devices/VMMDev/0/Config/HeartbeatInterval 2000000000</screen>
6598
6599 <para>
6600 The <emphasis>heartbeat timeout</emphasis> defines the time the
6601 host waits starting from the last heartbeat ping before it defines
6602 the guest as unresponsive. The default value is 2 times the
6603 heartbeat interval (4 seconds) and can be configured as following,
6604 in nanoseconds:
6605 </para>
6606
6607<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
6608VBoxInternal/Devices/VMMDev/0/Config/HeartbeatTimeout 4000000000</screen>
6609
6610 <para>
6611 If the heartbeat timeout expires, there will be a log message like
6612 <emphasis>VMMDev: HeartBeatCheckTimer: Guest seems to be
6613 unresponsive. Last heartbeat received 5 seconds ago.</emphasis> If
6614 another heartbeat ping arrives after this warning, there will be a
6615 log message like <emphasis>VMMDev: GuestHeartBeat: Guest is
6616 alive.</emphasis>
6617 </para>
6618
6619 </sect1>
6620
6621 <sect1 id="diskencryption">
6622
6623 <title>Encryption of Disk Images</title>
6624
6625 <para>
6626 &product-name; enables you to transparently encrypt the data
6627 stored in hard disk images for the guest. It does not depend on a
6628 specific image format to be used. Images which have the data
6629 encrypted are not portable between &product-name; and other
6630 virtualization software.
6631 </para>
6632
6633 <para>
6634 &product-name; uses the AES algorithm in XTS mode and supports
6635 128-bit or 256-bit data encryption keys (DEK). The DEK is stored
6636 encrypted in the medium properties and is decrypted during VM
6637 startup by entering a password which was chosen when the image was
6638 encrypted.
6639 </para>
6640
6641 <para>
6642 Since the DEK is stored as part of the VM configuration file, it
6643 is important that it is kept safe. Losing the DEK means that the
6644 data stored in the disk images is lost irrecoverably. Having
6645 complete and up to date backups of all data related to the VM is
6646 the responsibility of the user.
6647 </para>
6648
6649 <sect2 id="diskencryption-limitations">
6650
6651 <title>Limitations of Disk Encryption</title>
6652
6653 <para>
6654 There are some limitations the user needs to be aware of when
6655 using this feature:
6656 </para>
6657
6658 <itemizedlist>
6659
6660 <listitem>
6661 <para>
6662 This feature is part of the &product-name; Extension Pack,
6663 which needs to be installed. Otherwise disk encryption is
6664 unavailable.
6665 </para>
6666 </listitem>
6667
6668 <listitem>
6669 <para>
6670 Since encryption works only on the stored user data, it is
6671 currently not possible to check for metadata integrity of
6672 the disk image. Attackers might destroy data by removing or
6673 changing blocks of data in the image or change metadata
6674 items such as the disk size.
6675 </para>
6676 </listitem>
6677
6678 <listitem>
6679 <para>
6680 Exporting appliances which contain encrypted disk images is
6681 not possible because the OVF specification does not support
6682 this. All images are therefore decrypted during export.
6683 </para>
6684 </listitem>
6685
6686 <listitem>
6687 <para>
6688 The DEK is kept in memory while the VM is running to be able
6689 to decrypt data read and encrypt data written by the guest.
6690 While this should be obvious the user needs to be aware of
6691 this because an attacker might be able to extract the key on
6692 a compromised host and decrypt the data.
6693 </para>
6694 </listitem>
6695
6696 <listitem>
6697 <para>
6698 When encrypting or decrypting the images, the password is
6699 passed in clear text using the &product-name; API. This
6700 needs to be kept in mind, especially when using third party
6701 API clients which make use of the webservice where the
6702 password might be transmitted over the network. The use of
6703 HTTPS is mandatory in such a case.
6704 </para>
6705 </listitem>
6706
6707 <listitem>
6708 <para>
6709 Encrypting images with differencing images is only possible
6710 if there are no snapshots or a linear chain of snapshots.
6711 This limitation may be addressed in a future &product-name;
6712 version.
6713 </para>
6714 </listitem>
6715
6716 <listitem>
6717 <para>
6718 The disk encryption feature can protect the content of the
6719 disks configured for a VM only. It does not cover any other
6720 data related to a VM, including saved state or the
6721 configuration file itself.
6722 </para>
6723 </listitem>
6724
6725 </itemizedlist>
6726
6727 </sect2>
6728
6729 <sect2 id="diskencryption-encryption">
6730
6731 <title>Encrypting Disk Images</title>
6732
6733 <para>
6734 Encrypting disk images can be done either using the GUI or
6735 <command>VBoxManage</command>. While the GUI is easier to use,
6736 it works on a per VM basis and encrypts all disk images attached
6737 to the specific VM. With <command>VBoxManage</command> one can
6738 encrypt individual images, including all differencing images. To
6739 encrypt an unencrypted medium with
6740 <command>VBoxManage</command>, use:
6741 </para>
6742
6743<screen>VBoxManage encryptmedium <replaceable>uuid</replaceable>|<replaceable>filename</replaceable> \
6744--newpassword <replaceable>filename</replaceable>|- --cipher <replaceable>cipher-ID</replaceable> --newpasswordid "<replaceable>ID</replaceable></screen>
6745
6746 <para>
6747 To supply the encryption password point
6748 <command>VBoxManage</command> to the file where the password is
6749 stored or specify <option>-</option> to let VBoxManage ask you
6750 for the password on the command line.
6751 </para>
6752
6753 <para>
6754 The cipher parameter specifies the cipher to use for encryption
6755 and can be either <literal>AES-XTS128-PLAIN64</literal> or
6756 <literal>AES-XTS256-PLAIN64</literal>. The specified password
6757 identifier can be freely chosen by the user and is used for
6758 correct identification when supplying multiple passwords during
6759 VM startup.
6760 </para>
6761
6762 <para>
6763 If the user uses the same password when encrypting multiple
6764 images and also the same password identifier, the user needs to
6765 supply the password only once during VM startup.
6766 </para>
6767
6768 </sect2>
6769
6770 <sect2 id="diskencryption-startvm">
6771
6772 <title>Starting a VM with Encrypted Images</title>
6773
6774 <para>
6775 When a VM is started using the GUI, a dialog will open where the
6776 user needs to enter all passwords for all encrypted images
6777 attached to the VM. If another frontend like VBoxHeadless is
6778 used, the VM will be paused as soon as the guest tries to access
6779 an encrypted disk. The user needs to provide the passwords
6780 through <command>VBoxManage</command> using the following
6781 command:
6782 </para>
6783
6784<screen>VBoxManage controlvm <replaceable>uuid</replaceable>|<replaceable>vmname</replaceable> addencpassword <replaceable>ID</replaceable> <replaceable>password</replaceable> [--removeonsuspend yes|no]</screen>
6785
6786 <para>
6787 <replaceable>ID</replaceable> must be the same as the password
6788 identifier supplied when encrypting the images.
6789 <replaceable>password</replaceable> is the password used when
6790 encrypting the images. Optionally, you can specify
6791 <option>--removeonsuspend yes|no</option> to specify whether to
6792 remove the password from VM memory when the VM is suspended.
6793 Before the VM can be resumed, the user needs to supply the
6794 passwords again. This is useful when a VM is suspended by a host
6795 suspend event and the user does not want the password to remain
6796 in memory.
6797 </para>
6798
6799 </sect2>
6800
6801 <sect2 id="diskencryption-decryption">
6802
6803 <title>Decrypting Encrypted Images</title>
6804
6805 <para>
6806 In some circumstances it might be required to decrypt previously
6807 encrypted images. This can be done in the GUI for a complete VM
6808 or using <command>VBoxManage</command> with the following
6809 command:
6810 </para>
6811
6812<screen>VBoxManage encryptmedium <replaceable>uuid</replaceable>|<replaceable>filename</replaceable> --oldpassword <replaceable>file</replaceable>|-</screen>
6813
6814 <para>
6815 The only required parameter is the password the image was
6816 encrypted with. The options are the same as for encrypting
6817 images.
6818 </para>
6819
6820 </sect2>
6821
6822 </sect1>
6823
6824 <sect1 id="gimdebug">
6825
6826 <title>Paravirtualized Debugging</title>
6827
6828 <para>
6829 This section covers debugging of guest operating systems using
6830 interfaces supported by paravirtualization providers.
6831 </para>
6832
6833 <note>
6834 <para>
6835 Paravirtualized debugging significantly alter guest operating
6836 system behaviour and should only be used by expert users for
6837 debugging and diagnostics.
6838 </para>
6839 </note>
6840
6841 <para>
6842 These debug options are specified as a string of key-value pairs
6843 separated by commas. An empty string disables paravirtualized
6844 debugging.
6845 </para>
6846
6847 <sect2 id="gimdebughyperv">
6848
6849 <title>Hyper-V Debug Options</title>
6850
6851 <para>
6852 All of the options listed below are optional, and thus the
6853 default value specified will be used when the corresponding
6854 key-value pair is not specified.
6855 </para>
6856
6857 <itemizedlist>
6858
6859 <listitem>
6860 <para>
6861 Key:
6862 <emphasis role="bold"><literal>enabled</literal></emphasis>
6863 </para>
6864
6865 <para>
6866 Value: <literal>0</literal> or <literal>1</literal>
6867 </para>
6868
6869 <para>
6870 Default: <literal>0</literal>
6871 </para>
6872
6873 <para>
6874 Specify <literal>1</literal> to enable the Hyper-V debug
6875 interface. If this key-value pair is not specified or the
6876 value is not <literal>1</literal>, the Hyper-V debug
6877 interface is disabled regardless of other key-value pairs
6878 being present.
6879 </para>
6880 </listitem>
6881
6882 <listitem>
6883 <para>
6884 Key:
6885 <emphasis role="bold"><literal>address</literal></emphasis>
6886 </para>
6887
6888 <para>
6889 Value: IPv4 address
6890 </para>
6891
6892 <para>
6893 Default: 127.0.0.1
6894 </para>
6895
6896 <para>
6897 Specify the IPv4 address where the remote debugger is
6898 connected.
6899 </para>
6900 </listitem>
6901
6902 <listitem>
6903 <para>
6904 Key:
6905 <emphasis role="bold"><literal>port</literal></emphasis>
6906 </para>
6907
6908 <para>
6909 Value: UDP port number
6910 </para>
6911
6912 <para>
6913 Default: 50000
6914 </para>
6915
6916 <para>
6917 Specify the UDP port number where the remote debugger is
6918 connected.
6919 </para>
6920 </listitem>
6921
6922 <listitem>
6923 <para>
6924 Key:
6925 <emphasis role="bold"><literal>vendor</literal></emphasis>
6926 </para>
6927
6928 <para>
6929 Value: Hyper-V vendor signature reported by CPUID to the
6930 guest
6931 </para>
6932
6933 <para>
6934 Default: When debugging is enabled: <literal>Microsoft
6935 Hv</literal>, otherwise: <literal>VBoxVBoxVBox</literal>
6936 </para>
6937
6938 <para>
6939 Specify the Hyper-V vendor signature which is exposed to the
6940 guest by CPUID. For debugging Microsoft Windows guests, it
6941 is required the hypervisor reports the Microsoft vendor.
6942 </para>
6943 </listitem>
6944
6945 <listitem>
6946 <para>
6947 Key:
6948 <emphasis role="bold"><literal>hypercallinterface</literal>
6949 </emphasis>
6950 </para>
6951
6952 <para>
6953 Value: <literal>0</literal> or <literal>1</literal>
6954 </para>
6955
6956 <para>
6957 Default: <literal>0</literal>
6958 </para>
6959
6960 <para>
6961 Specify whether hypercalls should be suggested for
6962 initiating debug data transfers between host and guest
6963 rather than MSRs when requested by the guest.
6964 </para>
6965 </listitem>
6966
6967 <listitem>
6968 <para>
6969 Key: <emphasis role="bold"><literal>vsinterface</literal>
6970 </emphasis>
6971 </para>
6972
6973 <para>
6974 Value: <literal>0</literal> or <literal>1</literal>
6975 </para>
6976
6977 <para>
6978 Default: When debugging is enabled, <literal>1</literal>,
6979 otherwise <literal>0</literal>
6980 </para>
6981
6982 <para>
6983 Specify whether to expose the VS#1 virtualization service
6984 interface to the guest. This interface is required for
6985 debugging Microsoft Windows 10 32-bit guests, but is
6986 optional for other Windows versions.
6987 </para>
6988 </listitem>
6989
6990 </itemizedlist>
6991
6992 <sect3 id="gimdebughyperv-windows-setup">
6993
6994 <title>Setting up Windows Guests for Debugging with the Hyper-V
6995 Paravirtualization Provider</title>
6996
6997 <para>
6998 Windows supports debugging over a serial cable, USB, IEEE 1394
6999 Firewire, and Ethernet. USB and IEEE 1394 are not applicable
7000 for virtual machines, and Ethernet requires Windows 8 or
7001 later. While a serial connection is universally usable, it is
7002 slow.
7003 </para>
7004
7005 <para>
7006 Debugging using the Hyper-V debug transport, supported on
7007 Windows Vista and later, offers significant benefits. It
7008 provides excellent performance due to direct host-to-guest
7009 transfers, it is easy to set up and requires minimal support
7010 from the hypervisor. It can be used with the debugger running
7011 on the same host as the VM or with the debugger and VM on
7012 separate machines connected over a network.
7013 </para>
7014
7015 <para>
7016 <emphasis role="bold">Prerequisites</emphasis>
7017 </para>
7018
7019 <itemizedlist>
7020
7021 <listitem>
7022 <para>
7023 A VM configured for Hyper-V paravirtualization running a
7024 Windows Vista or newer Windows guest. You can check the
7025 effective paravirtualization provider for your VM with the
7026 output of the following <command>VBoxManage</command>
7027 command:
7028 </para>
7029
7030<screen>$ VBoxManage showvminfo <replaceable>VM-name</replaceable></screen>
7031 </listitem>
7032
7033 <listitem>
7034 <para>
7035 A sufficiently up-to-date version of the Microsoft WinDbg
7036 debugger required to debug the version of Windows in your
7037 VM.
7038 </para>
7039 </listitem>
7040
7041 <listitem>
7042 <para>
7043 While Windows 8 and newer Windows guests ship with Hyper-V
7044 debug support, Windows 7 and Vista do not. To use Hyper-V
7045 debugging with a Windows 7 or Vista guest, copy the file
7046 <filename>kdvm.dll</filename> from a Windows 8.0
7047 installation. This file is typically located in
7048 <filename>C:\Windows\System32</filename>. Copy it to the
7049 same location in your Windows 7/Vista guest. Make sure you
7050 copy the 32-bit or 64-bit version of the DLL which matches
7051 your guest OS.
7052 </para>
7053
7054 <note>
7055 <para>
7056 Only Windows 8.0 ships <filename>kdvm.dll</filename>.
7057 Windows 8.1 and newer Windows versions do not.
7058 </para>
7059 </note>
7060 </listitem>
7061
7062 </itemizedlist>
7063
7064 <para>
7065 <emphasis role="bold">VM and Guest Configuration</emphasis>
7066 </para>
7067
7068 <orderedlist>
7069
7070 <listitem>
7071 <para>
7072 Power off the VM.
7073 </para>
7074 </listitem>
7075
7076 <listitem>
7077 <para>
7078 Enable the debug options with the following
7079 <command>VBoxManage</command> command:
7080 </para>
7081
7082<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --paravirt-debug "enabled=1"</screen>
7083
7084 <para>
7085 The above command assumes your debugger will connect to
7086 your host machine on UDP port 50000. However, if you need
7087 to run the debugger on a remote machine you may specify
7088 the remote address and port here. For example:
7089 </para>
7090
7091<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
7092--paravirt-debug "enabled=1,address=192.168.32.1,port=55000"</screen>
7093
7094 <para>
7095 See <xref linkend="gimdebughyperv" /> for the complete set
7096 of options.
7097 </para>
7098 </listitem>
7099
7100 <listitem>
7101 <para>
7102 Start the VM.
7103 </para>
7104 </listitem>
7105
7106 <listitem>
7107 <para>
7108 In the guest, start an elevated command prompt and execute
7109 the following commands:
7110 </para>
7111
7112 <itemizedlist>
7113
7114 <listitem>
7115 <para>
7116 For a Windows 8 or newer Windows guest:
7117 </para>
7118
7119<screen>bcdedit /dbgsettings net hostip:5.5.5.5 port:50000 key:1.2.3.4</screen>
7120 </listitem>
7121
7122 <listitem>
7123 <para>
7124 For a Windows 7 or Vista guest:
7125 </para>
7126
7127<screen>bcdedit /set loadoptions host_ip=5.5.5.5,host_port=50000,encryption_key=1.2.3.4</screen>
7128
7129<screen>bcdedit /set dbgtransport kdvm.dll</screen>
7130
7131 <para>
7132 The IP address and port in the
7133 <command>bcdedit</command> command are ignored when
7134 using the Hyper-V debug transport. Any valid IP and a
7135 port number greater than 49151 and lower than 65536
7136 can be entered.
7137 </para>
7138
7139 <para>
7140 The encryption key in the <command>bcdedit</command>
7141 command is relevant and must be valid. The key
7142 "1.2.3.4" used in the above example is valid and may
7143 be used if security is not a concern. If you do not
7144 specify any encryption key, <command>bcdedit</command>
7145 will generate one for you and you will need to copy
7146 this key to later enter in Microsoft WinDbg on the
7147 remote end. This encryption key is used to encrypt the
7148 debug data exchanged between Windows and the debugger.
7149 </para>
7150 </listitem>
7151
7152 <listitem>
7153 <para>
7154 Run one or more of the following commands to enable
7155 debugging for the appropriate phase or component of
7156 your Windows guest:
7157 </para>
7158
7159<screen>bcdedit /set debug on</screen>
7160
7161<screen>bcdedit /set bootdebug on</screen>
7162
7163<screen>bcdedit /set {bootmgr} bootdebug on</screen>
7164
7165 <para>
7166 Please note that the <command>bootdebug</command>
7167 options are only effective on Windows 8 or newer when
7168 using the Hyper-V debug transport. Refer to Microsoft
7169 Windows documentation for detailed explanation of
7170 <command>bcdedit</command> options.
7171 </para>
7172 </listitem>
7173
7174 </itemizedlist>
7175 </listitem>
7176
7177 <listitem>
7178 <para>
7179 Start Microsoft WinDbg on your host machine or remote
7180 host.
7181 </para>
7182
7183 <para>
7184 From the <emphasis role="bold">File</emphasis> menu,
7185 select <emphasis role="bold">Kernel Debug</emphasis>. On
7186 the <emphasis role="bold">NET</emphasis> tab, specify the
7187 UDP port number you used in the
7188 <literal>paravirtdebug</literal> options. If you did not
7189 specify any, leave it as 50000. Ensure that the UDP port
7190 is not blocked by a firewall or other security software.
7191 </para>
7192
7193 <para>
7194 In the <emphasis role="bold">Key</emphasis> field, enter
7195 <literal>1.2.3.4</literal> or the encryption key from the
7196 <command>bcdedit</command> command in your Windows guest.
7197 </para>
7198
7199 <para>
7200 Click <emphasis role="bold">OK</emphasis> to start
7201 listening for connections. Microsoft WinDbg typically
7202 shows a Waiting to Reconnect message during this phase.
7203 </para>
7204
7205 <para>
7206 Alternatively, to directly start a debug session, run
7207 WinDbg from the command line as follows :
7208 </para>
7209
7210<screen>windbg.exe -k net:port=50000,key=1.2.3.4</screen>
7211
7212 <para>
7213 See the WinDbg documentation for the complete command line
7214 syntax.
7215 </para>
7216 </listitem>
7217
7218 <listitem>
7219 <para>
7220 Reboot your Windows guest and it should then connect as a
7221 debuggee with Microsoft WinDbg.
7222 </para>
7223 </listitem>
7224
7225 </orderedlist>
7226
7227 </sect3>
7228
7229 </sect2>
7230
7231 </sect1>
7232
7233 <sect1 id="pcspeaker_passthrough">
7234
7235 <title>PC Speaker Passthrough</title>
7236
7237 <para>
7238 As an experimental feature, primarily due to being limited to
7239 Linux host only and unknown Linux distribution coverage,
7240 &product-name; supports passing through the PC speaker to the
7241 host. The PC speaker, sometimes called the system speaker, is a
7242 way to produce audible feedback such as beeps without the need for
7243 regular audio and sound card support.
7244 </para>
7245
7246 <para>
7247 The PC speaker passthrough feature in &product-name; handles beeps
7248 only. Advanced PC speaker use by the VM, such as PCM audio, will
7249 not work, resulting in undefined host behavior.
7250 </para>
7251
7252 <para>
7253 Producing beeps on Linux is a very complex topic. &product-name;
7254 offers a collection of options, in an attempt to make this work
7255 deterministically and reliably on as many Linux distributions and
7256 system configurations as possible. These are summarized in the
7257 following table.
7258 </para>
7259
7260 <table id="table-pcspeaker-config" tabstyle="oracle-all">
7261 <title>PC Speaker Configuration Options</title>
7262 <tgroup cols="3">
7263 <thead>
7264 <row>
7265 <entry><para>
7266 <emphasis role="bold">Code</emphasis>
7267 </para></entry>
7268 <entry><para>
7269 <emphasis role="bold">Device</emphasis>
7270 </para></entry>
7271 <entry><para>
7272 <emphasis role="bold">Notes</emphasis>
7273 </para></entry>
7274 </row>
7275 </thead>
7276 <tbody>
7277 <row>
7278 <entry><para>
7279 1
7280 </para></entry>
7281 <entry><para>
7282 <filename>/dev/input/by-path/platform-pcspkr-event-spkr</filename>
7283 </para></entry>
7284 <entry><para>
7285 Direct host PC speaker use.
7286 </para></entry>
7287 </row>
7288 <row>
7289 <entry><para>
7290 2
7291 </para></entry>
7292 <entry><filename>/dev/tty</filename></entry>
7293 <entry><para>
7294 Uses the terminal association of the VM process. VM
7295 needs to be started on a virtual console.
7296 </para></entry>
7297 </row>
7298 <row>
7299 <entry><para>
7300 3
7301 </para></entry>
7302 <entry><para>
7303 <filename>/dev/tty0</filename> or
7304 <filename>/dev/vc/0</filename>
7305 </para></entry>
7306 <entry><para>
7307 Can only be used by user <literal>root</literal> or
7308 users with <literal>cap_sys_tty_config</literal>
7309 capability.
7310 </para></entry>
7311 </row>
7312 <row>
7313 <entry><para>
7314 9
7315 </para></entry>
7316 <entry><para>
7317 A user-specified console or evdev device path.
7318 </para></entry>
7319 <entry><para>
7320 As for codes 1 to 3, but with a custom device path.
7321 </para></entry>
7322 </row>
7323 <row>
7324 <entry><para>
7325 70
7326 </para></entry>
7327 <entry><para>
7328 <filename>/dev/tty</filename>
7329 </para></entry>
7330 <entry><para>
7331 Standard beep only. Loses frequency and length. See code
7332 2.
7333 </para></entry>
7334 </row>
7335 <row>
7336 <entry><para>
7337 79
7338 </para></entry>
7339 <entry><para>
7340 A user-specified terminal device path.
7341 </para></entry>
7342 <entry><para>
7343 As for code 70, but with a custom device path.
7344 </para></entry>
7345 </row>
7346 <row>
7347 <entry><para>
7348 100
7349 </para></entry>
7350 <entry><para>
7351 All of the above.
7352 </para></entry>
7353 <entry><para>
7354 Tries all the available codes.
7355 </para></entry>
7356 </row>
7357 </tbody>
7358 </tgroup>
7359 </table>
7360
7361 <para>
7362 To enable PC speaker passthrough use the following command:
7363 </para>
7364
7365<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/Devices/i8254/0/Config/PassthroughSpeaker" <replaceable>N</replaceable></screen>
7366
7367 <para>
7368 Replace <replaceable>N</replaceable> with the code representing
7369 the case you want to use. Changing this setting takes effect when
7370 you next start the VM. It is safe to enable PC speaker passthrough
7371 on all host OSes. It will only have an effect on Linux.
7372 </para>
7373
7374 <para>
7375 The VM log file, <filename>VBox.log</filename>, contains lines
7376 with the prefix <literal>PIT: speaker:</literal> showing the PC
7377 speaker passthrough setup activities. It gives hints which device
7378 it picked or why it failed.
7379 </para>
7380
7381 <para>
7382 Enabling PC speaker passthrough for the VM is usually the simple
7383 part. The real difficulty is making sure that &product-name; can
7384 access the necessary device, because in a typical Linux install
7385 most of them can only be accessed by user <literal>root</literal>.
7386 You should follow the preferred way to persistently change this,
7387 such as by referring to your distribution's documentation. Since
7388 there are countless Linux distribution variants, we can only give
7389 the general hints that there is often a way to give the X11
7390 session user access to additional devices, or you need to find a
7391 working solution using a udev configuration file. If everything
7392 fails you might try setting the permissions using a script which
7393 is run late enough in the host system startup.
7394 </para>
7395
7396 <para>
7397 Sometimes additional rules are applied by the kernel to limit
7398 access. For example, that the VM process must have the same
7399 controlling terminal as the device configured to be used for
7400 beeping, something which is often very difficult to achieve for
7401 GUI applications such as &product-name;. The table above contains
7402 some hints, but in general refer to the Linux documentation.
7403 </para>
7404
7405 <para>
7406 If you have trouble getting any beeps even if the device
7407 permissions are set up and VBox.log confirms that it uses evdev or
7408 console for the PC speaker control, check if your system has a PC
7409 speaker. Some systems do not have one. Other complications can
7410 arise from Linux rerouting the PC speaker output to a sound card.
7411 Check if the beeps are audible if you connect speakers to your
7412 sound card. Today almost all systems have one. Finally, check if
7413 the audio mixer control has a channel named "beep", which could be
7414 hidden in the mixer settings, and that it is not muted.
7415 </para>
7416
7417 </sect1>
7418
7419 <sect1 id="usbip">
7420
7421 <title>Accessing USB devices Exposed Over the Network with USB/IP</title>
7422
7423 <para>
7424 &product-name; supports passing through USB devices which are
7425 exposed over the network using the USB over IP protocol without
7426 the need to configure the client side provided by the kernel and
7427 usbip tools. Furthermore, this feature works with &product-name;
7428 running on any supported host, rather than just Linux alone, as is
7429 the case with the official client.
7430 </para>
7431
7432 <para>
7433 To enable support for passing through USB/IP devices, use the
7434 following command to add the device server that exports the
7435 devices:
7436 </para>
7437
7438<screen>VBoxManage usbdevsource add <replaceable>unique-name</replaceable> --backend <replaceable>USBIP</replaceable> --address <replaceable>device-server</replaceable>[:<replaceable>port</replaceable>]</screen>
7439
7440 <para>
7441 USB devices exported on the device server are then accessible
7442 through the GUI or <command>VBoxManage</command>, like any USB
7443 devices attached locally. This can be used multiple times to
7444 access different device servers.
7445 </para>
7446
7447 <para>
7448 To remove a device server, the following command can be used:
7449 </para>
7450
7451<screen>$ VBoxManage usbdevsource remove <replaceable>unique-name</replaceable></screen>
7452
7453 <sect2 id="usbip-setup-server">
7454
7455 <title>Setting up USB/IP Support on a Linux System</title>
7456
7457 <para>
7458 This section gives a brief overview on how to set up a Linux
7459 based system to act as a USB device server. The system on the
7460 server requires that the <filename>usbip-core.ko</filename> and
7461 <filename>usbip-host.ko</filename> kernel drivers are available,
7462 and that the USB/IP tools package is installed. The particular
7463 installation method for the necessary tools depends on which
7464 distribution is used. For example, for Debian based systems, use
7465 the following command to install the required tools:
7466 </para>
7467
7468<screen>$ apt-get install usbip-utils</screen>
7469
7470 <para>
7471 To check whether the necessary tools are already installed use
7472 the following command:
7473 </para>
7474
7475<screen>
7476$ usbip list -l
7477 </screen>
7478
7479 <para>
7480 This should produce output similar to that shown in the example
7481 below:
7482 </para>
7483
7484<screen>
7485 - busid 4-2 (0bda:0301)
7486 Realtek Semiconductor Corp. : multicard reader (0bda:0301)
7487
7488 - busid 5-1 (046d:c52b)
7489 Logitech, Inc. : Unifying Receiver (046d:c52b)
7490 </screen>
7491
7492 <para>
7493 If everything is installed, the USB/IP server needs to be
7494 started as <literal>root</literal> using the following command:
7495 </para>
7496
7497<screen># usbipd -D</screen>
7498
7499 <para>
7500 See the documentation for the installed distribution to
7501 determine how to start the service when the system boots.
7502 </para>
7503
7504 <para>
7505 By default, no device on the server is exported. This must be
7506 done manually for each device. To export a device use the
7507 following command:
7508 </para>
7509
7510<screen># usbip bind -b "bus identifier"</screen>
7511
7512 <para>
7513 To export the multicard reader in the previous example:
7514 </para>
7515
7516<screen># usbip bind -b 4-2</screen>
7517
7518 </sect2>
7519
7520 <sect2 id="usbip-security">
7521
7522 <title>Security Considerations</title>
7523
7524 <para>
7525 The communication between the server and client is unencrypted
7526 and there is no authorization required to access exported
7527 devices. An attacker might sniff sensitive data or gain control
7528 over a device. To mitigate this risk, the device should be
7529 exposed over a local network to which only trusted clients have
7530 access. To access the device remotely over a public network, a
7531 VPN solution should be used to provide the required level of
7532 security protection.
7533 </para>
7534
7535 </sect2>
7536
7537 </sect1>
7538
7539 <sect1 id="hyperv-support">
7540
7541 <title>Using Hyper-V with &product-name;</title>
7542
7543 <para>
7544 &product-name; can be used on a Windows host where Hyper-V is
7545 running. This is an experimental feature.
7546 </para>
7547
7548 <para>
7549 No configuration is required. &product-name; detects Hyper-V
7550 automatically and uses Hyper-V as the virtualization engine for
7551 the host system. The CPU icon in the VM window status bar
7552 indicates that Hyper-V is being used.
7553 </para>
7554
7555 <note>
7556 <para>
7557 When using this feature, some host systems might experience
7558 significant &product-name; performance degradation.
7559 </para>
7560 </note>
7561
7562 </sect1>
7563
7564 <sect1 id="nested-virt">
7565
7566 <title>Nested Virtualization</title>
7567
7568 <para>
7569 &product-name; supports <emphasis>nested
7570 virtualization</emphasis>. This feature enables the passthrough of
7571 hardware virtualization functions to the guest VM. That means that
7572 you can install a hypervisor, such as &product-name;, Oracle VM
7573 Server or KVM, on an &product-name; guest. You can then create and
7574 run VMs within the guest VM.
7575 </para>
7576
7577 <para>
7578 Hardware virtualization features not present on the host CPU will
7579 not be exposed to the guest. In addition, some features such as
7580 nested paging are not yet supported for passthrough to the guest.
7581 </para>
7582
7583 <para>
7584 You can enable the nested virtualization feature in one of the
7585 following ways:
7586 </para>
7587
7588 <itemizedlist>
7589
7590 <listitem>
7591 <para>
7592 From the VirtualBox Manager, select the
7593 <emphasis role="bold">Enable Nested VT-x/AMD-V</emphasis>
7594 check box on the <emphasis role="bold">Processor</emphasis>
7595 tab. To disable the feature, deselect the check box.
7596 </para>
7597 </listitem>
7598
7599 <listitem>
7600 <para>
7601 Use the <option>--nested-hw-virt</option> option of the
7602 <command>VBoxManage modifyvm</command> command to enable or
7603 disable nested virtualization. See
7604 <xref linkend="vboxmanage-modifyvm"/>.
7605 </para>
7606 </listitem>
7607
7608 </itemizedlist>
7609
7610 </sect1>
7611
7612 <sect1 id="vboxsvc-session-0">
7613
7614 <title>VBoxSVC running in Windows session 0</title>
7615
7616 <para>
7617 &product-name; supports executing the VBoxSVC in Windows session 0.
7618 This allows VBoxSVC to run like a regular Windows service, which in turn
7619 enables headless VMs to continue running even if the user logs out.
7620 <note>
7621 <para>This feature currently is marked as being <emphasis role="bold">experimental</emphasis>!</para>
7622 </note>
7623 </para>
7624
7625 <para>
7626 The feature is disabled by default and can be enabled by creating a REG_DWORD
7627 value <literal>ServerSession0</literal> in the key
7628 <literal>HKEY_LOCAL_MACHINE\Software\Oracle\VirtualBox\VBoxSDS</literal> of the
7629 Windows registry. Specifying <literal>1</literal> as the value's data to
7630 enable the feature, or <literal>0</literal> to disable the feature again.
7631 A host reboot is needed in order to make the change effective.
7632 </para>
7633
7634 <sect2 id="vboxsvc-session-0-known-issues">
7635
7636 <title>Known issues</title>
7637
7638 <itemizedlist>
7639 <listitem>
7640 <para>
7641 Due to different Windows sessions having their own set of resources,
7642 there might be some issues with accessing network shares created in
7643 the interactive user session when at least one of &product-name;
7644 processes are running in session 0.
7645 </para>
7646 <para>
7647 For accessing network shares within session 0, a possible workaround
7648 is to establish permanent access to the share and restart the host after that.
7649 This might change in the future, however.
7650 </para>
7651 </listitem>
7652 </itemizedlist>
7653 </sect2>
7654
7655 </sect1>
7656
7657 <xi:include href="user_isomakercmd-man.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
7658
7659</chapter>
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette