VirtualBox

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

最後變更 在這個檔案從75137是 75137,由 vboxsync 提交於 6 年 前

Docs/Manual: Renamed "video capturing" to "capturing" only, as this now also stands for audio capturing.

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

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