VirtualBox

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

Last change on this file since 87086 was 87086, checked in by vboxsync, 4 years ago

doc/manual: eliminate TABs which crept in

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