VirtualBox

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

Last change on this file since 99095 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

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

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