VirtualBox

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

Last change on this file since 85929 was 85929, checked in by vboxsync, 5 years ago

Main: bugref:9224: Main+VBoxManageDisk+doc part

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 237.8 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 from a master login system. 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 /path/to/file.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 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 /path/to/file.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 /path/to/file.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>/path/to/file.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 /path/to/file.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=/path/to/file/with/boot_sector</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 /path/to/file.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" "/path/to/table.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, or blacklist, certain entries in the global
2878 settings page of 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, or blacklist, certain menu actions in the VM
3011 window:
3012 </para>
3013
3014<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMenus OPTION[,OPTION...]</screen>
3015
3016 <para>
3017 where <literal>OPTION</literal> is one of the following
3018 keywords:
3019 </para>
3020
3021 <variablelist>
3022
3023 <varlistentry>
3024 <term>
3025 <literal>All</literal>
3026 </term>
3027
3028 <listitem>
3029 <para>
3030 Do not show any menu in the VM window.
3031 </para>
3032 </listitem>
3033 </varlistentry>
3034
3035 <varlistentry>
3036 <term>
3037 <literal>Application</literal>
3038 </term>
3039
3040 <listitem>
3041 <para>
3042 Do not show
3043 <emphasis role="bold">Application/File</emphasis> menu in
3044 the VM window.
3045 </para>
3046 </listitem>
3047 </varlistentry>
3048
3049 <varlistentry>
3050 <term>
3051 <literal>Machine</literal>
3052 </term>
3053
3054 <listitem>
3055 <para>
3056 Do not show the <emphasis role="bold">Machine</emphasis>
3057 menu in the VM window.
3058 </para>
3059 </listitem>
3060 </varlistentry>
3061
3062 <varlistentry>
3063 <term>
3064 <literal>View</literal>
3065 </term>
3066
3067 <listitem>
3068 <para>
3069 Do not show the <emphasis role="bold">View</emphasis> menu
3070 in the VM window.
3071 </para>
3072 </listitem>
3073 </varlistentry>
3074
3075 <varlistentry>
3076 <term>
3077 <literal>Input</literal>
3078 </term>
3079
3080 <listitem>
3081 <para>
3082 Do not show <emphasis role="bold">Input</emphasis> menu in
3083 the VM window.
3084 </para>
3085 </listitem>
3086 </varlistentry>
3087
3088 <varlistentry>
3089 <term>
3090 <literal>Devices</literal>
3091 </term>
3092
3093 <listitem>
3094 <para>
3095 Do not show the <emphasis role="bold">Devices</emphasis>
3096 menu in the VM window.
3097 </para>
3098 </listitem>
3099 </varlistentry>
3100
3101 <varlistentry>
3102 <term>
3103 <literal>Help</literal>
3104 </term>
3105
3106 <listitem>
3107 <para>
3108 Do not show the <emphasis role="bold">Help</emphasis> menu
3109 in the VM window.
3110 </para>
3111 </listitem>
3112 </varlistentry>
3113
3114 <varlistentry>
3115 <term>
3116 <literal>Debug</literal>
3117 </term>
3118
3119 <listitem>
3120 <para>
3121 Do not show the <emphasis role="bold">Debug</emphasis>
3122 menu in the VM window. The Debug menu is only visible if
3123 the GUI was started with special command line parameters
3124 or environment variable settings.
3125 </para>
3126 </listitem>
3127 </varlistentry>
3128
3129 </variablelist>
3130
3131 <para>
3132 This is a per-VM or global setting. Any combination of the above
3133 is allowed. To restore the default behavior, use the following
3134 command:
3135 </para>
3136
3137<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMenus</screen>
3138
3139 <para>
3140 You can also disable, or blacklist, certain menu actions of
3141 certain menus. Use the following command to disable certain
3142 actions of the <emphasis role="bold">Application</emphasis>
3143 menu. This is only available on Mac OS X hosts.
3144 </para>
3145
3146<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
3147
3148 <para>
3149 where <literal>OPTION</literal> is one of the following
3150 keywords:
3151 </para>
3152
3153 <variablelist>
3154
3155 <varlistentry>
3156 <term>
3157 <literal>All</literal>
3158 </term>
3159
3160 <listitem>
3161 <para>
3162 Do not show any menu item in this menu.
3163 </para>
3164 </listitem>
3165 </varlistentry>
3166
3167 <varlistentry>
3168 <term>
3169 <literal>About</literal>
3170 </term>
3171
3172 <listitem>
3173 <para>
3174 Do not show the <emphasis role="bold">About</emphasis>
3175 menu item in this menu.
3176 </para>
3177 </listitem>
3178 </varlistentry>
3179
3180 <varlistentry>
3181 <term>
3182 <literal>Preferences</literal>
3183 </term>
3184
3185 <listitem>
3186 <para>
3187 Do not show the
3188 <emphasis role="bold">Preferences</emphasis> menu item in
3189 this menu.
3190 </para>
3191 </listitem>
3192 </varlistentry>
3193
3194 <varlistentry>
3195 <term>
3196 <literal>NetworkAccessManager</literal>
3197 </term>
3198
3199 <listitem>
3200 <para>
3201 Do not show the <emphasis role="bold">Network Operations
3202 Manager</emphasis> menu item in this menu.
3203 </para>
3204 </listitem>
3205 </varlistentry>
3206
3207 <varlistentry>
3208 <term>
3209 <literal>ResetWarnings</literal>
3210 </term>
3211
3212 <listitem>
3213 <para>
3214 Do not show the <emphasis role="bold">Reset All
3215 Warnings</emphasis> menu item in this menu.
3216 </para>
3217 </listitem>
3218 </varlistentry>
3219
3220 <varlistentry>
3221 <term>
3222 <literal>Close</literal>
3223 </term>
3224
3225 <listitem>
3226 <para>
3227 Do not show the <emphasis role="bold">Close</emphasis>
3228 menu item in this menu.
3229 </para>
3230 </listitem>
3231 </varlistentry>
3232
3233 </variablelist>
3234
3235 <para>
3236 This is a per-VM or global setting. Any combination of the above
3237 is allowed. To restore the default behavior, use the following
3238 command:
3239 </para>
3240
3241<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMenus</screen>
3242
3243 <para>
3244 Use the following command to disable certain actions of the
3245 <emphasis role="bold">Machine</emphasis> menu:
3246 </para>
3247
3248<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMachineMenuActions OPTION[,OPTION...]</screen>
3249
3250 <para>
3251 where <literal>OPTION</literal> is one of the following
3252 keywords:
3253 </para>
3254
3255 <variablelist>
3256
3257 <varlistentry>
3258 <term>
3259 <literal>All</literal>
3260 </term>
3261
3262 <listitem>
3263 <para>
3264 Do not show any menu item in this menu.
3265 </para>
3266 </listitem>
3267 </varlistentry>
3268
3269 <varlistentry>
3270 <term>
3271 <literal>SettingsDialog</literal>
3272 </term>
3273
3274 <listitem>
3275 <para>
3276 Do not show the <emphasis role="bold">Settings</emphasis>
3277 menu item in this menu.
3278 </para>
3279 </listitem>
3280 </varlistentry>
3281
3282 <varlistentry>
3283 <term>
3284 <literal>TakeSnapshot</literal>
3285 </term>
3286
3287 <listitem>
3288 <para>
3289 Do not show the <emphasis role="bold">Take
3290 Snapshot...</emphasis> menu item in this menu.
3291 </para>
3292 </listitem>
3293 </varlistentry>
3294
3295 <varlistentry>
3296 <term>
3297 <literal>InformationDialog</literal>
3298 </term>
3299
3300 <listitem>
3301 <para>
3302 Do not show the <emphasis role="bold">Session
3303 Information...</emphasis> menu item in this menu.
3304 </para>
3305 </listitem>
3306 </varlistentry>
3307
3308 <varlistentry>
3309 <term>
3310 <literal>FileManagerDialog</literal>
3311 </term>
3312
3313 <listitem>
3314 <para>
3315 Do not show the <emphasis role="bold">File
3316 Manager...</emphasis> menu item in this menu.
3317 </para>
3318 </listitem>
3319 </varlistentry>
3320
3321 <varlistentry>
3322 <term>
3323 <literal>Pause</literal>
3324 </term>
3325
3326 <listitem>
3327 <para>
3328 Do not show the <emphasis role="bold">Pause</emphasis>
3329 menu item in this menu.
3330 </para>
3331 </listitem>
3332 </varlistentry>
3333
3334 <varlistentry>
3335 <term>
3336 <literal>Reset</literal>
3337 </term>
3338
3339 <listitem>
3340 <para>
3341 Do not show the <emphasis role="bold">Reset</emphasis>
3342 menu item in this menu.
3343 </para>
3344 </listitem>
3345 </varlistentry>
3346
3347 <varlistentry>
3348 <term>
3349 <literal>Shutdown</literal>
3350 </term>
3351
3352 <listitem>
3353 <para>
3354 Do not show the <emphasis role="bold">ACPI
3355 Shutdown</emphasis> menu item in this menu.
3356 </para>
3357 </listitem>
3358 </varlistentry>
3359
3360 </variablelist>
3361
3362 <para>
3363 This is a per-VM or global setting. Any combination of the above
3364 is allowed. To restore the default behavior, use
3365 </para>
3366
3367<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeMachineMenuActions</screen>
3368
3369 <para>
3370 Use the following command to disable certain actions of the
3371 <emphasis role="bold">View</emphasis> menu:
3372 </para>
3373
3374<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeViewMenuActions OPTION[,OPTION...]</screen>
3375
3376 <para>
3377 where <literal>OPTION</literal> is one of the following
3378 keywords:
3379 </para>
3380
3381 <variablelist>
3382
3383 <varlistentry>
3384 <term>
3385 <literal>All</literal>
3386 </term>
3387
3388 <listitem>
3389 <para>
3390 Do not show any menu item in this menu.
3391 </para>
3392 </listitem>
3393 </varlistentry>
3394
3395 <varlistentry>
3396 <term>
3397 <literal>Fullscreen</literal>
3398 </term>
3399
3400 <listitem>
3401 <para>
3402 Do not show the <emphasis role="bold">Full-screen
3403 Mode</emphasis> menu item in this menu.
3404 </para>
3405 </listitem>
3406 </varlistentry>
3407
3408 <varlistentry>
3409 <term>
3410 <literal>Seamless</literal>
3411 </term>
3412
3413 <listitem>
3414 <para>
3415 Do not show the <emphasis role="bold">Seamless
3416 Mode</emphasis> menu item in this menu.
3417 </para>
3418 </listitem>
3419 </varlistentry>
3420
3421 <varlistentry>
3422 <term>
3423 <literal>Scale</literal>
3424 </term>
3425
3426 <listitem>
3427 <para>
3428 Do not show the <emphasis role="bold">Scaled
3429 Mode</emphasis> menu item in this menu.
3430 </para>
3431 </listitem>
3432 </varlistentry>
3433
3434 <varlistentry>
3435 <term>
3436 <literal>GuestAutoresize</literal>
3437 </term>
3438
3439 <listitem>
3440 <para>
3441 Do not show the <emphasis role="bold">Auto-resize Guest
3442 Display</emphasis> menu item in this menu.
3443 </para>
3444 </listitem>
3445 </varlistentry>
3446
3447 <varlistentry>
3448 <term>
3449 <literal>AdjustWindow</literal>
3450 </term>
3451
3452 <listitem>
3453 <para>
3454 Do not show the <emphasis role="bold">Adjust Window
3455 Size</emphasis> menu item in this menu.
3456 </para>
3457 </listitem>
3458 </varlistentry>
3459
3460 <varlistentry>
3461 <term>
3462 <literal>TakeScreenshot</literal>
3463 </term>
3464
3465 <listitem>
3466 <para>
3467 Do not show the <emphasis role="bold">Take
3468 Screenshot...</emphasis> menu item in this menu.
3469 </para>
3470 </listitem>
3471 </varlistentry>
3472
3473 <varlistentry>
3474 <term>
3475 <literal>Recording</literal>
3476 </term>
3477
3478 <listitem>
3479 <para>
3480 Do not show the <emphasis role="bold">Recording</emphasis>
3481 menu item in this menu.
3482 </para>
3483 </listitem>
3484 </varlistentry>
3485
3486 <varlistentry>
3487 <term>
3488 <literal>VRDEServer</literal>
3489 </term>
3490
3491 <listitem>
3492 <para>
3493 Do not show the <emphasis role="bold">Remote
3494 Display</emphasis> menu item in this menu.
3495 </para>
3496 </listitem>
3497 </varlistentry>
3498
3499 <varlistentry>
3500 <term>
3501 <literal>MenuBar</literal>
3502 </term>
3503
3504 <listitem>
3505 <para>
3506 Do not show the <emphasis role="bold">Menu Bar</emphasis>
3507 menu item in this menu.
3508 </para>
3509 </listitem>
3510 </varlistentry>
3511
3512 <varlistentry>
3513 <term>
3514 <literal>MenuBarSettings</literal>
3515 </term>
3516
3517 <listitem>
3518 <para>
3519 Do not show the <emphasis role="bold">Menu Bar
3520 Settings...</emphasis> menu item in this menu.
3521 </para>
3522 </listitem>
3523 </varlistentry>
3524
3525 <varlistentry>
3526 <term>
3527 <literal>StatusBar</literal>
3528 </term>
3529
3530 <listitem>
3531 <para>
3532 Do not show the <emphasis role="bold">Status
3533 Bar</emphasis> menu item in this menu.
3534 </para>
3535 </listitem>
3536 </varlistentry>
3537
3538 <varlistentry>
3539 <term>
3540 <literal>StatusbarSettings</literal>
3541 </term>
3542
3543 <listitem>
3544 <para>
3545 Do not show the <emphasis role="bold">Statusbar
3546 Settings...</emphasis> menu item in this menu.
3547 </para>
3548 </listitem>
3549 </varlistentry>
3550
3551 </variablelist>
3552
3553 <para>
3554 This is a per-VM or global setting. Any combination of the above
3555 is allowed. To restore the default behavior, use
3556 </para>
3557
3558<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeViewMenuActions</screen>
3559
3560 <para>
3561 Use the following command to disable certain actions of the
3562 <emphasis role="bold">Input</emphasis> menu:
3563 </para>
3564
3565<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeInputMenuActions OPTION[,OPTION...]</screen>
3566
3567 <para>
3568 where <literal>OPTION</literal> is one of the following
3569 keywords:
3570 </para>
3571
3572 <variablelist>
3573
3574 <varlistentry>
3575 <term>
3576 <literal>All</literal>
3577 </term>
3578
3579 <listitem>
3580 <para>
3581 Do not show any menu item in this menu.
3582 </para>
3583 </listitem>
3584 </varlistentry>
3585
3586 <varlistentry>
3587 <term>
3588 <literal>Keyboard</literal>
3589 </term>
3590
3591 <listitem>
3592 <para>
3593 Do not show the <emphasis role="bold">Keyboard</emphasis>
3594 menu item in this menu.
3595 </para>
3596 </listitem>
3597 </varlistentry>
3598
3599 <varlistentry>
3600 <term>
3601 <literal>KeyboardSettings</literal>
3602 </term>
3603
3604 <listitem>
3605 <para>
3606 Do not show the <emphasis role="bold">Keyboard
3607 Settings...</emphasis> menu item in this menu.
3608 </para>
3609 </listitem>
3610 </varlistentry>
3611
3612 <varlistentry>
3613 <term>
3614 <literal>SoftKeyboard</literal>
3615 </term>
3616
3617 <listitem>
3618 <para>
3619 Do not show the <emphasis role="bold">Soft
3620 Keyboard...</emphasis> menu item in this menu.
3621 </para>
3622 </listitem>
3623 </varlistentry>
3624
3625 <varlistentry>
3626 <term>
3627 <literal>TypeCAD</literal>
3628 </term>
3629
3630 <listitem>
3631 <para>
3632 Do not show the <emphasis role="bold">Insert
3633 Ctrl-Alt-Del</emphasis> menu item in this menu.
3634 </para>
3635 </listitem>
3636 </varlistentry>
3637
3638 <varlistentry>
3639 <term>
3640 <literal>TypeCABS</literal>
3641 </term>
3642
3643 <listitem>
3644 <para>
3645 Do not show the <emphasis role="bold">Insert
3646 Ctrl-Alt-Backspace</emphasis> menu item in this menu.
3647 </para>
3648 </listitem>
3649 </varlistentry>
3650
3651 <varlistentry>
3652 <term>
3653 <literal>TypeCtrlBreak</literal>
3654 </term>
3655
3656 <listitem>
3657 <para>
3658 Do not show the <emphasis role="bold">Insert
3659 Ctrl-Break</emphasis> menu item in this menu.
3660 </para>
3661 </listitem>
3662 </varlistentry>
3663
3664 <varlistentry>
3665 <term>
3666 <literal>TypeInsert</literal>
3667 </term>
3668
3669 <listitem>
3670 <para>
3671 Do not show the <emphasis role="bold">Insert
3672 Insert</emphasis> menu item in this menu.
3673 </para>
3674 </listitem>
3675 </varlistentry>
3676
3677 <varlistentry>
3678 <term>
3679 <literal>TypePrintScreen</literal>
3680 </term>
3681
3682 <listitem>
3683 <para>
3684 Do not show the <emphasis role="bold">Insert Print
3685 Screen</emphasis> menu item in this menu.
3686 </para>
3687 </listitem>
3688 </varlistentry>
3689
3690 <varlistentry>
3691 <term>
3692 <literal>TypeAltPrintScreen</literal>
3693 </term>
3694
3695 <listitem>
3696 <para>
3697 Do not show the <emphasis role="bold">Insert Alt Print
3698 Screen</emphasis> menu item in this menu.
3699 </para>
3700 </listitem>
3701 </varlistentry>
3702
3703 <varlistentry>
3704 <term>
3705 <literal>TypeHostKeyCombo</literal>
3706 </term>
3707
3708 <listitem>
3709 <para>
3710 Do not show the <emphasis role="bold">Insert Host Key
3711 Combo</emphasis> menu item in this menu.
3712 </para>
3713 </listitem>
3714 </varlistentry>
3715
3716 <varlistentry>
3717 <term>
3718 <literal>MouseIntegration</literal>
3719 </term>
3720
3721 <listitem>
3722 <para>
3723 Do not show the
3724 <emphasis role="bold">MouseIntegration</emphasis> menu
3725 item in this menu.
3726 </para>
3727 </listitem>
3728 </varlistentry>
3729
3730 </variablelist>
3731
3732 <para>
3733 This is a per-VM or global setting. Any combination of the above
3734 is allowed. To restore the default behavior, use
3735 </para>
3736
3737<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeInputMenuActions</screen>
3738
3739 <para>
3740 Use the following command to disable certain actions of the
3741 <emphasis role="bold">Devices</emphasis> menu:
3742 </para>
3743
3744<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDevicesMenuActions OPTION[,OPTION...]</screen>
3745
3746 <para>
3747 where <literal>OPTION</literal> is one of the following keywords
3748 to disable actions in the
3749 <emphasis role="bold">Devices</emphasis> menu:
3750 </para>
3751
3752 <variablelist>
3753
3754 <varlistentry>
3755 <term>
3756 <literal>All</literal>
3757 </term>
3758
3759 <listitem>
3760 <para>
3761 Do not show any menu item in this menu.
3762 </para>
3763 </listitem>
3764 </varlistentry>
3765
3766 <varlistentry>
3767 <term>
3768 <literal>HardDrives</literal>
3769 </term>
3770
3771 <listitem>
3772 <para>
3773 Do not show the <emphasis role="bold">Hard
3774 Disks</emphasis> menu item in this menu.
3775 </para>
3776 </listitem>
3777 </varlistentry>
3778
3779 <varlistentry>
3780 <term>
3781 <literal>OpticalDevices</literal>
3782 </term>
3783
3784 <listitem>
3785 <para>
3786 Do not show the <emphasis role="bold">Optical
3787 Devices</emphasis> menu item in this menu.
3788 </para>
3789 </listitem>
3790 </varlistentry>
3791
3792 <varlistentry>
3793 <term>
3794 <literal>FloppyDevices</literal>
3795 </term>
3796
3797 <listitem>
3798 <para>
3799 Do not show the <emphasis role="bold">Floppy
3800 Drives</emphasis> menu item in this menu.
3801 </para>
3802 </listitem>
3803 </varlistentry>
3804
3805 <varlistentry>
3806 <term>
3807 <literal>Audio</literal>
3808 </term>
3809
3810 <listitem>
3811 <para>
3812 Do not show the <emphasis role="bold">Audio</emphasis>
3813 menu item in this menu.
3814 </para>
3815 </listitem>
3816 </varlistentry>
3817
3818 <varlistentry>
3819 <term>
3820 <literal>Network</literal>
3821 </term>
3822
3823 <listitem>
3824 <para>
3825 Do not show the <emphasis role="bold">Network</emphasis>
3826 menu item in this menu.
3827 </para>
3828 </listitem>
3829 </varlistentry>
3830
3831 <varlistentry>
3832 <term>
3833 <literal>NetworkSettings</literal>
3834 </term>
3835
3836 <listitem>
3837 <para>
3838 Do not show the <emphasis role="bold">Network
3839 Settings</emphasis> menu item in this menu.
3840 </para>
3841 </listitem>
3842 </varlistentry>
3843
3844 <varlistentry>
3845 <term>
3846 <literal>USBDevices</literal>
3847 </term>
3848
3849 <listitem>
3850 <para>
3851 Do not show the <emphasis role="bold">USB </emphasis> menu
3852 item in this menu.
3853 </para>
3854 </listitem>
3855 </varlistentry>
3856
3857 <varlistentry>
3858 <term>
3859 <literal>WebCams</literal>
3860 </term>
3861
3862 <listitem>
3863 <para>
3864 Do not show the <emphasis role="bold">WebCams </emphasis>
3865 menu item in this menu.
3866 </para>
3867 </listitem>
3868 </varlistentry>
3869
3870 <varlistentry>
3871 <term>
3872 <literal>SharedFolders</literal>
3873 </term>
3874
3875 <listitem>
3876 <para>
3877 Do not show the <emphasis role="bold">Shared
3878 Folders</emphasis> menu item in this menu.
3879 </para>
3880 </listitem>
3881 </varlistentry>
3882
3883 <varlistentry>
3884 <term>
3885 <literal>SharedFoldersSettings</literal>
3886 </term>
3887
3888 <listitem>
3889 <para>
3890 Do not show the <emphasis role="bold">Shared Folders
3891 Settings...</emphasis> menu item in this menu.
3892 </para>
3893 </listitem>
3894 </varlistentry>
3895
3896 <varlistentry>
3897 <term>
3898 <literal>SharedClipboard</literal>
3899 </term>
3900
3901 <listitem>
3902 <para>
3903 Do not show the <emphasis role="bold">Shared
3904 Clipboard</emphasis> menu item in this menu.
3905 </para>
3906 </listitem>
3907 </varlistentry>
3908
3909 <varlistentry>
3910 <term>
3911 <literal>DragAndDrop</literal>
3912 </term>
3913
3914 <listitem>
3915 <para>
3916 Do not show the <emphasis role="bold">Drag and
3917 Drop</emphasis> menu item in this menu.
3918 </para>
3919 </listitem>
3920 </varlistentry>
3921
3922 <varlistentry>
3923 <term>
3924 <literal>InstallGuestTools</literal>
3925 </term>
3926
3927 <listitem>
3928 <para>
3929 Do not show the <emphasis role="bold">Insert Guest
3930 Additions CD image...</emphasis> menu item in this menu.
3931 </para>
3932 </listitem>
3933 </varlistentry>
3934
3935 </variablelist>
3936
3937 <para>
3938 This is a per-VM or global or global setting. Any combination of
3939 the above is allowed. To restore the default behavior, use
3940 </para>
3941
3942<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDevicesMenuActions</screen>
3943
3944 <para>
3945 Use the following command to disable certain actions of the
3946 <emphasis role="bold">Debug</emphasis> menu:
3947 </para>
3948
3949<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDebuggerMenuActions OPTION[,OPTION...]</screen>
3950
3951 <para>
3952 where <literal>OPTION</literal> is one of the following keywords
3953 to disable actions in the <emphasis>Debug</emphasis> menu, which
3954 is normally completely disabled:
3955 </para>
3956
3957 <variablelist>
3958
3959 <varlistentry>
3960 <term>
3961 <literal>All</literal>
3962 </term>
3963
3964 <listitem>
3965 <para>
3966 Do not show any menu item in this menu.
3967 </para>
3968 </listitem>
3969 </varlistentry>
3970
3971 <varlistentry>
3972 <term>
3973 <literal>Statistics</literal>
3974 </term>
3975
3976 <listitem>
3977 <para>
3978 Do not show the
3979 <emphasis role="bold">Statistics...</emphasis> menu item
3980 in this menu.
3981 </para>
3982 </listitem>
3983 </varlistentry>
3984
3985 <varlistentry>
3986 <term>
3987 <literal>CommandLine</literal>
3988 </term>
3989
3990 <listitem>
3991 <para>
3992 Do not show the <emphasis role="bold">Command
3993 Line...</emphasis> menu item in this menu.
3994 </para>
3995 </listitem>
3996 </varlistentry>
3997
3998 <varlistentry>
3999 <term>
4000 <literal>Logging</literal>
4001 </term>
4002
4003 <listitem>
4004 <para>
4005 Do not show the
4006 <emphasis role="bold">Logging...</emphasis> menu item in
4007 this menu.
4008 </para>
4009 </listitem>
4010 </varlistentry>
4011
4012 <varlistentry>
4013 <term>
4014 <literal>LogDialog</literal>
4015 </term>
4016
4017 <listitem>
4018 <para>
4019 Do not show the <emphasis role="bold">Show
4020 Log...</emphasis> menu item in this menu.
4021 </para>
4022 </listitem>
4023 </varlistentry>
4024
4025 <varlistentry>
4026 <term>
4027 <literal>GuestControlConsole</literal>
4028 </term>
4029
4030 <listitem>
4031 <para>
4032 Do not show the <emphasis role="bold">Guest Control
4033 Terminal...</emphasis> menu item in this menu.
4034 </para>
4035 </listitem>
4036 </varlistentry>
4037
4038 </variablelist>
4039
4040 <para>
4041 This is a per-VM or global setting. Any combination of the above
4042 is allowed. To restore the default behavior, use
4043 </para>
4044
4045<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeDebuggerMenuActions</screen>
4046
4047 <para>
4048 Use the following command to disable certain actions of the
4049 <emphasis role="bold">View</emphasis> menu:
4050 </para>
4051
4052<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeHelpMenuActions OPTION[,OPTION...]</screen>
4053
4054 <para>
4055 where <literal>OPTION</literal> is one of the following keywords
4056 to disable actions in the <emphasis role="bold">Help</emphasis>
4057 menu, which is normally completely disabled:
4058 </para>
4059
4060 <variablelist>
4061
4062 <varlistentry>
4063 <term>
4064 <literal>All</literal>
4065 </term>
4066
4067 <listitem>
4068 <para>
4069 Do not show any menu item in this menu.
4070 </para>
4071 </listitem>
4072 </varlistentry>
4073
4074 <varlistentry>
4075 <term>
4076 <literal>Contents</literal>
4077 </term>
4078
4079 <listitem>
4080 <para>
4081 Do not show the
4082 <emphasis role="bold">Contents...</emphasis> menu item in
4083 this menu.
4084 </para>
4085 </listitem>
4086 </varlistentry>
4087
4088 <varlistentry>
4089 <term>
4090 <literal>WebSite</literal>
4091 </term>
4092
4093 <listitem>
4094 <para>
4095 Do not show the <emphasis role="bold">VirtualBox Web
4096 Site...</emphasis> menu item in this menu.
4097 </para>
4098 </listitem>
4099 </varlistentry>
4100
4101 <varlistentry>
4102 <term>
4103 <literal>BugTracker</literal>
4104 </term>
4105
4106 <listitem>
4107 <para>
4108 Do not show the <emphasis role="bold">VirtualBox Bug
4109 Tracker...</emphasis> menu item in this menu.
4110 </para>
4111 </listitem>
4112 </varlistentry>
4113
4114 <varlistentry>
4115 <term>
4116 <literal>Forums</literal>
4117 </term>
4118
4119 <listitem>
4120 <para>
4121 Do not show the <emphasis role="bold">VirtualBox
4122 Forums...</emphasis> menu item in this menu.
4123 </para>
4124 </listitem>
4125 </varlistentry>
4126
4127 <varlistentry>
4128 <term>
4129 <literal>Oracle</literal>
4130 </term>
4131
4132 <listitem>
4133 <para>
4134 Do not show the <emphasis role="bold">Oracle Web
4135 Site...</emphasis> menu item in this menu.
4136 </para>
4137 </listitem>
4138 </varlistentry>
4139
4140 <varlistentry>
4141 <term>
4142 <literal>About</literal>
4143 </term>
4144
4145 <listitem>
4146 <para>
4147 Do not show the <emphasis role="bold">About
4148 VirtualBox...</emphasis> menu item in this menu. Only for
4149 non-Mac OS X hosts.
4150 </para>
4151 </listitem>
4152 </varlistentry>
4153
4154 </variablelist>
4155
4156 <para>
4157 This is a per-VM or global setting. Any combination of the above
4158 is allowed. To restore the default behavior, use
4159 </para>
4160
4161<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedRuntimeHelpMenuActions</screen>
4162
4163 </sect2>
4164
4165 <sect2 id="config-vm-window-status-bar">
4166
4167 <title>Configure VM Window Status Bar Entries</title>
4168
4169 <para>
4170 You can disable, or blacklist, certain status bar items:
4171 </para>
4172
4173<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedStatusBarIndicators OPTION[,OPTION...]</screen>
4174
4175 <para>
4176 where <literal>OPTION</literal> is one of the following
4177 keywords:
4178 </para>
4179
4180 <variablelist>
4181
4182 <varlistentry>
4183 <term>
4184 <literal>HardDisks</literal>
4185 </term>
4186
4187 <listitem>
4188 <para>
4189 Do not show the hard disk icon in the VM window status
4190 bar. By default the hard disk icon is only shown if the VM
4191 configuration contains one or more hard disks.
4192 </para>
4193 </listitem>
4194 </varlistentry>
4195
4196 <varlistentry>
4197 <term>
4198 <literal>OpticalDisks</literal>
4199 </term>
4200
4201 <listitem>
4202 <para>
4203 Do not show the CD icon in the VM window status bar. By
4204 default the CD icon is only shown if the VM configuration
4205 contains one or more CD drives.
4206 </para>
4207 </listitem>
4208 </varlistentry>
4209
4210 <varlistentry>
4211 <term>
4212 <literal>FloppyDisks</literal>
4213 </term>
4214
4215 <listitem>
4216 <para>
4217 Do not show the floppy icon in the VM window status bar.
4218 By default the floppy icon is only shown if the VM
4219 configuration contains one or more floppy drives.
4220 </para>
4221 </listitem>
4222 </varlistentry>
4223
4224 <varlistentry>
4225 <term>
4226 <literal>Network</literal>
4227 </term>
4228
4229 <listitem>
4230 <para>
4231 Do not show the network icon in the VM window status bar.
4232 By default the network icon is only shown if the VM
4233 configuration contains one or more active network
4234 adapters.
4235 </para>
4236 </listitem>
4237 </varlistentry>
4238
4239 <varlistentry>
4240 <term>
4241 <literal>USB</literal>
4242 </term>
4243
4244 <listitem>
4245 <para>
4246 Do not show the USB icon in the status bar.
4247 </para>
4248 </listitem>
4249 </varlistentry>
4250
4251 <varlistentry>
4252 <term>
4253 <literal>SharedFolders</literal>
4254 </term>
4255
4256 <listitem>
4257 <para>
4258 Do not show the shared folders icon in the status bar.
4259 </para>
4260 </listitem>
4261 </varlistentry>
4262
4263 <varlistentry>
4264 <term>
4265 <literal>Capture</literal>
4266 </term>
4267
4268 <listitem>
4269 <para>
4270 Do not show the capture icon in the status bar.
4271 </para>
4272 </listitem>
4273 </varlistentry>
4274
4275 <varlistentry>
4276 <term>
4277 <literal>Features</literal>
4278 </term>
4279
4280 <listitem>
4281 <para>
4282 Do not show the CPU features icon in the status bar.
4283 </para>
4284 </listitem>
4285 </varlistentry>
4286
4287 <varlistentry>
4288 <term>
4289 <literal>Mouse</literal>
4290 </term>
4291
4292 <listitem>
4293 <para>
4294 Do not show the mouse icon in the status bar.
4295 </para>
4296 </listitem>
4297 </varlistentry>
4298
4299 <varlistentry>
4300 <term>
4301 <literal>Keyboard</literal>
4302 </term>
4303
4304 <listitem>
4305 <para>
4306 Do not show the keyboard icon in the status bar.
4307 </para>
4308 </listitem>
4309 </varlistentry>
4310
4311 </variablelist>
4312
4313 <para>
4314 This is a per-VM or global setting. Any combination of the above
4315 is allowed. If all options are specified, no icons are displayed
4316 in the status bar of the VM window. To restore the default
4317 behavior, use
4318 </para>
4319
4320<screen>VBoxManage setextradata "VM name"|global GUI/RestrictedStatusBarIndicators</screen>
4321
4322 </sect2>
4323
4324 <sect2 id="config-vm-window-visual-modes">
4325
4326 <title>Configure VM Window Visual Modes</title>
4327
4328 <para>
4329 You can disable, or blacklist, certain VM visual modes:
4330 </para>
4331
4332<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/RestrictedVisualStates <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
4333
4334 <para>
4335 <replaceable>property</replaceable> is one of the following:
4336 </para>
4337
4338 <variablelist>
4339
4340 <varlistentry>
4341 <term>
4342 <literal>Fullscreen</literal>
4343 </term>
4344
4345 <listitem>
4346 <para>
4347 Do not allow to switch the VM into full screen mode.
4348 </para>
4349 </listitem>
4350 </varlistentry>
4351
4352 <varlistentry>
4353 <term>
4354 <literal>Seamless</literal>
4355 </term>
4356
4357 <listitem>
4358 <para>
4359 Do not allow to switch the VM into seamless mode.
4360 </para>
4361 </listitem>
4362 </varlistentry>
4363
4364 <varlistentry>
4365 <term>
4366 <literal>Scale</literal>
4367 </term>
4368
4369 <listitem>
4370 <para>
4371 Do not allow to switch the VM into scale mode.
4372 </para>
4373 </listitem>
4374 </varlistentry>
4375
4376 </variablelist>
4377
4378 <para>
4379 This is a per-VM setting. You can specify any combination of
4380 properties. To restore the default behavior, use the following
4381 command:
4382 </para>
4383
4384<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/RestrictedVisualStates</screen>
4385
4386 </sect2>
4387
4388 <sect2 id="host-key-customize">
4389
4390 <title>Host Key Customization</title>
4391
4392 <para>
4393 To disable all Host key combinations, open the preferences and
4394 change the Host key to None. This might be useful when using
4395 &product-name; in a kiosk mode.
4396 </para>
4397
4398 <para>
4399 To redefine or disable certain Host key actions, use the
4400 following command:
4401 </para>
4402
4403<screen>$ VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=F,...."</screen>
4404
4405 <para>
4406 The following table shows the possible Host key actions,
4407 together with their default Host key shortcut. Setting an action
4408 to None will disable that Host key action.
4409 </para>
4410
4411 <table id="table-host-key-customize" tabstyle="oracle-all">
4412 <title>Host Key Customization</title>
4413 <tgroup cols="3">
4414 <thead>
4415 <row>
4416 <entry><para>
4417 <emphasis role="bold">Action</emphasis>
4418 </para></entry>
4419 <entry><para>
4420 <emphasis role="bold">Default Key</emphasis>
4421 </para></entry>
4422 <entry><para>
4423 <emphasis role="bold">Action</emphasis>
4424 </para></entry>
4425 </row>
4426 </thead>
4427 <tbody>
4428 <row>
4429 <entry><para>
4430 <literal>TakeSnapshot</literal>
4431 </para></entry>
4432 <entry><para>
4433 T
4434 </para></entry>
4435 <entry><para>
4436 Take a snapshot
4437 </para></entry>
4438 </row>
4439 <row>
4440 <entry><para>
4441 <literal>TakeScreenshot</literal>
4442 </para></entry>
4443 <entry><para>
4444 E
4445 </para></entry>
4446 <entry><para>
4447 Take a screenshot
4448 </para></entry>
4449 </row>
4450 <row>
4451 <entry><para>
4452 <literal>MouseIntegration</literal>
4453 </para></entry>
4454 <entry><para>
4455 I
4456 </para></entry>
4457 <entry><para>
4458 Toggle mouse integration
4459 </para></entry>
4460 </row>
4461 <row>
4462 <entry><para>
4463 <literal>TypeCAD</literal>
4464 </para></entry>
4465 <entry><para>
4466 Del
4467 </para></entry>
4468 <entry><para>
4469 Inject Ctrl+Alt+Del
4470 </para></entry>
4471 </row>
4472 <row>
4473 <entry><para>
4474 <literal>TypeCABS</literal>
4475 </para></entry>
4476 <entry><para>
4477 Backspace
4478 </para></entry>
4479 <entry><para>
4480 Inject Ctrl+Alt+Backspace
4481 </para></entry>
4482 </row>
4483 <row>
4484 <entry><para>
4485 <literal>Pause</literal>
4486 </para></entry>
4487 <entry><para>
4488 P
4489 </para></entry>
4490 <entry><para>
4491 Pause the VM
4492 </para></entry>
4493 </row>
4494 <row>
4495 <entry><para>
4496 <literal>Reset</literal>
4497 </para></entry>
4498 <entry><para>
4499 R
4500 </para></entry>
4501 <entry>Hard reset the guest</entry>
4502 </row>
4503 <row>
4504 <entry><para>
4505 <literal>SaveState</literal>
4506 </para></entry>
4507 <entry><para></para></entry>
4508 <entry><para>
4509 Save the VM state and terminate the VM
4510 </para></entry>
4511 </row>
4512 <row>
4513 <entry><para>
4514 <literal>Shutdown</literal>
4515 </para></entry>
4516 <entry><para>
4517 H
4518 </para></entry>
4519 <entry><para>
4520 Press the virtual ACPI power button
4521 </para></entry>
4522 </row>
4523 <row>
4524 <entry><para>
4525 <literal>PowerOff</literal>
4526 </para></entry>
4527 <entry><para></para></entry>
4528 <entry><para>
4529 Power off the VM without saving the state
4530 </para></entry>
4531 </row>
4532 <row>
4533 <entry><para>
4534 <literal>Close</literal>
4535 </para></entry>
4536 <entry><para>
4537 Q
4538 </para></entry>
4539 <entry><para>
4540 Show the Close VM dialog
4541 </para></entry>
4542 </row>
4543 <row>
4544 <entry><para>
4545 <literal>FullscreenMode</literal>
4546 </para></entry>
4547 <entry><para>
4548 F
4549 </para></entry>
4550 <entry><para>
4551 Switch the VM into full screen mode
4552 </para></entry>
4553 </row>
4554 <row>
4555 <entry><para>
4556 <literal>SeamlessMode</literal>
4557 </para></entry>
4558 <entry><para>
4559 L
4560 </para></entry>
4561 <entry><para>
4562 Switch the VM into seamless mode
4563 </para></entry>
4564 </row>
4565 <row>
4566 <entry><para>
4567 <literal>ScaleMode</literal>
4568 </para></entry>
4569 <entry><para>
4570 C
4571 </para></entry>
4572 <entry><para>
4573 Switch the VM into scaled mode
4574 </para></entry>
4575 </row>
4576 <row>
4577 <entry><para>
4578 <literal>GuestAutoResize</literal>
4579 </para></entry>
4580 <entry><para>
4581 G
4582 </para></entry>
4583 <entry><para>
4584 Automatically resize the guest window
4585 </para></entry>
4586 </row>
4587 <row>
4588 <entry><para>
4589 <literal>WindowAdjust</literal>
4590 </para></entry>
4591 <entry><para>
4592 A
4593 </para></entry>
4594 <entry><para>
4595 Immediately resize the guest window
4596 </para></entry>
4597 </row>
4598 <row>
4599 <entry><para>
4600 <literal>PopupMenu</literal>
4601 </para></entry>
4602 <entry><para>
4603 Home
4604 </para></entry>
4605 <entry><para>
4606 Show the popup menu in full screen mode and seamless
4607 mode
4608 </para></entry>
4609 </row>
4610 <row>
4611 <entry><para>
4612 <literal>SettingsDialog</literal>
4613 </para></entry>
4614 <entry><para>
4615 S
4616 </para></entry>
4617 <entry><para>
4618 Open the VM Settings dialog
4619 </para></entry>
4620 </row>
4621 <row>
4622 <entry><para>
4623 <literal>InformationDialog</literal>
4624 </para></entry>
4625 <entry><para>
4626 N
4627 </para></entry>
4628 <entry><para>
4629 Show the VM Session Information window
4630 </para></entry>
4631 </row>
4632 <row>
4633 <entry><para>
4634 <literal>NetworkAdaptersDialog</literal>
4635 </para></entry>
4636 <entry><para></para></entry>
4637 <entry><para>
4638 Show the VM Network Adapters dialog
4639 </para></entry>
4640 </row>
4641 <row>
4642 <entry><para>
4643 <literal>SharedFoldersDialog</literal>
4644 </para></entry>
4645 <entry><para></para></entry>
4646 <entry><para>
4647 Show the VM Shared Folders dialog
4648 </para></entry>
4649 </row>
4650 <row>
4651 <entry><para>
4652 <literal>InstallGuestAdditions</literal>
4653 </para></entry>
4654 <entry><para>
4655 D
4656 </para></entry>
4657 <entry><para>
4658 Mount the ISO containing the Guest Additions
4659 </para></entry>
4660 </row>
4661 </tbody>
4662 </tgroup>
4663 </table>
4664
4665 <para>
4666 To disable full screen mode and seamless mode, use the following
4667 command:
4668 </para>
4669
4670<screen>$ VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
4671
4672 </sect2>
4673
4674 <sect2 id="terminate-vm-action">
4675
4676 <title>Action when Terminating the VM</title>
4677
4678 <para>
4679 You can disallow, or blacklist, certain actions when terminating
4680 a VM. To disallow specific actions, use the following command:
4681 </para>
4682
4683<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/RestrictedCloseActions <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
4684
4685 <para>
4686 <replaceable>property</replaceable> is one of the following:
4687 </para>
4688
4689 <variablelist>
4690
4691 <varlistentry>
4692 <term>
4693 <literal>SaveState</literal>
4694 </term>
4695
4696 <listitem>
4697 <para>
4698 Do not allow the user to save the VM state when
4699 terminating the VM.
4700 </para>
4701 </listitem>
4702 </varlistentry>
4703
4704 <varlistentry>
4705 <term>
4706 <literal>Shutdown</literal>
4707 </term>
4708
4709 <listitem>
4710 <para>
4711 Do not allow the user to shutdown the VM by sending the
4712 ACPI power-off event to the guest.
4713 </para>
4714 </listitem>
4715 </varlistentry>
4716
4717 <varlistentry>
4718 <term>
4719 <literal>PowerOff</literal>
4720 </term>
4721
4722 <listitem>
4723 <para>
4724 Do not allow the user to power off the VM.
4725 </para>
4726 </listitem>
4727 </varlistentry>
4728
4729 <varlistentry>
4730 <term>
4731 <literal>PowerOffRestoringSnapshot</literal>
4732 </term>
4733
4734 <listitem>
4735 <para>
4736 Do not allow the user to return to the last snapshot when
4737 powering off the VM.
4738 </para>
4739 </listitem>
4740 </varlistentry>
4741
4742 <varlistentry>
4743 <term>
4744 <literal>Detach</literal>
4745 </term>
4746
4747 <listitem>
4748 <para>
4749 Do not allow the user to detach from the VM process if the
4750 VM was started in separate mode.
4751 </para>
4752 </listitem>
4753 </varlistentry>
4754
4755 </variablelist>
4756
4757 <para>
4758 This is a per-VM setting. You can specify any combination of
4759 properties. If all properties are specified, the VM cannot be
4760 shut down.
4761 </para>
4762
4763 </sect2>
4764
4765 <sect2 id="terminate-vm-default-action">
4766
4767 <title>Default Action when Terminating the VM</title>
4768
4769 <para>
4770 You can define a specific action for terminating a VM. In
4771 contrast to the setting decribed in the previous section, this
4772 setting allows only one action when the user terminates the VM.
4773 No exit menu is shown. Use the following command:
4774 </para>
4775
4776<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/DefaultCloseAction <replaceable>action</replaceable></screen>
4777
4778 <para>
4779 <replaceable>action</replaceable> is one of the following:
4780 </para>
4781
4782 <variablelist>
4783
4784 <varlistentry>
4785 <term>
4786 <literal>SaveState</literal>
4787 </term>
4788
4789 <listitem>
4790 <para>
4791 Save the VM state before terminating the VM process.
4792 </para>
4793 </listitem>
4794 </varlistentry>
4795
4796 <varlistentry>
4797 <term>
4798 <literal>Shutdown</literal>
4799 </term>
4800
4801 <listitem>
4802 <para>
4803 The VM is shut down by sending the ACPI power-off event to
4804 the guest.
4805 </para>
4806 </listitem>
4807 </varlistentry>
4808
4809 <varlistentry>
4810 <term>
4811 <literal>PowerOff</literal>
4812 </term>
4813
4814 <listitem>
4815 <para>
4816 The VM is powered off.
4817 </para>
4818 </listitem>
4819 </varlistentry>
4820
4821 <varlistentry>
4822 <term>
4823 <literal>PowerOffRestoringSnapshot</literal>
4824 </term>
4825
4826 <listitem>
4827 <para>
4828 The VM is powered off and the saved state returns to the
4829 last snapshot.
4830 </para>
4831 </listitem>
4832 </varlistentry>
4833
4834 <varlistentry>
4835 <term>
4836 <literal>Detach</literal>
4837 </term>
4838
4839 <listitem>
4840 <para>
4841 Terminate the frontend but leave the VM process running.
4842 </para>
4843 </listitem>
4844 </varlistentry>
4845
4846 </variablelist>
4847
4848 <para>
4849 This is a per-VM setting. You can specify any combination of
4850 properties. If all properties are specified, the VM cannot be
4851 shut down.
4852 </para>
4853
4854 </sect2>
4855
4856 <sect2 id="guru-meditation-action">
4857
4858 <title>Action for Handling a Guru Meditation</title>
4859
4860 <para>
4861 A VM runs into a Guru Meditation if there is a problem which
4862 cannot be fixed by other means than terminating the process. The
4863 default is to show a message window which instructs the user to
4864 open a bug report.
4865 </para>
4866
4867 <para>
4868 This behavior can be configured as follows:
4869 </para>
4870
4871<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/GuruMeditationHandler <replaceable>mode</replaceable></screen>
4872
4873 <para>
4874 <replaceable>mode</replaceable> is one of the following:
4875 </para>
4876
4877 <variablelist>
4878
4879 <varlistentry>
4880 <term>
4881 <literal>Default</literal>
4882 </term>
4883
4884 <listitem>
4885 <para>
4886 A message window is shown. After the user confirmed, the
4887 VM is terminated.
4888 </para>
4889 </listitem>
4890 </varlistentry>
4891
4892 <varlistentry>
4893 <term>
4894 <literal>PowerOff</literal>
4895 </term>
4896
4897 <listitem>
4898 <para>
4899 The VM is immediately powered-off without showing any
4900 message window. The VM logfile will show information about
4901 what happened.
4902 </para>
4903 </listitem>
4904 </varlistentry>
4905
4906 <varlistentry>
4907 <term>
4908 <literal>Ignore</literal>
4909 </term>
4910
4911 <listitem>
4912 <para>
4913 The VM is left in stuck mode. Execution is stopped but no
4914 message window is shown. The VM has to be powered off
4915 manually.
4916 </para>
4917 </listitem>
4918 </varlistentry>
4919
4920 </variablelist>
4921
4922 <para>
4923 This is a per-VM setting.
4924 </para>
4925
4926 </sect2>
4927
4928 <sect2 id="mouse-capture">
4929
4930 <title>Configuring Automatic Mouse Capturing</title>
4931
4932 <para>
4933 By default, the mouse is captured if the user clicks on the
4934 guest window and the guest expects relative mouse coordinates at
4935 this time. This happens if the pointing device is configured as
4936 PS/2 mouse and the guest has not yet started the &product-name;
4937 Guest Additions. For instance, the guest is booting or the Guest
4938 Additions are not installed, or if the pointing device is
4939 configured as a USB tablet but the guest has no USB driver
4940 loaded yet. Once the Guest Additions become active or the USB
4941 guest driver is started, the mouse capture is automatically
4942 released.
4943 </para>
4944
4945 <para>
4946 The default behavior is sometimes not desired. Therefore it can
4947 be configured as follows:
4948 </para>
4949
4950<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/MouseCapturePolicy <replaceable>mode</replaceable></screen>
4951
4952 <para>
4953 <replaceable>mode</replaceable> is one of the following:
4954 </para>
4955
4956 <variablelist>
4957
4958 <varlistentry>
4959 <term>
4960 <literal>Default</literal>
4961 </term>
4962
4963 <listitem>
4964 <para>
4965 The default behavior as described above.
4966 </para>
4967 </listitem>
4968 </varlistentry>
4969
4970 <varlistentry>
4971 <term>
4972 <literal>HostComboOnly</literal>
4973 </term>
4974
4975 <listitem>
4976 <para>
4977 The mouse is only captured if the Host Key is toggled.
4978 </para>
4979 </listitem>
4980 </varlistentry>
4981
4982 <varlistentry>
4983 <term>
4984 <literal>Disabled</literal>
4985 </term>
4986
4987 <listitem>
4988 <para>
4989 The mouse is never captured, also not by toggling the Host
4990 Key
4991 </para>
4992 </listitem>
4993 </varlistentry>
4994
4995 </variablelist>
4996
4997 <para>
4998 This is a per-VM setting.
4999 </para>
5000
5001 </sect2>
5002
5003 <sect2 id="legacy-fullscreen-mode">
5004
5005 <title>Requesting Legacy Full-Screen Mode</title>
5006
5007 <para>
5008 &product-name; uses special window manager facilities to switch
5009 a multi-screen machine to full-screen on a multi-monitor host
5010 system. However, not all window managers provide these
5011 facilities correctly. &product-name; can be configured to use a
5012 legacy method of switching to full-screen mode instead, by using
5013 the command:
5014 </para>
5015
5016<screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode true</screen>
5017
5018 <para>
5019 You can go back to the default method by using the following
5020 command:
5021 </para>
5022
5023<screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode</screen>
5024
5025 <para>
5026 This is a global setting.
5027 </para>
5028
5029 </sect2>
5030
5031 <sect2 id="restrict-network-attachments">
5032
5033 <title>Removing Certain Modes of Networking From the GUI</title>
5034
5035 <para>
5036 It is possible to remove networking modes from &product-name;
5037 GUI. To do this, use the following command:
5038 </para>
5039
5040<screen>VBoxManage setextradata global GUI/RestrictedNetworkAttachmentTypes <replaceable>property</replaceable>[,<replaceable>property</replaceable>...]</screen>
5041
5042 <para>
5043 <replaceable>property</replaceable> is one of the following:
5044 </para>
5045
5046 <variablelist>
5047
5048 <varlistentry>
5049 <term>
5050 <literal>NAT</literal>
5051 </term>
5052
5053 <listitem>
5054 <para>
5055 Remove the <emphasis role="bold">NAT</emphasis> option
5056 from the GUI.
5057 </para>
5058 </listitem>
5059 </varlistentry>
5060
5061 <varlistentry>
5062 <term>
5063 <literal>NATNetwork</literal>
5064 </term>
5065
5066 <listitem>
5067 <para>
5068 Remove the <emphasis role="bold">NAT network</emphasis>
5069 option from the GUI.
5070 </para>
5071 </listitem>
5072 </varlistentry>
5073
5074 <varlistentry>
5075 <term>
5076 <literal>BridgedAdapter</literal>
5077 </term>
5078
5079 <listitem>
5080 <para>
5081 Remove the <emphasis role="bold">Bridged
5082 networking</emphasis> option from the GUI.
5083 </para>
5084 </listitem>
5085 </varlistentry>
5086
5087 <varlistentry>
5088 <term>
5089 <literal>InternalNetwork</literal>
5090 </term>
5091
5092 <listitem>
5093 <para>
5094 Remove the <emphasis role="bold">Internal
5095 networking</emphasis> option from the GUI.
5096 </para>
5097 </listitem>
5098 </varlistentry>
5099
5100 <varlistentry>
5101 <term>
5102 <literal>HostOnlyAdapter</literal>
5103 </term>
5104
5105 <listitem>
5106 <para>
5107 Remove the <emphasis role="bold">Host Only
5108 networking</emphasis> option from the GUI.
5109 </para>
5110 </listitem>
5111 </varlistentry>
5112
5113 <varlistentry>
5114 <term>
5115 <literal>GenericDriver</literal>
5116 </term>
5117
5118 <listitem>
5119 <para>
5120 Remove the <emphasis role="bold">Generic
5121 networking</emphasis> option from the GUI.
5122 </para>
5123 </listitem>
5124 </varlistentry>
5125
5126 </variablelist>
5127
5128 <para>
5129 This is a global setting. You can specify any combination of
5130 properties. To restore the default behavior, use the following
5131 command:
5132 </para>
5133
5134<screen>VBoxManage setextradata global GUI/RestrictedNetworkAttachmentTypes</screen>
5135
5136 </sect2>
5137
5138 </sect1>
5139
5140 <sect1 id="vboxwebsrv-daemon">
5141
5142 <title>Starting the &product-name; Web Service Automatically</title>
5143
5144 <para>
5145 The &product-name; web service, <command>vboxwebsrv</command>, is
5146 used for controlling &product-name; remotely. It is documented in
5147 detail in the &product-name; Software Development Kit (SDK). See
5148 <xref linkend="VirtualBoxAPI" />. Web service start scripts are
5149 available for supported host operating systems. The following
5150 sections describe how to use the scripts. The &product-name; web
5151 service is never started automatically as a result of a standard
5152 installation.
5153 </para>
5154
5155 <sect2 id="vboxwebsrv-linux">
5156
5157 <title>Linux: Starting the Web Service With init</title>
5158
5159 <para>
5160 On Linux, the web service can be automatically started during
5161 host boot by adding appropriate parameters to the file
5162 <filename>/etc/default/virtualbox</filename>. There is one
5163 mandatory parameter, <literal>VBOXWEB_USER</literal>, which must
5164 be set to the user which will later start the VMs. The
5165 parameters in the following table all start with the
5166 <literal>VBOXWEB_</literal> prefix string. For example:
5167 <literal>VBOXWEB_HOST</literal> and
5168 <literal>VBOXWEB_PORT</literal>.
5169 </para>
5170
5171 <table id="table-websrv-config-params" tabstyle="oracle-all">
5172 <title>Web Service Configuration Parameters</title>
5173 <tgroup cols="3">
5174 <thead>
5175 <row>
5176 <entry><para>
5177 <emphasis role="bold">Parameter</emphasis>
5178 </para></entry>
5179 <entry><para>
5180 <emphasis role="bold">Description</emphasis>
5181 </para></entry>
5182 <entry><para>
5183 <emphasis role="bold">Default</emphasis>
5184 </para></entry>
5185 </row>
5186 </thead>
5187 <tbody>
5188 <row>
5189 <entry><para>
5190 <literal>USER</literal>
5191 </para></entry>
5192 <entry><para>
5193 The user which the web service runs as
5194 </para></entry>
5195 <entry><para></para></entry>
5196 </row>
5197 <row>
5198 <entry><para>
5199 <literal>HOST</literal>
5200 </para></entry>
5201 <entry><para>
5202 The host to bind the web service to
5203 </para></entry>
5204 <entry><para>
5205 localhost
5206 </para></entry>
5207 </row>
5208 <row>
5209 <entry><para>
5210 <literal>PORT</literal>
5211 </para></entry>
5212 <entry><para>
5213 The port to bind the web service to
5214 </para></entry>
5215 <entry><para>
5216 18083
5217 </para></entry>
5218 </row>
5219 <row>
5220 <entry><para>
5221 <literal>SSL_KEYFILE</literal>
5222 </para></entry>
5223 <entry><para>
5224 Server key and certificate file, in PEM format
5225 </para></entry>
5226 <entry><para></para></entry>
5227 </row>
5228 <row>
5229 <entry><para>
5230 <literal>SSL_PASSWORDFILE</literal>
5231 </para></entry>
5232 <entry><para>
5233 File name for password to server key
5234 </para></entry>
5235 <entry><para></para></entry>
5236 </row>
5237 <row>
5238 <entry><para>
5239 <literal>SSL_CACERT</literal>
5240 </para></entry>
5241 <entry><para>
5242 CA certificate file, in PEM format
5243 </para></entry>
5244 <entry><para></para></entry>
5245 </row>
5246 <row>
5247 <entry><para>
5248 <literal>SSL_CAPATH</literal>
5249 </para></entry>
5250 <entry><para>
5251 CA certificate path
5252 </para></entry>
5253 <entry><para></para></entry>
5254 </row>
5255 <row>
5256 <entry><para>
5257 <literal>SSL_DHFILE</literal>
5258 </para></entry>
5259 <entry><para>
5260 DH file name or DH key length in bits
5261 </para></entry>
5262 <entry><para></para></entry>
5263 </row>
5264 <row>
5265 <entry><para>
5266 <literal>SSL_RANDFILE</literal>
5267 </para></entry>
5268 <entry><para>
5269 File containing seed for random number generator
5270 </para></entry>
5271 <entry><para></para></entry>
5272 </row>
5273 <row>
5274 <entry><para>
5275 <literal>TIMEOUT</literal>
5276 </para></entry>
5277 <entry><para>
5278 Session timeout in seconds, 0 disables timeouts
5279 </para></entry>
5280 <entry><para>
5281 300
5282 </para></entry>
5283 </row>
5284 <row>
5285 <entry><para>
5286 <literal>CHECK_INTERVAL</literal>
5287 </para></entry>
5288 <entry><para>
5289 Frequency of timeout checks in seconds
5290 </para></entry>
5291 <entry><para>
5292 5
5293 </para></entry>
5294 </row>
5295 <row>
5296 <entry><para>
5297 <literal>THREADS</literal>
5298 </para></entry>
5299 <entry><para>
5300 Maximum number of worker threads to run in parallel
5301 </para></entry>
5302 <entry><para>
5303 100
5304 </para></entry>
5305 </row>
5306 <row>
5307 <entry><para>
5308 <literal>KEEPALIVE</literal>
5309 </para></entry>
5310 <entry><para>
5311 Maximum number of requests before a socket will be
5312 closed
5313 </para></entry>
5314 <entry><para>
5315 100
5316 </para></entry>
5317 </row>
5318 <row>
5319 <entry><para>
5320 <literal>ROTATE</literal>
5321 </para></entry>
5322 <entry><para>
5323 Number of log files, 0 disables log rotation
5324 </para></entry>
5325 <entry><para>
5326 10
5327 </para></entry>
5328 </row>
5329 <row>
5330 <entry><para>
5331 <literal>LOGSIZE</literal>
5332 </para></entry>
5333 <entry><para>
5334 Maximum log file size to trigger rotation, in bytes
5335 </para></entry>
5336 <entry><para>
5337 1MB
5338 </para></entry>
5339 </row>
5340 <row>
5341 <entry><para>
5342 <literal>LOGINTERVAL</literal>
5343 </para></entry>
5344 <entry><para>
5345 Maximum time interval to trigger log rotation, in
5346 seconds
5347 </para></entry>
5348 <entry><para>
5349 1 day
5350 </para></entry>
5351 </row>
5352 </tbody>
5353 </tgroup>
5354 </table>
5355
5356 <para>
5357 Setting the parameter <literal>SSL_KEYFILE</literal> enables the
5358 SSL/TLS support. Using encryption is strongly encouraged, as
5359 otherwise everything, including passwords, is transferred in
5360 clear text.
5361 </para>
5362
5363 </sect2>
5364
5365 <sect2 id="vboxwebsrv-solaris">
5366
5367 <title>Oracle Solaris: Starting the Web Service With SMF</title>
5368
5369 <para>
5370 On Oracle Solaris hosts, the &product-name; web service daemon
5371 is integrated into the SMF framework. You can change the
5372 parameters, but do not have to if the defaults below already
5373 match your needs:
5374 </para>
5375
5376<screen>svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
5377svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
5378svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root</screen>
5379
5380 <para>
5381 The table in <xref linkend="vboxwebsrv-linux"/> showing the
5382 parameter names and defaults also applies for Oracle Solaris.
5383 The parameter names must be changed to lowercase and a prefix of
5384 <literal>config/</literal> has to be added. For example:
5385 <literal>config/user</literal> or
5386 <literal>config/ssl_keyfile</literal>. If you make any change,
5387 do not forget to run the following command to put the changes
5388 into effect immediately:
5389 </para>
5390
5391<screen>svcadm refresh svc:/application/virtualbox/webservice:default</screen>
5392
5393 <para>
5394 If you forget the above command then the previous settings are
5395 used when enabling the service. Check the current property
5396 settings as follows:
5397 </para>
5398
5399<screen>svcprop -p config svc:/application/virtualbox/webservice:default</screen>
5400
5401 <para>
5402 When everything is configured correctly you can start the
5403 &product-name; web service with the following command:
5404 </para>
5405
5406<screen>svcadm enable svc:/application/virtualbox/webservice:default</screen>
5407
5408 <para>
5409 For more information about SMF, please refer to the Oracle
5410 Solaris documentation.
5411 </para>
5412
5413 </sect2>
5414
5415 <sect2 id="vboxwebsrv-osx">
5416
5417 <title>Mac OS X: Starting the Web Service With launchd</title>
5418
5419 <para>
5420 On Mac OS X, launchd is used to start the &product-name;
5421 webservice. An example configuration file can be found in
5422 <filename>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</filename>.
5423 It can be enabled by changing the <literal>Disabled</literal>
5424 key from <literal>true</literal> to <literal>false</literal>. To
5425 manually start the service use the following command:
5426 </para>
5427
5428<screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
5429
5430 <para>
5431 For additional information on how launchd services could be
5432 configured see:
5433 </para>
5434
5435 <para>
5436 <ulink
5437 url="https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" />.
5438 </para>
5439
5440 </sect2>
5441
5442 </sect1>
5443
5444 <sect1 id="vboxwatchdog">
5445
5446 <title>&product-name; Watchdog</title>
5447
5448 <para>
5449 The memory ballooning service, formerly known as
5450 <command>VBoxBalloonCtrl</command>, was renamed to VBoxWatchdog.
5451 This service now incorporates the following host services that are
5452 meant to be run in a server environment:
5453 </para>
5454
5455 <itemizedlist>
5456
5457 <listitem>
5458 <para>
5459 <emphasis role="bold">Memory ballooning control.</emphasis>
5460 This service automatically takes care of a VM's configured
5461 memory balloon. See <xref linkend="guestadd-balloon" />. This
5462 service is useful for server environments where VMs may
5463 dynamically require more or less memory during runtime.
5464 </para>
5465
5466 <para>
5467 The service periodically checks a VM's current memory balloon
5468 and its free guest RAM and automatically adjusts the current
5469 memory balloon by inflating or deflating it accordingly. This
5470 handling only applies to running VMs having recent Guest
5471 Additions installed.
5472 </para>
5473 </listitem>
5474
5475 <listitem>
5476 <para>
5477 <emphasis role="bold">Host isolation detection.</emphasis>
5478 This service provides a way to detect whether the host cannot
5479 reach the specific &product-name; server instance anymore and
5480 take appropriate actions, such as shutting down, saving the
5481 current state or even powering down certain VMs.
5482 </para>
5483 </listitem>
5484
5485 </itemizedlist>
5486
5487 <para>
5488 All configuration values can be either specified using the command
5489 line or global extradata, whereas command line values always have
5490 a higher priority when set. Some of the configuration values also
5491 be specified on a per-VM basis. So the overall lookup order is:
5492 command line, per-VM basis extradata if available, global
5493 extradata.
5494 </para>
5495
5496 <sect2 id="vboxwatchdog-ballonctrl">
5497
5498 <title>Memory Ballooning Control</title>
5499
5500 <para>
5501 The memory ballooning control inflates and deflates the memory
5502 balloon of VMs based on the VMs free memory and the desired
5503 maximum balloon size.
5504 </para>
5505
5506 <para>
5507 To set up the memory ballooning control the maximum ballooning
5508 size a VM can reach needs to be set. This can be specified using
5509 the command line, as follows:
5510 </para>
5511
5512<screen>--balloon-max &lt;Size in MB&gt;</screen>
5513
5514 <para>
5515 Using a per-VM basis extradata value, as follows:
5516 </para>
5517
5518<screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
5519
5520 <para>
5521 Using a global extradata value, as follows:
5522 </para>
5523
5524<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
5525
5526 <note>
5527 <para>
5528 If no maximum ballooning size is specified by at least one of
5529 the parameters above, no ballooning will be performed at all.
5530 </para>
5531 </note>
5532
5533 <para>
5534 Setting the ballooning increment in MB can be either done using
5535 command line, as follows:
5536 </para>
5537
5538<screen>--balloon-inc &lt;Size in MB&gt;</screen>
5539
5540 <para>
5541 Using a global extradata value, as follows:
5542 </para>
5543
5544<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
5545
5546 <para>
5547 The default ballooning increment is 256 MB if not specified.
5548 </para>
5549
5550 <para>
5551 The same options apply for a ballooning decrement. Using the
5552 command line, as follows:
5553 </para>
5554
5555<screen>--balloon-dec &lt;Size in MB&gt;</screen>
5556
5557 <para>
5558 Using a global extradata value, as follows:
5559 </para>
5560
5561<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
5562
5563 <para>
5564 The default ballooning decrement is 128 MB if not specified.
5565 </para>
5566
5567 <para>
5568 The lower limit in MB for a balloon can be defined using the
5569 command line, as follows:
5570 </para>
5571
5572<screen>--balloon-lower-limit &lt;Size in MB&gt;</screen>
5573
5574 <para>
5575 Using a global extradata value, as follows:
5576 </para>
5577
5578<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
5579
5580 <para>
5581 The default lower limit is 128 MB if not specified.
5582 </para>
5583
5584 </sect2>
5585
5586 <sect2 id="vboxwatchdog-hostisln">
5587
5588 <title>Host Isolation Detection</title>
5589
5590 <para>
5591 To detect whether a host is being isolated, that is, the host
5592 cannot reach the &product-name; server instance anymore, the
5593 host needs to set an alternating value to a global extradata
5594 value within a time period. If this value is not set within that
5595 time period a timeout occurred and the so-called host isolation
5596 response will be performed to the VMs handled. Which VMs are
5597 handled can be controlled by defining VM groups and assigning
5598 VMs to those groups. By default no groups are set, meaning that
5599 all VMs on the server will be handled when no host response is
5600 received within 30 seconds.
5601 </para>
5602
5603 <para>
5604 Set the groups handled by the host isolation detection using the
5605 following command line:
5606 </para>
5607
5608<screen>--apimon-groups=&lt;string[,stringN]&gt;</screen>
5609
5610 <para>
5611 Using a global extradata value, as follows:
5612 </para>
5613
5614<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
5615
5616 <para>
5617 Set the host isolation timeout using the following command line:
5618 </para>
5619
5620<screen>--apimon-isln-timeout=&lt;ms&gt;</screen>
5621
5622 <para>
5623 Using a global extradata value, as follows:
5624 </para>
5625
5626<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
5627
5628 <para>
5629 Set the actual host isolation response using the following
5630 command line:
5631 </para>
5632
5633<screen>--apimon-isln-response=&lt;cmd&gt;</screen>
5634
5635 <para>
5636 Using a global extradata value, as follows:
5637 </para>
5638
5639<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
5640
5641 <para>
5642 The following response commands are available:
5643 </para>
5644
5645 <itemizedlist>
5646
5647 <listitem>
5648 <para>
5649 <literal>none</literal>. This has no effect.
5650 </para>
5651 </listitem>
5652
5653 <listitem>
5654 <para>
5655 <literal>pause</literal>. Pauses the execution of a VM.
5656 </para>
5657 </listitem>
5658
5659 <listitem>
5660 <para>
5661 <literal>poweroff</literal>. Shuts down the VM by pressing
5662 the virtual power button. The VM will not have the chance of
5663 saving any data or veto the shutdown process.
5664 </para>
5665 </listitem>
5666
5667 <listitem>
5668 <para>
5669 <literal>save</literal>. Saves the current machine state and
5670 powers off the VM afterwards. If saving the machine state
5671 fails the VM will be paused.
5672 </para>
5673 </listitem>
5674
5675 <listitem>
5676 <para>
5677 <literal>shutdown</literal>. Shuts down the VM in a gentle
5678 way by sending an <literal>ACPI</literal> shutdown event to
5679 the VM's operating system. The OS then has the chance of
5680 doing a clean shutdown.
5681 </para>
5682 </listitem>
5683
5684 </itemizedlist>
5685
5686 </sect2>
5687
5688 <sect2 id="vboxwatchdog-moreinfo">
5689
5690 <title>More Information</title>
5691
5692 <para>
5693 For more advanced options and parameters like verbose logging
5694 check the built-in command line help accessible with
5695 <option>--help</option>.
5696 </para>
5697
5698 </sect2>
5699
5700 <sect2 id="vboxwatchdog-linux">
5701
5702 <title>Linux: Starting the Watchdog Service With init</title>
5703
5704 <para>
5705 On Linux, the watchdog service can be automatically started
5706 during host boot by adding appropriate parameters to the file
5707 <filename>/etc/default/virtualbox</filename>. There is one
5708 mandatory parameter, <literal>VBOXWATCHDOG_USER</literal>, which
5709 must be set to the user which will later start the VMs. For
5710 backward compatibility you can also specify
5711 <literal>VBOXBALLOONCTRL_USER</literal>.
5712 </para>
5713
5714 <para>
5715 The parameters in the following table all start with the
5716 <literal>VBOXWATCHDOG_</literal> prefix string. For example:
5717 <literal>VBOXWATCHDOG_BALLOON_INTERVAL</literal> and
5718 <literal>VBOXWATCHDOG_LOGSIZE</literal>. Legacy parameters such
5719 as <literal>VBOXBALLOONCTRL_INTERVAL</literal> can still be
5720 used.
5721 </para>
5722
5723 <table id="table-vboxwatchdog-config-params" tabstyle="oracle-all">
5724 <title>&product-name; Watchdog Configuration Parameters</title>
5725 <tgroup cols="3">
5726 <thead>
5727 <row>
5728 <entry><para>
5729 <emphasis role="bold">Parameter</emphasis>
5730 </para></entry>
5731 <entry><para>
5732 <emphasis role="bold">Description</emphasis>
5733 </para></entry>
5734 <entry><para>
5735 <emphasis role="bold">Default</emphasis>
5736 </para></entry>
5737 </row>
5738 </thead>
5739 <tbody>
5740 <row>
5741 <entry><para>
5742 <literal>USER</literal>
5743 </para></entry>
5744 <entry><para>
5745 The user which the watchdog service runs as
5746 </para></entry>
5747 <entry><para></para></entry>
5748 </row>
5749 <row>
5750 <entry><para>
5751 <literal>ROTATE</literal>
5752 </para></entry>
5753 <entry><para>
5754 Number of log files, 0 disables log rotation
5755 </para></entry>
5756 <entry><para>
5757 10
5758 </para></entry>
5759 </row>
5760 <row>
5761 <entry><para>
5762 <literal>LOGSIZE</literal>
5763 </para></entry>
5764 <entry><para>
5765 Maximum log file size to trigger rotation, in bytes
5766 </para></entry>
5767 <entry><para>
5768 1MB
5769 </para></entry>
5770 </row>
5771 <row>
5772 <entry><para>
5773 <literal>LOGINTERVAL</literal>
5774 </para></entry>
5775 <entry><para>
5776 Maximum time interval to trigger log rotation, in
5777 seconds
5778 </para></entry>
5779 <entry><para>
5780 1 day
5781 </para></entry>
5782 </row>
5783 <row>
5784 <entry><para>
5785 <literal>BALLOON_INTERVAL</literal>
5786 </para></entry>
5787 <entry><para>
5788 Interval for checking the balloon size, in
5789 milliseconds
5790 </para></entry>
5791 <entry><para>
5792 30000
5793 </para></entry>
5794 </row>
5795 <row>
5796 <entry><para>
5797 <literal>BALLOON_INCREMENT</literal>
5798 </para></entry>
5799 <entry><para>
5800 Balloon size increment, in megabytes
5801 </para></entry>
5802 <entry><para>
5803 256
5804 </para></entry>
5805 </row>
5806 <row>
5807 <entry><para>
5808 <literal>BALLOON_DECREMENT</literal>
5809 </para></entry>
5810 <entry><para>
5811 Balloon size decrement, in megabytes
5812 </para></entry>
5813 <entry><para>
5814 128
5815 </para></entry>
5816 </row>
5817 <row>
5818 <entry><para>
5819 <literal>BALLOON_LOWERLIMIT</literal>
5820 </para></entry>
5821 <entry><para>
5822 Balloon size lower limit, in megabytes
5823 </para></entry>
5824 <entry><para>
5825 64
5826 </para></entry>
5827 </row>
5828 <row>
5829 <entry><para>
5830 <literal>BALLOON_SAFETYMARGIN</literal>
5831 </para></entry>
5832 <entry><para>
5833 Free memory required for decreasing the balloon size,
5834 in megabytes
5835 </para></entry>
5836 <entry><para>
5837 1024
5838 </para></entry>
5839 </row>
5840 </tbody>
5841 </tgroup>
5842 </table>
5843
5844 </sect2>
5845
5846 <sect2 id="vboxwatchdog-solaris">
5847
5848 <title>Oracle Solaris: Starting the Watchdog Service With SMF</title>
5849
5850 <para>
5851 On Oracle Solaris hosts, the &product-name; watchdog service
5852 daemon is integrated into the SMF framework. You can change the
5853 parameters, but do not have to if the defaults already match
5854 your needs:
5855 </para>
5856
5857<screen>svccfg -s svc:/application/virtualbox/balloonctrl:default setprop \
5858 config/balloon_interval=10000
5859svccfg -s svc:/application/virtualbox/balloonctrl:default setprop \
5860config/balloon_safetymargin=134217728</screen>
5861
5862 <para>
5863 <xref linkend="table-vboxwatchdog-config-params"/> also applies
5864 for Oracle Solaris. The parameter names must be changed to
5865 lowercase and a prefix of <literal>config/</literal> has to be
5866 added. For example: <literal>config/user</literal> or
5867 <literal>config/balloon_safetymargin</literal>. If you made any
5868 change, do not forget to run the following command to put the
5869 changes into effect immediately:
5870 </para>
5871
5872<screen>svcadm refresh svc:/application/virtualbox/balloonctrl:default</screen>
5873
5874 <para>
5875 If you forget the above command then the previous settings will
5876 be used when enabling the service. Check the current property
5877 settings with the following command:
5878 </para>
5879
5880<screen>svcprop -p config svc:/application/virtualbox/balloonctrl:default</screen>
5881
5882 <para>
5883 When everything is configured correctly you can start the
5884 &product-name; watchdog service with the following command:
5885 </para>
5886
5887<screen>svcadm enable svc:/application/virtualbox/balloonctrl:default</screen>
5888
5889 <para>
5890 For more information about SMF, please refer to the Oracle
5891 Solaris documentation.
5892 </para>
5893
5894 </sect2>
5895
5896 </sect1>
5897
5898 <sect1 id="otherextpacks">
5899
5900 <title>Other Extension Packs</title>
5901
5902 <para>
5903 Another extension pack called VNC is available. This extension
5904 pack is open source and replaces the previous integration of the
5905 VNC remote access protocol. This is experimental code, and is
5906 initially available in the &product-name; source code package
5907 only. It is to a large portion code contributed by users, and is
5908 not supported in any way by Oracle.
5909 </para>
5910
5911 <para>
5912 The keyboard handling is severely limited, and only the US
5913 keyboard layout works. Other keyboard layouts will have at least
5914 some keys which produce the wrong results, often with quite
5915 surprising effects, and for layouts which have significant
5916 differences to the US keyboard layout it is most likely unusable.
5917 </para>
5918
5919 <para>
5920 It is possible to install both the &product-name; Extension Pack
5921 and VNC, but only one VRDE module can be active at any time. The
5922 following command switches to the VNC VRDE module in VNC:
5923 </para>
5924
5925<screen>VBoxManage setproperty vrdeextpack VNC</screen>
5926
5927 <para>
5928 Configuring the remote access works very similarly to VRDP, see
5929 <xref linkend="vrde" />, with some limitations. VNC does not
5930 support specifying several port numbers, and the authentication is
5931 done differently. VNC can only deal with password authentication,
5932 and there is no option to use password hashes. This leaves no
5933 other choice than having a clear-text password in the VM
5934 configuration, which can be set with the following command:
5935 </para>
5936
5937<screen>VBoxManage modifyvm <replaceable>VM-name</replaceable> --vrdeproperty VNCPassword=secret</screen>
5938
5939 <para>
5940 The user is responsible for keeping this password secret, and it
5941 should be removed when a VM configuration is passed to another
5942 person, for whatever purpose. Some VNC servers claim to have
5943 encrypted passwords in the configuration. This is not true
5944 encryption, it is only concealing the passwords, which is only as
5945 secure as using clear-text passwords.
5946 </para>
5947
5948 <para>
5949 The following command switches back to VRDP, if installed:
5950 </para>
5951
5952<screen>VBoxManage setproperty vrdeextpack "&product-name; Extension Pack"</screen>
5953
5954 </sect1>
5955
5956 <sect1 id="autostart">
5957
5958 <title>Starting Virtual Machines During System Boot</title>
5959
5960 <para>
5961 You can start VMs automatically during system boot on Linux,
5962 Oracle Solaris, and Mac OS X platforms for all users.
5963 </para>
5964
5965 <sect2 id="autostart-linux">
5966
5967 <title>Linux: Starting the Autostart Service With init</title>
5968
5969 <para>
5970 On Linux, the autostart service is activated by setting two
5971 variables in <filename>/etc/default/virtualbox</filename>. The
5972 first one is <literal>VBOXAUTOSTART_DB</literal> which contains
5973 an absolute path to the autostart database directory. The
5974 directory should have write access for every user who should be
5975 able to start virtual machines automatically. Furthermore the
5976 directory should have the sticky bit set. The second variable is
5977 <literal>VBOXAUTOSTART_CONFIG</literal> which points the service
5978 to the autostart configuration file which is used during boot to
5979 determine whether to allow individual users to start a VM
5980 automatically and configure startup delays. The configuration
5981 file can be placed in <filename>/etc/vbox</filename> and
5982 contains several options. One is
5983 <literal>default_policy</literal> which controls whether the
5984 autostart service allows or denies to start a VM for users which
5985 are not in the exception list. The exception list starts with
5986 <literal>exception_list</literal> and contains a comma separated
5987 list with usernames. Furthermore a separate startup delay can be
5988 configured for every user to avoid overloading the host. A
5989 sample configuration is given below:
5990 </para>
5991
5992<screen>
5993# Default policy is to deny starting a VM, the other option is "allow".
5994default_policy = deny
5995
5996# Bob is allowed to start virtual machines but starting them
5997# will be delayed for 10 seconds
5998bob = {
5999 allow = true
6000 startup_delay = 10
6001}
6002
6003# Alice is not allowed to start virtual machines, useful to exclude certain users
6004# if the default policy is set to allow.
6005alice = {
6006 allow = false
6007}
6008</screen>
6009
6010 <para>
6011 Any user who wants to enable autostart for individual machines
6012 must set the path to the autostart database directory with the
6013 following command:
6014 </para>
6015
6016<screen>VBoxManage setproperty autostartdbpath <replaceable>autostart-directory</replaceable></screen>
6017
6018 </sect2>
6019
6020 <sect2 id="autostart-solaris">
6021
6022 <title>Oracle Solaris: Starting the Autostart Service With SMF</title>
6023
6024 <para>
6025 On Oracle Solaris hosts, the &product-name; autostart daemon is
6026 integrated into the SMF framework. To enable it you must point
6027 the service to an existing configuration file which has the same
6028 format as on Linux, see <xref linkend="autostart-linux" />. For
6029 example:
6030 </para>
6031
6032<screen># svccfg -s svc:/application/virtualbox/autostart:default setprop \
6033 config/config=/etc/vbox/autostart.cfg</screen>
6034
6035 <para>
6036 When everything is configured correctly you can start the
6037 &product-name; autostart service with the following command:
6038 </para>
6039
6040<screen># svcadm enable svc:/application/virtualbox/autostart:default</screen>
6041
6042 <para>
6043 For more information about SMF, see the Oracle Solaris
6044 documentation.
6045 </para>
6046
6047 </sect2>
6048
6049 <sect2 id="autostart-osx">
6050
6051 <title>Mac OS X: Starting the Autostart Service With launchd</title>
6052
6053 <para>
6054 On Mac OS X, launchd is used to start the &product-name;
6055 autostart service. An example configuration file can be found in
6056 <filename>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</filename>.
6057 To enable the service copy the file to
6058 <filename>/Library/LaunchDaemons</filename> and change the
6059 <literal>Disabled</literal> key from <literal>true</literal> to
6060 <literal>false</literal>. Furthermore replace the second
6061 parameter to an existing configuration file which has the same
6062 format as on Linux, see <xref linkend="autostart-linux" />.
6063 </para>
6064
6065 <para>
6066 To manually start the service use the following command:
6067 </para>
6068
6069<screen># launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
6070
6071 <para>
6072 For additional information on how launchd services can be
6073 configured see:
6074 </para>
6075
6076 <para>
6077 <ulink
6078 url="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html" />.
6079 </para>
6080
6081 </sect2>
6082
6083 <sect2 id="autostart-windows">
6084
6085 <title>Windows: Starting the Autostart Service</title>
6086
6087 <para>
6088 On Windows, autostart functionality consist of two components.
6089 First one is configuration file where the administrator can both
6090 set delayed start of the VMs and temporary disable autostarting
6091 for the particular user. The configuration file should be located
6092 in the folder accessible by all required users but it should have
6093 permissions allowing the only reading by everyone but
6094 administrators. The configuration file contains several options.
6095 One is <literal>default_policy</literal> which controls whether the
6096 autostart service allows or denies to start a VM for users which
6097 are not 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 be
6100 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".
6106default_policy = deny
6107
6108# Bob is allowed to start virtual machines but starting them
6109# will be delayed for 10 seconds
6110bob = {
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.
6117alice = {
6118 allow = false
6119}
6120</screen>
6121
6122 <para>
6123 The user name can be specified using the following forms: "user",
6124 "domain\user", ".\user" and "user@domain". Administrator must add
6125 the <literal>VBOXAUTOSTART_CONFIG</literal> environment variable into
6126 system variables containing the path to the configuration file
6127 described above. The environment variable tells the autostart services
6128 what configuration file is used.
6129 </para>
6130
6131 <para>
6132 Second component of autostart functionality is Windows service, every
6133 instance of it works on behalf of particular user using its own
6134 credentials.
6135 </para>
6136
6137 <para>
6138 To enable autostarting for a particular user, a member of the
6139 administrators group must run the following command:
6140 </para>
6141
6142 <screen>VBoxAutostartSvc install --user=<replaceable>user</replaceable> [--password-file=<replaceable>password_file</replaceable>]</screen>
6143
6144 <para>
6145 The password file should contain the password followed by a line
6146 break. The rest of the file is ignored. The user will be asked
6147 for a password if the password file is not specified.
6148 </para>
6149
6150 <para>
6151 To disable autostarting for particular user, a member of the
6152 administrators group must run the following command:
6153 </para>
6154
6155 <screen>VBoxAutostartSvc delete --user=<replaceable>user</replaceable></screen>
6156
6157 <para>
6158 If a user has changed their password then a member of the
6159 administrators group must either reinstall the service or change
6160 the service credentials using Windows Service Manager. Due to
6161 Windows security policies, the autostart service cannot be
6162 installed for users with empty passwords.
6163 </para>
6164
6165 <para>
6166 Finally, the particular user should define which VM should be
6167 started at boot or not. The user should run the following command
6168 for every VM it desired to start at boot:
6169 </para>
6170
6171 <screen>VBoxManage modifyvm <replaceable>VM name or UUID</replaceable> --autostart-enabled on</screen>
6172
6173 <para>
6174 The user can remove the particular VM from the VMs starting at boot
6175 by running the following command:
6176 </para>
6177
6178 <screen>VBoxManage modifyvm <replaceable>VM name or UUID</replaceable> --autostart-enabled off</screen>
6179
6180 </sect2>
6181
6182 </sect1>
6183
6184 <sect1 id="vboxexpertstoragemgmt">
6185
6186 <title>&product-name; Expert Storage Management</title>
6187
6188 <para>
6189 In case the snapshot model of &product-name; is not sufficient it
6190 is possible to enable a special mode which makes it possible to
6191 reconfigure storage attachments while the VM is paused. The user
6192 has to make sure that the disk data stays consistent to the guest
6193 because unlike with hotplugging the guest is not informed about
6194 detached or newly attached media.
6195 </para>
6196
6197 <para>
6198 The expert storage management mode can be enabled per VM
6199 executing:
6200 </para>
6201
6202<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal2/SilentReconfigureWhilePaused" 1</screen>
6203
6204 <para>
6205 You can reconfigure storage attachments later while the VM is
6206 paused by using the <command>VBoxManage storageattach</command>
6207 command.
6208 </para>
6209
6210 </sect1>
6211
6212 <sect1 id="hostpowertweaks">
6213
6214 <title>Handling of Host Power Management Events</title>
6215
6216 <para>
6217 Some host power management events are handled by &product-name;.
6218 The actual behavior depends on the platform:
6219 </para>
6220
6221 <itemizedlist>
6222
6223 <listitem>
6224 <para>
6225 <emphasis role="bold">Host Suspends.</emphasis> This event is
6226 generated when the host is about to suspend, that is, the host
6227 saves the state to some non-volatile storage and powers off.
6228 </para>
6229
6230 <para>
6231 This event is currently only handled on Windows hosts and Mac
6232 OS X hosts. When this event is generated, &product-name; will
6233 pause all running VMs.
6234 </para>
6235 </listitem>
6236
6237 <listitem>
6238 <para>
6239 <emphasis role="bold">Host Resumes.</emphasis> This event is
6240 generated when the host woke up from the suspended state.
6241 </para>
6242
6243 <para>
6244 This event is currently only handled on Windows hosts and Mac
6245 OS X hosts. When this event is generated, &product-name; will
6246 resume all VMs which are where paused before.
6247 </para>
6248 </listitem>
6249
6250 <listitem>
6251 <para>
6252 <emphasis role="bold">Battery Low.</emphasis> The battery
6253 level reached a critical level, usually less than 5 percent
6254 charged.
6255 </para>
6256
6257 <para>
6258 This event is currently only handled on Windows hosts and Mac
6259 OS X hosts. When this event is generated, &product-name; will
6260 save the state and terminate all VMs in preparation of a
6261 potential host powerdown.
6262 </para>
6263
6264 <para>
6265 The behavior can be configured. By executing the following
6266 command, no VM is saved:
6267 </para>
6268
6269<screen>$ VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
6270
6271 <para>
6272 This is a global setting as well as a per-VM setting. The
6273 per-VM value has higher precedence than the global value. The
6274 following command will save the state of all VMs but will not
6275 save the state of VM "foo":
6276 </para>
6277
6278<screen>$ VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 1
6279$ VBoxManage setextradata "foo" "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
6280
6281 <para>
6282 The first line is actually not required as by default the
6283 savestate action is performed.
6284 </para>
6285 </listitem>
6286
6287 </itemizedlist>
6288
6289 </sect1>
6290
6291 <sect1 id="sse412passthrough">
6292
6293 <title>Passing Through SSE4.1/SSE4.2 Instructions</title>
6294
6295 <para>
6296 To provide SSE 4.1/SSE 4.2 support to guests, the host CPU has to
6297 implement these instruction sets. The instruction sets are exposed
6298 to guests by default, but it is possible to disable the
6299 instructions for certain guests by using the following commands:
6300 </para>
6301
6302<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
6303VBoxInternal/CPUM/IsaExts/SSE4.1 0
6304$ VBoxManage setextradata <replaceable>VM-name</replaceable> \
6305VBoxInternal/CPUM/IsaExts/SSE4.2 0</screen>
6306
6307 <para>
6308 These are per-VM settings which are enabled by default.
6309 </para>
6310
6311 </sect1>
6312
6313 <sect1 id="hidledssync">
6314
6315 <title>Support for Keyboard Indicator Synchronization</title>
6316
6317 <para>
6318 This feature makes the host keyboard indicators (LEDs) match those
6319 of the VM's emulated keyboard when the machine window is active.
6320 It is currently implemented for Mac OS X and Windows hosts. This
6321 feature is enabled by default on supported host OSes. You can
6322 disable this feature by running the following command:
6323 </para>
6324
6325<screen>$ VBoxManage setextradata <replaceable>VM-name</replaceable> GUI/HidLedsSync 0</screen>
6326
6327 <para>
6328 This is a per-VM setting that is enabled by default.
6329 </para>
6330
6331 </sect1>
6332
6333 <sect1 id="usbtrafficcapturing">
6334
6335 <title>Capturing USB Traffic for Selected Devices</title>
6336
6337 <para>
6338 You can capture USB traffic for single USB devices or on the root
6339 hub level, which captures the traffic of all USB devices attached
6340 to the root hub. &product-name; stores the traffic in a format
6341 which is compatible with Wireshark. To capture the traffic of a
6342 specific USB device it must be attached to the VM with
6343 <command>VBoxManage</command> using the following command:
6344 </para>
6345
6346<screen>VBoxManage controlvm <replaceable>VM-name</replaceable> usbattach <replaceable>device uuid</replaceable>|<replaceable>address</replaceable> --capturefile <replaceable>filename</replaceable></screen>
6347
6348 <para>
6349 In order to enable capturing on the root hub use the following
6350 command while the VM is not running:
6351 </para>
6352
6353<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
6354VBoxInternal/Devices/usb-ehci/0/LUN#0/Config/CaptureFilename <replaceable>filename</replaceable></screen>
6355
6356 <para>
6357 The command above enables capturing on the root hub attached to
6358 the EHCI controller. To enable it for the OHCI or XHCI controller
6359 replace <literal>usb-ehci</literal> with
6360 <literal>usb-ohci</literal> or <literal>usb-xhci</literal>,
6361 respectively.
6362 </para>
6363
6364 </sect1>
6365
6366 <sect1 id="heartbeatservice">
6367
6368 <title>Configuring the Heartbeat Service</title>
6369
6370 <para>
6371 &product-name; ships a simple heartbeat service. Once the Guest
6372 Additions are active, the guest sends frequent heartbeat pings to
6373 the host. If the guest stops sending the heartbeat pings without
6374 properly terminating the service, the VM process will log this
6375 event in the VBox.log file. In the future it might be possible to
6376 configure dedicated actions but for now there is only a warning in
6377 the log file.
6378 </para>
6379
6380 <para>
6381 There are two parameters to configure. The <emphasis>heartbeat
6382 interval</emphasis> defines the time between two heartbeat pings.
6383 The default value is 2 seconds, that is, the heartbeat service of
6384 the &product-name; Guest Additions will send a heartbeat ping
6385 every two seconds. The value in nanoseconds can be configured like
6386 this:
6387 </para>
6388
6389<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
6390VBoxInternal/Devices/VMMDev/0/Config/HeartbeatInterval 2000000000</screen>
6391
6392 <para>
6393 The <emphasis>heartbeat timeout</emphasis> defines the time the
6394 host waits starting from the last heartbeat ping before it defines
6395 the guest as unresponsive. The default value is 2 times the
6396 heartbeat interval (4 seconds) and can be configured as following,
6397 in nanoseconds:
6398 </para>
6399
6400<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> \
6401VBoxInternal/Devices/VMMDev/0/Config/HeartbeatTimeout 4000000000</screen>
6402
6403 <para>
6404 If the heartbeat timeout expires, there will be a log message like
6405 <emphasis>VMMDev: HeartBeatCheckTimer: Guest seems to be
6406 unresponsive. Last heartbeat received 5 seconds ago.</emphasis> If
6407 another heartbeat ping arrives after this warning, there will be a
6408 log message like <emphasis>VMMDev: GuestHeartBeat: Guest is
6409 alive.</emphasis>
6410 </para>
6411
6412 </sect1>
6413
6414 <sect1 id="diskencryption">
6415
6416 <title>Encryption of Disk Images</title>
6417
6418 <para>
6419 &product-name; enables you to transparently encrypt the data
6420 stored in hard disk images for the guest. It does not depend on a
6421 specific image format to be used. Images which have the data
6422 encrypted are not portable between &product-name; and other
6423 virtualization software.
6424 </para>
6425
6426 <para>
6427 &product-name; uses the AES algorithm in XTS mode and supports
6428 128-bit or 256-bit data encryption keys (DEK). The DEK is stored
6429 encrypted in the medium properties and is decrypted during VM
6430 startup by entering a password which was chosen when the image was
6431 encrypted.
6432 </para>
6433
6434 <para>
6435 Since the DEK is stored as part of the VM configuration file, it
6436 is important that it is kept safe. Losing the DEK means that the
6437 data stored in the disk images is lost irrecoverably. Having
6438 complete and up to date backups of all data related to the VM is
6439 the responsibility of the user.
6440 </para>
6441
6442 <sect2 id="diskencryption-limitations">
6443
6444 <title>Limitations of Disk Encryption</title>
6445
6446 <para>
6447 There are some limitations the user needs to be aware of when
6448 using this feature:
6449 </para>
6450
6451 <itemizedlist>
6452
6453 <listitem>
6454 <para>
6455 This feature is part of the &product-name; Extension Pack,
6456 which needs to be installed. Otherwise disk encryption is
6457 unavailable.
6458 </para>
6459 </listitem>
6460
6461 <listitem>
6462 <para>
6463 Since encryption works only on the stored user data, it is
6464 currently not possible to check for metadata integrity of
6465 the disk image. Attackers might destroy data by removing or
6466 changing blocks of data in the image or change metadata
6467 items such as the disk size.
6468 </para>
6469 </listitem>
6470
6471 <listitem>
6472 <para>
6473 Exporting appliances which contain encrypted disk images is
6474 not possible because the OVF specification does not support
6475 this. All images are therefore decrypted during export.
6476 </para>
6477 </listitem>
6478
6479 <listitem>
6480 <para>
6481 The DEK is kept in memory while the VM is running to be able
6482 to decrypt data read and encrypt data written by the guest.
6483 While this should be obvious the user needs to be aware of
6484 this because an attacker might be able to extract the key on
6485 a compromised host and decrypt the data.
6486 </para>
6487 </listitem>
6488
6489 <listitem>
6490 <para>
6491 When encrypting or decrypting the images, the password is
6492 passed in clear text using the &product-name; API. This
6493 needs to be kept in mind, especially when using third party
6494 API clients which make use of the webservice where the
6495 password might be transmitted over the network. The use of
6496 HTTPS is mandatory in such a case.
6497 </para>
6498 </listitem>
6499
6500 <listitem>
6501 <para>
6502 Encrypting images with differencing images is only possible
6503 if there are no snapshots or a linear chain of snapshots.
6504 This limitation may be addressed in a future &product-name;
6505 version.
6506 </para>
6507 </listitem>
6508
6509 <listitem>
6510 <para>
6511 The disk encryption feature can protect the content of the
6512 disks configured for a VM only. It does not cover any other
6513 data related to a VM, including saved state or the
6514 configuration file itself.
6515 </para>
6516 </listitem>
6517
6518 </itemizedlist>
6519
6520 </sect2>
6521
6522 <sect2 id="diskencryption-encryption">
6523
6524 <title>Encrypting Disk Images</title>
6525
6526 <para>
6527 Encrypting disk images can be done either using the GUI or
6528 <command>VBoxManage</command>. While the GUI is easier to use,
6529 it works on a per VM basis and encrypts all disk images attached
6530 to the specific VM. With <command>VBoxManage</command> one can
6531 encrypt individual images, including all differencing images. To
6532 encrypt an unencrypted medium with
6533 <command>VBoxManage</command>, use:
6534 </para>
6535
6536<screen>VBoxManage encryptmedium <replaceable>uuid</replaceable>|<replaceable>filename</replaceable> \
6537--newpassword <replaceable>filename</replaceable>|- --cipher <replaceable>cipher-ID</replaceable> --newpasswordid "<replaceable>ID</replaceable></screen>
6538
6539 <para>
6540 To supply the encryption password point
6541 <command>VBoxManage</command> to the file where the password is
6542 stored or specify <option>-</option> to let VBoxManage ask you
6543 for the password on the command line.
6544 </para>
6545
6546 <para>
6547 The cipher parameter specifies the cipher to use for encryption
6548 and can be either <literal>AES-XTS128-PLAIN64</literal> or
6549 <literal>AES-XTS256-PLAIN64</literal>. The specified password
6550 identifier can be freely chosen by the user and is used for
6551 correct identification when supplying multiple passwords during
6552 VM startup.
6553 </para>
6554
6555 <para>
6556 If the user uses the same password when encrypting multiple
6557 images and also the same password identifier, the user needs to
6558 supply the password only once during VM startup.
6559 </para>
6560
6561 </sect2>
6562
6563 <sect2 id="diskencryption-startvm">
6564
6565 <title>Starting a VM with Encrypted Images</title>
6566
6567 <para>
6568 When a VM is started using the GUI, a dialog will open where the
6569 user needs to enter all passwords for all encrypted images
6570 attached to the VM. If another frontend like VBoxHeadless is
6571 used, the VM will be paused as soon as the guest tries to access
6572 an encrypted disk. The user needs to provide the passwords
6573 through <command>VBoxManage</command> using the following
6574 command:
6575 </para>
6576
6577<screen>VBoxManage controlvm <replaceable>uuid</replaceable>|<replaceable>vmname</replaceable> addencpassword <replaceable>ID</replaceable> <replaceable>password</replaceable> [--removeonsuspend yes|no]</screen>
6578
6579 <para>
6580 <replaceable>ID</replaceable> must be the same as the password
6581 identifier supplied when encrypting the images.
6582 <replaceable>password</replaceable> is the password used when
6583 encrypting the images. Optionally, you can specify
6584 <option>--removeonsuspend yes|no</option> to specify whether to
6585 remove the password from VM memory when the VM is suspended.
6586 Before the VM can be resumed, the user needs to supply the
6587 passwords again. This is useful when a VM is suspended by a host
6588 suspend event and the user does not want the password to remain
6589 in memory.
6590 </para>
6591
6592 </sect2>
6593
6594 <sect2 id="diskencryption-decryption">
6595
6596 <title>Decrypting Encrypted Images</title>
6597
6598 <para>
6599 In some circumstances it might be required to decrypt previously
6600 encrypted images. This can be done in the GUI for a complete VM
6601 or using <command>VBoxManage</command> with the following
6602 command:
6603 </para>
6604
6605<screen>VBoxManage encryptmedium <replaceable>uuid</replaceable>|<replaceable>filename</replaceable> --oldpassword <replaceable>file</replaceable>|-</screen>
6606
6607 <para>
6608 The only required parameter is the password the image was
6609 encrypted with. The options are the same as for encrypting
6610 images.
6611 </para>
6612
6613 </sect2>
6614
6615 </sect1>
6616
6617 <sect1 id="gimdebug">
6618
6619 <title>Paravirtualized Debugging</title>
6620
6621 <para>
6622 This section covers debugging of guest operating systems using
6623 interfaces supported by paravirtualization providers.
6624 </para>
6625
6626 <note>
6627 <para>
6628 Paravirtualized debugging significantly alter guest operating
6629 system behaviour and should only be used by expert users for
6630 debugging and diagnostics.
6631 </para>
6632 </note>
6633
6634 <para>
6635 These debug options are specified as a string of key-value pairs
6636 separated by commas. An empty string disables paravirtualized
6637 debugging.
6638 </para>
6639
6640 <sect2 id="gimdebughyperv">
6641
6642 <title>Hyper-V Debug Options</title>
6643
6644 <para>
6645 All of the options listed below are optional, and thus the
6646 default value specified will be used when the corresponding
6647 key-value pair is not specified.
6648 </para>
6649
6650 <itemizedlist>
6651
6652 <listitem>
6653 <para>
6654 Key:
6655 <emphasis role="bold"><literal>enabled</literal></emphasis>
6656 </para>
6657
6658 <para>
6659 Value: <literal>0</literal> or <literal>1</literal>
6660 </para>
6661
6662 <para>
6663 Default: <literal>0</literal>
6664 </para>
6665
6666 <para>
6667 Specify <literal>1</literal> to enable the Hyper-V debug
6668 interface. If this key-value pair is not specified or the
6669 value is not <literal>1</literal>, the Hyper-V debug
6670 interface is disabled regardless of other key-value pairs
6671 being present.
6672 </para>
6673 </listitem>
6674
6675 <listitem>
6676 <para>
6677 Key:
6678 <emphasis role="bold"><literal>address</literal></emphasis>
6679 </para>
6680
6681 <para>
6682 Value: IPv4 address
6683 </para>
6684
6685 <para>
6686 Default: 127.0.0.1
6687 </para>
6688
6689 <para>
6690 Specify the IPv4 address where the remote debugger is
6691 connected.
6692 </para>
6693 </listitem>
6694
6695 <listitem>
6696 <para>
6697 Key:
6698 <emphasis role="bold"><literal>port</literal></emphasis>
6699 </para>
6700
6701 <para>
6702 Value: UDP port number
6703 </para>
6704
6705 <para>
6706 Default: 50000
6707 </para>
6708
6709 <para>
6710 Specify the UDP port number where the remote debugger is
6711 connected.
6712 </para>
6713 </listitem>
6714
6715 <listitem>
6716 <para>
6717 Key:
6718 <emphasis role="bold"><literal>vendor</literal></emphasis>
6719 </para>
6720
6721 <para>
6722 Value: Hyper-V vendor signature reported by CPUID to the
6723 guest
6724 </para>
6725
6726 <para>
6727 Default: When debugging is enabled: <literal>Microsoft
6728 Hv</literal>, otherwise: <literal>VBoxVBoxVBox</literal>
6729 </para>
6730
6731 <para>
6732 Specify the Hyper-V vendor signature which is exposed to the
6733 guest by CPUID. For debugging Microsoft Windows guests, it
6734 is required the hypervisor reports the Microsoft vendor.
6735 </para>
6736 </listitem>
6737
6738 <listitem>
6739 <para>
6740 Key:
6741 <emphasis role="bold"><literal>hypercallinterface</literal>
6742 </emphasis>
6743 </para>
6744
6745 <para>
6746 Value: <literal>0</literal> or <literal>1</literal>
6747 </para>
6748
6749 <para>
6750 Default: <literal>0</literal>
6751 </para>
6752
6753 <para>
6754 Specify whether hypercalls should be suggested for
6755 initiating debug data transfers between host and guest
6756 rather than MSRs when requested by the guest.
6757 </para>
6758 </listitem>
6759
6760 <listitem>
6761 <para>
6762 Key: <emphasis role="bold"><literal>vsinterface</literal>
6763 </emphasis>
6764 </para>
6765
6766 <para>
6767 Value: <literal>0</literal> or <literal>1</literal>
6768 </para>
6769
6770 <para>
6771 Default: When debugging is enabled, <literal>1</literal>,
6772 otherwise <literal>0</literal>
6773 </para>
6774
6775 <para>
6776 Specify whether to expose the VS#1 virtualization service
6777 interface to the guest. This interface is required for
6778 debugging Microsoft Windows 10 32-bit guests, but is
6779 optional for other Windows versions.
6780 </para>
6781 </listitem>
6782
6783 </itemizedlist>
6784
6785 <sect3 id="gimdebughyperv-windows-setup">
6786
6787 <title>Setting up Windows Guests for Debugging with the Hyper-V
6788 Paravirtualization Provider</title>
6789
6790 <para>
6791 Windows supports debugging over a serial cable, USB, IEEE 1394
6792 Firewire, and Ethernet. USB and IEEE 1394 are not applicable
6793 for virtual machines, and Ethernet requires Windows 8 or
6794 later. While a serial connection is universally usable, it is
6795 slow.
6796 </para>
6797
6798 <para>
6799 Debugging using the Hyper-V debug transport, supported on
6800 Windows Vista and later, offers significant benefits. It
6801 provides excellent performance due to direct host-to-guest
6802 transfers, it is easy to set up and requires minimal support
6803 from the hypervisor. It can be used with the debugger running
6804 on the same host as the VM or with the debugger and VM on
6805 separate machines connected over a network.
6806 </para>
6807
6808 <para>
6809 <emphasis role="bold">Prerequisites</emphasis>
6810 </para>
6811
6812 <itemizedlist>
6813
6814 <listitem>
6815 <para>
6816 A VM configured for Hyper-V paravirtualization running a
6817 Windows Vista or newer Windows guest. You can check the
6818 effective paravirtualization provider for your VM with the
6819 output of the following <command>VBoxManage</command>
6820 command:
6821 </para>
6822
6823<screen>$ VBoxManage showvminfo <replaceable>VM-name</replaceable></screen>
6824 </listitem>
6825
6826 <listitem>
6827 <para>
6828 A sufficiently up-to-date version of the Microsoft WinDbg
6829 debugger required to debug the version of Windows in your
6830 VM.
6831 </para>
6832 </listitem>
6833
6834 <listitem>
6835 <para>
6836 While Windows 8 and newer Windows guests ship with Hyper-V
6837 debug support, Windows 7 and Vista do not. To use Hyper-V
6838 debugging with a Windows 7 or Vista guest, copy the file
6839 <filename>kdvm.dll</filename> from a Windows 8.0
6840 installation. This file is typically located in
6841 <filename>C:\Windows\System32</filename>. Copy it to the
6842 same location in your Windows 7/Vista guest. Make sure you
6843 copy the 32-bit or 64-bit version of the DLL which matches
6844 your guest OS.
6845 </para>
6846
6847 <note>
6848 <para>
6849 Only Windows 8.0 ships <filename>kdvm.dll</filename>.
6850 Windows 8.1 and newer Windows versions do not.
6851 </para>
6852 </note>
6853 </listitem>
6854
6855 </itemizedlist>
6856
6857 <para>
6858 <emphasis role="bold">VM and Guest Configuration</emphasis>
6859 </para>
6860
6861 <orderedlist>
6862
6863 <listitem>
6864 <para>
6865 Power off the VM.
6866 </para>
6867 </listitem>
6868
6869 <listitem>
6870 <para>
6871 Enable the debug options with the following
6872 <command>VBoxManage</command> command:
6873 </para>
6874
6875<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> --paravirtdebug "enabled=1"</screen>
6876
6877 <para>
6878 The above command assumes your debugger will connect to
6879 your host machine on UDP port 50000. However, if you need
6880 to run the debugger on a remote machine you may specify
6881 the remote address and port here. For example:
6882 </para>
6883
6884<screen>$ VBoxManage modifyvm <replaceable>VM-name</replaceable> \
6885--paravirtdebug "enabled=1,address=192.168.32.1,port=55000"</screen>
6886
6887 <para>
6888 See <xref linkend="gimdebughyperv" /> for the complete set
6889 of options.
6890 </para>
6891 </listitem>
6892
6893 <listitem>
6894 <para>
6895 Start the VM.
6896 </para>
6897 </listitem>
6898
6899 <listitem>
6900 <para>
6901 In the guest, start an elevated command prompt and execute
6902 the following commands:
6903 </para>
6904
6905 <itemizedlist>
6906
6907 <listitem>
6908 <para>
6909 For a Windows 8 or newer Windows guest:
6910 </para>
6911
6912<screen>bcdedit /dbgsettings net hostip:5.5.5.5 port:50000 key:1.2.3.4</screen>
6913 </listitem>
6914
6915 <listitem>
6916 <para>
6917 For a Windows 7 or Vista guest:
6918 </para>
6919
6920<screen>bcdedit /set loadoptions host_ip=5.5.5.5,host_port=50000,encryption_key=1.2.3.4</screen>
6921
6922<screen>bcdedit /set dbgtransport kdvm.dll</screen>
6923
6924 <para>
6925 The IP address and port in the
6926 <command>bcdedit</command> command are ignored when
6927 using the Hyper-V debug transport. Any valid IP and a
6928 port number greater than 49151 and lower than 65536
6929 can be entered.
6930 </para>
6931
6932 <para>
6933 The encryption key in the <command>bcdedit</command>
6934 command is relevant and must be valid. The key
6935 "1.2.3.4" used in the above example is valid and may
6936 be used if security is not a concern. If you do not
6937 specify any encryption key, <command>bcdedit</command>
6938 will generate one for you and you will need to copy
6939 this key to later enter in Microsoft WinDbg on the
6940 remote end. This encryption key is used to encrypt the
6941 debug data exchanged between Windows and the debugger.
6942 </para>
6943 </listitem>
6944
6945 <listitem>
6946 <para>
6947 Run one or more of the following commands to enable
6948 debugging for the appropriate phase or component of
6949 your Windows guest:
6950 </para>
6951
6952<screen>bcdedit /set debug on</screen>
6953
6954<screen>bcdedit /set bootdebug on</screen>
6955
6956<screen>bcdedit /set {bootmgr} bootdebug on</screen>
6957
6958 <para>
6959 Please note that the <command>bootdebug</command>
6960 options are only effective on Windows 8 or newer when
6961 using the Hyper-V debug transport. Refer to Microsoft
6962 Windows documentation for detailed explanation of
6963 <command>bcdedit</command> options.
6964 </para>
6965 </listitem>
6966
6967 </itemizedlist>
6968 </listitem>
6969
6970 <listitem>
6971 <para>
6972 Start Microsoft WinDbg on your host machine or remote
6973 host.
6974 </para>
6975
6976 <para>
6977 From the <emphasis role="bold">File</emphasis> menu,
6978 select <emphasis role="bold">Kernel Debug</emphasis>. On
6979 the <emphasis role="bold">NET</emphasis> tab, specify the
6980 UDP port number you used in the
6981 <literal>paravirtdebug</literal> options. If you did not
6982 specify any, leave it as 50000. Ensure that the UDP port
6983 is not blocked by a firewall or other security software.
6984 </para>
6985
6986 <para>
6987 In the <emphasis role="bold">Key</emphasis> field, enter
6988 <literal>1.2.3.4</literal> or the encryption key from the
6989 <command>bcdedit</command> command in your Windows guest.
6990 </para>
6991
6992 <para>
6993 Click <emphasis role="bold">OK</emphasis> to start
6994 listening for connections. Microsoft WinDbg typically
6995 shows a Waiting to Reconnect message during this phase.
6996 </para>
6997
6998 <para>
6999 Alternatively, to directly start a debug session, run
7000 WinDbg from the command line as follows :
7001 </para>
7002
7003<screen>windbg.exe -k net:port=50000,key=1.2.3.4</screen>
7004
7005 <para>
7006 See the WinDbg documentation for the complete command line
7007 syntax.
7008 </para>
7009 </listitem>
7010
7011 <listitem>
7012 <para>
7013 Reboot your Windows guest and it should then connect as a
7014 debuggee with Microsoft WinDbg.
7015 </para>
7016 </listitem>
7017
7018 </orderedlist>
7019
7020 </sect3>
7021
7022 </sect2>
7023
7024 </sect1>
7025
7026 <sect1 id="pcspeaker_passthrough">
7027
7028 <title>PC Speaker Passthrough</title>
7029
7030 <para>
7031 As an experimental feature, primarily due to being limited to
7032 Linux host only and unknown Linux distribution coverage,
7033 &product-name; supports passing through the PC speaker to the
7034 host. The PC speaker, sometimes called the system speaker, is a
7035 way to produce audible feedback such as beeps without the need for
7036 regular audio and sound card support.
7037 </para>
7038
7039 <para>
7040 The PC speaker passthrough feature in &product-name; handles beeps
7041 only. Advanced PC speaker use by the VM, such as PCM audio, will
7042 not work, resulting in undefined host behavior.
7043 </para>
7044
7045 <para>
7046 Producing beeps on Linux is a very complex topic. &product-name;
7047 offers a collection of options, in an attempt to make this work
7048 deterministically and reliably on as many Linux distributions and
7049 system configurations as possible. These are summarized in the
7050 following table.
7051 </para>
7052
7053 <table id="table-pcspeaker-config" tabstyle="oracle-all">
7054 <title>PC Speaker Configuration Options</title>
7055 <tgroup cols="3">
7056 <thead>
7057 <row>
7058 <entry><para>
7059 <emphasis role="bold">Code</emphasis>
7060 </para></entry>
7061 <entry><para>
7062 <emphasis role="bold">Device</emphasis>
7063 </para></entry>
7064 <entry><para>
7065 <emphasis role="bold">Notes</emphasis>
7066 </para></entry>
7067 </row>
7068 </thead>
7069 <tbody>
7070 <row>
7071 <entry><para>
7072 1
7073 </para></entry>
7074 <entry><para>
7075 <filename>/dev/input/by-path/platform-pcspkr-event-spkr</filename>
7076 </para></entry>
7077 <entry><para>
7078 Direct host PC speaker use.
7079 </para></entry>
7080 </row>
7081 <row>
7082 <entry><para>
7083 2
7084 </para></entry>
7085 <entry><filename>/dev/tty</filename></entry>
7086 <entry><para>
7087 Uses the terminal association of the VM process. VM
7088 needs to be started on a virtual console.
7089 </para></entry>
7090 </row>
7091 <row>
7092 <entry><para>
7093 3
7094 </para></entry>
7095 <entry><para>
7096 <filename>/dev/tty0</filename> or
7097 <filename>/dev/vc/0</filename>
7098 </para></entry>
7099 <entry><para>
7100 Can only be used by user <literal>root</literal> or
7101 users with <literal>cap_sys_tty_config</literal>
7102 capability.
7103 </para></entry>
7104 </row>
7105 <row>
7106 <entry><para>
7107 9
7108 </para></entry>
7109 <entry><para>
7110 A user-specified console or evdev device path.
7111 </para></entry>
7112 <entry><para>
7113 As for codes 1 to 3, but with a custom device path.
7114 </para></entry>
7115 </row>
7116 <row>
7117 <entry><para>
7118 70
7119 </para></entry>
7120 <entry><para>
7121 <filename>/dev/tty</filename>
7122 </para></entry>
7123 <entry><para>
7124 Standard beep only. Loses frequency and length. See code
7125 2.
7126 </para></entry>
7127 </row>
7128 <row>
7129 <entry><para>
7130 79
7131 </para></entry>
7132 <entry><para>
7133 A user-specified terminal device path.
7134 </para></entry>
7135 <entry><para>
7136 As for code 70, but with a custom device path.
7137 </para></entry>
7138 </row>
7139 <row>
7140 <entry><para>
7141 100
7142 </para></entry>
7143 <entry><para>
7144 All of the above.
7145 </para></entry>
7146 <entry><para>
7147 Tries all the available codes.
7148 </para></entry>
7149 </row>
7150 </tbody>
7151 </tgroup>
7152 </table>
7153
7154 <para>
7155 To enable PC speaker passthrough use the following command:
7156 </para>
7157
7158<screen>VBoxManage setextradata <replaceable>VM-name</replaceable> "VBoxInternal/Devices/i8254/0/Config/PassthroughSpeaker" <replaceable>N</replaceable></screen>
7159
7160 <para>
7161 Replace <replaceable>N</replaceable> with the code representing
7162 the case you want to use. Changing this setting takes effect when
7163 you next start the VM. It is safe to enable PC speaker passthrough
7164 on all host OSes. It will only have an effect on Linux.
7165 </para>
7166
7167 <para>
7168 The VM log file, <filename>VBox.log</filename>, contains lines
7169 with the prefix <literal>PIT: speaker:</literal> showing the PC
7170 speaker passthrough setup activities. It gives hints which device
7171 it picked or why it failed.
7172 </para>
7173
7174 <para>
7175 Enabling PC speaker passthrough for the VM is usually the simple
7176 part. The real difficulty is making sure that &product-name; can
7177 access the necessary device, because in a typical Linux install
7178 most of them can only be accessed by user <literal>root</literal>.
7179 You should follow the preferred way to persistently change this,
7180 such as by referring to your distribution's documentation. Since
7181 there are countless Linux distribution variants, we can only give
7182 the general hints that there is often a way to give the X11
7183 session user access to additional devices, or you need to find a
7184 working solution using a udev configuration file. If everything
7185 fails you might try setting the permissions using a script which
7186 is run late enough in the host system startup.
7187 </para>
7188
7189 <para>
7190 Sometimes additional rules are applied by the kernel to limit
7191 access. For example, that the VM process must have the same
7192 controlling terminal as the device configured to be used for
7193 beeping, something which is often very difficult to achieve for
7194 GUI applications such as &product-name;. The table above contains
7195 some hints, but in general refer to the Linux documentation.
7196 </para>
7197
7198 <para>
7199 If you have trouble getting any beeps even if the device
7200 permissions are set up and VBox.log confirms that it uses evdev or
7201 console for the PC speaker control, check if your system has a PC
7202 speaker. Some systems do not have one. Other complications can
7203 arise from Linux rerouting the PC speaker output to a sound card.
7204 Check if the beeps are audible if you connect speakers to your
7205 sound card. Today almost all systems have one. Finally, check if
7206 the audio mixer control has a channel named "beep", which could be
7207 hidden in the mixer settings, and that it is not muted.
7208 </para>
7209
7210 </sect1>
7211
7212 <sect1 id="usbip">
7213
7214 <title>Accessing USB devices Exposed Over the Network with USB/IP</title>
7215
7216 <para>
7217 &product-name; supports passing through USB devices which are
7218 exposed over the network using the USB over IP protocol without
7219 the need to configure the client side provided by the kernel and
7220 usbip tools. Furthermore, this feature works with &product-name;
7221 running on any supported host, rather than just Linux alone, as is
7222 the case with the official client.
7223 </para>
7224
7225 <para>
7226 To enable support for passing through USB/IP devices, use the
7227 following command to add the device server that exports the
7228 devices:
7229 </para>
7230
7231<screen>VBoxManage usbdevsource add <replaceable>unique-name</replaceable> --backend <replaceable>USB-IP</replaceable> --address <replaceable>device-server</replaceable>[:<replaceable>port</replaceable>]</screen>
7232
7233 <para>
7234 USB devices exported on the device server are then accessible
7235 through the GUI or <command>VBoxManage</command>, like any USB
7236 devices attached locally. This can be used multiple times to
7237 access different device servers.
7238 </para>
7239
7240 <para>
7241 To remove a device server, the following command can be used:
7242 </para>
7243
7244<screen>$ VBoxManage usbdevsource remove <replaceable>unique-name</replaceable></screen>
7245
7246 <sect2 id="usbip-setup-server">
7247
7248 <title>Setting up USB/IP Support on a Linux System</title>
7249
7250 <para>
7251 This section gives a brief overview on how to set up a Linux
7252 based system to act as a USB device server. The system on the
7253 server requires that the <filename>usbip-core.ko</filename> and
7254 <filename>usbip-host.ko</filename> kernel drivers are available,
7255 and that the USB/IP tools package is installed. The particular
7256 installation method for the necessary tools depends on which
7257 distribution is used. For example, for Debian based systems, use
7258 the following command to install the required tools:
7259 </para>
7260
7261<screen>$ apt-get install usbip-utils</screen>
7262
7263 <para>
7264 To check whether the necessary tools are already installed use
7265 the following command:
7266 </para>
7267
7268<screen>
7269$ usbip list -l
7270 </screen>
7271
7272 <para>
7273 This should produce output similar to that shown in the example
7274 below:
7275 </para>
7276
7277<screen>
7278 - busid 4-2 (0bda:0301)
7279 Realtek Semiconductor Corp. : multicard reader (0bda:0301)
7280
7281 - busid 5-1 (046d:c52b)
7282 Logitech, Inc. : Unifying Receiver (046d:c52b)
7283 </screen>
7284
7285 <para>
7286 If everything is installed, the USB/IP server needs to be
7287 started as <literal>root</literal> using the following command:
7288 </para>
7289
7290<screen># usbipd -D</screen>
7291
7292 <para>
7293 See the documentation for the installed distribution to
7294 determine how to start the service when the system boots.
7295 </para>
7296
7297 <para>
7298 By default, no device on the server is exported. This must be
7299 done manually for each device. To export a device use the
7300 following command:
7301 </para>
7302
7303<screen># usbip bind -b "bus identifier"</screen>
7304
7305 <para>
7306 To export the multicard reader in the previous example:
7307 </para>
7308
7309<screen># usbip bind -b 4-2</screen>
7310
7311 </sect2>
7312
7313 <sect2 id="usbip-security">
7314
7315 <title>Security Considerations</title>
7316
7317 <para>
7318 The communication between the server and client is unencrypted
7319 and there is no authorization required to access exported
7320 devices. An attacker might sniff sensitive data or gain control
7321 over a device. To mitigate this risk, the device should be
7322 exposed over a local network to which only trusted clients have
7323 access. To access the device remotely over a public network, a
7324 VPN solution should be used to provide the required level of
7325 security protection.
7326 </para>
7327
7328 </sect2>
7329
7330 </sect1>
7331
7332 <sect1 id="hyperv-support">
7333
7334 <title>Using Hyper-V with &product-name;</title>
7335
7336 <para>
7337 &product-name; can be used on a Windows host where Hyper-V is
7338 running. This is an experimental feature.
7339 </para>
7340
7341 <para>
7342 No configuration is required. &product-name; detects Hyper-V
7343 automatically and uses Hyper-V as the virtualization engine for
7344 the host system. The CPU icon in the VM window status bar
7345 indicates that Hyper-V is being used.
7346 </para>
7347
7348 <note>
7349 <para>
7350 When using this feature, some host systems might experience
7351 significant &product-name; performance degradation.
7352 </para>
7353 </note>
7354
7355 </sect1>
7356
7357 <sect1 id="nested-virt">
7358
7359 <title>Nested Virtualization</title>
7360
7361 <para>
7362 &product-name; supports <emphasis>nested
7363 virtualization</emphasis>. This feature enables the passthrough of
7364 hardware virtualization functions to the guest VM. That means that
7365 you can install a hypervisor, such as &product-name;, Oracle VM
7366 Server or KVM, on an &product-name; guest. You can then create and
7367 run VMs within the guest VM.
7368 </para>
7369
7370 <para>
7371 Hardware virtualization features not present on the host CPU will
7372 not be exposed to the guest. In addition, some features such as
7373 nested paging are not yet supported for passthrough to the guest.
7374 </para>
7375
7376 <para>
7377 You can enable the nested virtualization feature in one of the
7378 following ways:
7379 </para>
7380
7381 <itemizedlist>
7382
7383 <listitem>
7384 <para>
7385 From the VirtualBox Manager, select the
7386 <emphasis role="bold">Enable Nested VT-x/AMD-V</emphasis>
7387 check box on the <emphasis role="bold">Processor</emphasis>
7388 tab. To disable the feature, deselect the check box.
7389 </para>
7390 </listitem>
7391
7392 <listitem>
7393 <para>
7394 Use the <option>--nested-hw-virt</option> option of the
7395 <command>VBoxManage modifyvm</command> command to enable or
7396 disable nested virtualization. See
7397 <xref linkend="vboxmanage-modifyvm"/>.
7398 </para>
7399 </listitem>
7400
7401 </itemizedlist>
7402
7403 </sect1>
7404
7405 <xi:include href="user_isomakercmd-man.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
7406
7407</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