VirtualBox

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

Last change on this file since 76694 was 76078, checked in by vboxsync, 6 years ago

manual: integrate drop #30 with minimal manual adjustments (but everything into one book, with manually applied tweaks to turn the release notes into a pure changelog again and manually re-applied the last changelog change since it wasn't included yet)

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