VirtualBox

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

Last change on this file since 74854 was 73276, checked in by vboxsync, 6 years ago

doc/manual: Big build system overhaul, because the use of entities and catalogs eliminates the need to have placeholders in XML which previously needed separate preprocessing. Many cleanups, including replacing almost all pattern rules (since their dependencies had to be too generous) and using defines instead. Also integrated many cleanups for the user manual text (which needs careful review, couldn't check yet if it uses any additional tags which some of our XSLT would ignore).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 221.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
4<!ENTITY % all.entities SYSTEM "all-entities.ent">
5%all.entities;
6]>
7<chapter id="AdvancedTopics">
8
9 <title>Advanced Topics</title>
10
11 <sect1 id="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 the Custom ACPI Table</title>
2386
2387 <para>
2388 VirtualBox can be configured to present an custom ACPI table to
2389 the guest. Use the following command to configure this:
2390 </para>
2391
2392<screen>VBoxManage setextradata "VM name"
2393 "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/path/to/table.bin"</screen>
2394
2395 <para>
2396 Configuring a custom ACPI table can prevent Windows Vista and
2397 Windows 7 from asking for a new product key. On Linux hosts, one
2398 of the host tables can be read from
2399 <filename>/sys/firmware/acpi/tables/</filename>.
2400 </para>
2401
2402 </sect1>
2403
2404 <sect1 id="fine-tune-timers">
2405
2406 <title>Fine Tuning Timers and Time Synchronization</title>
2407
2408 <sect2 id="changetscmode">
2409
2410 <title>Configuring the Guest Time Stamp Counter (TSC) to Reflect Guest
2411 Execution</title>
2412
2413 <para>
2414 By default, VirtualBox keeps all sources of time visible to the
2415 guest synchronized to a single time source, the monotonic host
2416 time. This reflects the assumptions of many guest operating
2417 systems, which expect all time sources to reflect "wall clock"
2418 time. In special circumstances it may be useful however to make
2419 the time stamp counter (TSC) in the guest reflect the time
2420 actually spent executing the guest.
2421 </para>
2422
2423 <para>
2424 This special TSC handling mode can be enabled on a per-VM basis,
2425 and for best results must be used only in combination with
2426 hardware virtualization. To enable this mode use the following
2427 command:
2428 </para>
2429
2430<screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
2431
2432 <para>
2433 To revert to the default TSC handling mode use:
2434 </para>
2435
2436<screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
2437
2438 <para>
2439 Note that if you use the special TSC handling mode with a guest
2440 operating system which is very strict about the consistency of
2441 time sources you may get a warning or error message about the
2442 timing inconsistency. It may also cause clocks to become
2443 unreliable with some guest operating systems depending on how
2444 they use the TSC.
2445 </para>
2446
2447 </sect2>
2448
2449 <sect2 id="warpguest">
2450
2451 <title>Accelerate or Slow Down the Guest Clock</title>
2452
2453 <para>
2454 For certain purposes it can be useful to accelerate or to slow
2455 down the virtual guest clock. This can be achieved as follows:
2456 </para>
2457
2458<screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
2459
2460 <para>
2461 The above example will double the speed of the guest clock while
2462 </para>
2463
2464<screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
2465
2466 <para>
2467 will halve the speed of the guest clock. Note that changing the
2468 rate of the virtual clock can confuse the guest and can even
2469 lead to abnormal guest behavior. For instance, a higher clock
2470 rate means shorter timeouts for virtual devices with the result
2471 that a slightly increased response time of a virtual device due
2472 to an increased host load can cause guest failures. Note further
2473 that any time synchronization mechanism will frequently try to
2474 resynchronize the guest clock with the reference clock, which is
2475 the host clock if the VirtualBox Guest Additions are active.
2476 Therefore any time synchronization should be disabled if the
2477 rate of the guest clock is changed as described above. See
2478 <xref linkend="changetimesync" />.
2479 </para>
2480
2481 </sect2>
2482
2483 <sect2 id="changetimesync">
2484
2485 <title>Tuning the Guest Additions Time Synchronization Parameters</title>
2486
2487 <para>
2488 The VirtualBox Guest Additions ensure that the guest's system
2489 time is synchronized with the host time. There are several
2490 parameters which can be tuned. The parameters can be set for a
2491 specific VM using the following command:
2492 </para>
2493
2494<screen>VBoxManage guestproperty set "VM name" "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
2495
2496 <para>
2497 where <computeroutput>PARAMETER</computeroutput> is one of the
2498 following:
2499 </para>
2500
2501 <variablelist>
2502
2503 <varlistentry>
2504 <term>
2505 <computeroutput>--timesync-interval</computeroutput>
2506 </term>
2507
2508 <listitem>
2509 <para>
2510 Specifies the interval at which to synchronize the time
2511 with the host. The default is 10000 ms (10 seconds).
2512 </para>
2513 </listitem>
2514 </varlistentry>
2515
2516 <varlistentry>
2517 <term>
2518 <computeroutput>--timesync-min-adjust</computeroutput>
2519 </term>
2520
2521 <listitem>
2522 <para>
2523 The minimum absolute drift value measured in milliseconds
2524 to make adjustments for. The default is 1000 ms on OS/2
2525 and 100 ms elsewhere.
2526 </para>
2527 </listitem>
2528 </varlistentry>
2529
2530 <varlistentry>
2531 <term>
2532 <computeroutput>--timesync-latency-factor</computeroutput>
2533 </term>
2534
2535 <listitem>
2536 <para>
2537 The factor to multiply the time query latency with to
2538 calculate the dynamic minimum adjust time. The default is
2539 8 times, which means as follows:
2540 </para>
2541
2542 <para>
2543 Measure the time it takes to determine the host time, the
2544 guest has to contact the VM host service which may take
2545 some time. Multiply this value by 8 and do an adjustment
2546 only if the time difference between host and guest is
2547 bigger than this value. Do not do any time adjustment
2548 otherwise.
2549 </para>
2550 </listitem>
2551 </varlistentry>
2552
2553 <varlistentry>
2554 <term>
2555 <computeroutput>--timesync-max-latency</computeroutput>
2556 </term>
2557
2558 <listitem>
2559 <para>
2560 The max host timer query latency to accept. The default is
2561 250 ms.
2562 </para>
2563 </listitem>
2564 </varlistentry>
2565
2566 <varlistentry>
2567 <term>
2568 <computeroutput>--timesync-set-threshold</computeroutput>
2569 </term>
2570
2571 <listitem>
2572 <para>
2573 The absolute drift threshold, given as milliseconds where
2574 to start setting the time instead of trying to smoothly
2575 adjust it. The default is 20 minutes.
2576 </para>
2577 </listitem>
2578 </varlistentry>
2579
2580 <varlistentry>
2581 <term>
2582 <computeroutput>--timesync-set-start</computeroutput>
2583 </term>
2584
2585 <listitem>
2586 <para>
2587 Set the time when starting the time sync service.
2588 </para>
2589 </listitem>
2590 </varlistentry>
2591
2592 <varlistentry>
2593 <term>
2594 <computeroutput>--timesync-set-on-restore
2595 0|1</computeroutput>
2596 </term>
2597
2598 <listitem>
2599 <para>
2600 Set the time after the VM was restored from a saved state
2601 when passing 1 as parameter (default). Disable by passing
2602 0. In the latter case, the time will be adjusted smoothly
2603 which can take a long time.
2604 </para>
2605 </listitem>
2606 </varlistentry>
2607
2608 </variablelist>
2609
2610 <para>
2611 All these parameters can be specified as command line parameters
2612 to VBoxService as well.
2613 </para>
2614
2615 </sect2>
2616
2617 <sect2 id="disabletimesync">
2618
2619 <title>Disabling the Guest Additions Time Synchronization</title>
2620
2621 <para>
2622 Once installed and started, the VirtualBox Guest Additions will
2623 try to synchronize the guest time with the host time. This can
2624 be prevented by forbidding the guest service from reading the
2625 host clock:
2626 </para>
2627
2628<screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1</screen>
2629
2630 </sect2>
2631
2632 </sect1>
2633
2634 <sect1 id="vboxbowsolaris11">
2635
2636 <title>Installing the Alternate Bridged Networking Driver on Solaris 11 hosts</title>
2637
2638 <para>
2639 Starting with VirtualBox 4.1, VirtualBox ships a new network
2640 filter driver that utilizes Solaris 11's Crossbow functionality.
2641 By default, this new driver is installed for Solaris 11 hosts
2642 (builds 159 and above) that has support for it.
2643 </para>
2644
2645 <para>
2646 To force installation of the older STREAMS based network filter
2647 driver, execute as root the following command before installing
2648 the VirtualBox package:
2649 </para>
2650
2651<screen>touch /etc/vboxinst_vboxflt</screen>
2652
2653 <para>
2654 To force installation of the Crossbow based network filter driver,
2655 execute as root the following command before installing the
2656 VirtualBox package:
2657 </para>
2658
2659<screen>touch /etc/vboxinst_vboxbow</screen>
2660
2661 <para>
2662 To check which driver is currently being used by VirtualBox,
2663 execute:
2664 </para>
2665
2666<screen>modinfo | grep vbox</screen>
2667
2668 <para>
2669 If the output contains "vboxbow", it indicates VirtualBox is using
2670 the Crossbow network filter driver, while the name "vboxflt"
2671 indicates usage of the older STREAMS network filter.
2672 </para>
2673
2674 </sect1>
2675
2676 <sect1 id="vboxbowvnictemplates">
2677
2678 <title>VirtualBox VNIC Templates for VLANs on Solaris 11 Hosts</title>
2679
2680 <para>
2681 VirtualBox supports Virtual Network Interface (VNIC) templates for
2682 configuring VMs over VLANs.
2683
2684 <footnote>
2685
2686 <para>
2687 Support for Crossbow based bridged networking was introduced
2688 with VirtualBox 4.1 and requires Solaris 11 build 159 or
2689 above.
2690 </para>
2691
2692 </footnote>
2693
2694 A VirtualBox VNIC template is a VNIC whose name starts with
2695 "vboxvnic_template". The string is case-sensitive.
2696 </para>
2697
2698 <para>
2699 On Solaris 11 hosts, a VNIC template may be used to specify the
2700 VLAN ID to use while bridging over a network link.
2701
2702 <footnote>
2703
2704 <para>
2705 When Crossbow based bridged networking is used.
2706 </para>
2707
2708 </footnote>
2709 </para>
2710
2711 <para>
2712 Here is an example of how to use a VNIC template to configure a VM
2713 over a VLAN. Create a VirtualBox VNIC template, by executing as
2714 root:
2715 </para>
2716
2717<screen>dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0</screen>
2718
2719 <para>
2720 This will create a temporary VNIC template over interface "nge0"
2721 with the VLAN ID 23. To create VNIC templates that are persistent
2722 across host reboots, skip the <computeroutput>-t</computeroutput>
2723 parameter in the above command. You may check the current state of
2724 links using:
2725 </para>
2726
2727 <para>
2728<screen>$ dladm show-link
2729LINK CLASS MTU STATE BRIDGE OVER
2730nge0 phys 1500 up -- --
2731nge1 phys 1500 down -- --
2732vboxvnic_template0 vnic 1500 up -- nge0
2733
2734$ dladm show-vnic
2735LINK OVER SPEED MACADDRESS MACADDRTYPE VID
2736vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23</screen>
2737 </para>
2738
2739 <para>
2740 Once the VNIC template is created, any VMs that need to be on VLAN
2741 23 over the interface "nge0" can be configured to bridge using
2742 this VNIC template.
2743 </para>
2744
2745 <para>
2746 VNIC templates makes managing VMs on VLANs simpler and efficient.
2747 The VLAN details are not stored as part of every VM's
2748 configuration but rather inherited from the VNIC template while
2749 starting the VM. The VNIC template itself can be modified anytime
2750 using <computeroutput>dladm</computeroutput>.
2751 </para>
2752
2753 <para>
2754 VNIC templates can be created with additional properties such as
2755 bandwidth limits, CPU fanout etc. Refer to your Solaris network
2756 documentation on how to accomplish this. These additional
2757 properties, if any, are also applied to VMs which bridge using the
2758 VNIC template.
2759 </para>
2760
2761 </sect1>
2762
2763 <sect1 id="addhostonlysolaris">
2764
2765 <title>Configuring Multiple Host-Only Network Interfaces on Solaris Hosts</title>
2766
2767 <para>
2768 By default VirtualBox provides you with one host-only network
2769 interface. Adding more host-only network interfaces on Solaris
2770 hosts requires manual configuration. Here is how to add another
2771 host-only network interface.
2772 </para>
2773
2774 <para>
2775 Begin by stopping all running VMs. Then, unplumb the existing
2776 "vboxnet0" interface by execute the following command as root:
2777 </para>
2778
2779<screen>ifconfig vboxnet0 unplumb</screen>
2780
2781 <para>
2782 If you have several vboxnet interfaces, you will need to unplumb
2783 all of them. Once all vboxnet interfaces are unplumbed, remove the
2784 driver by executing the following command as root:
2785 </para>
2786
2787<screen>rem_drv vboxnet</screen>
2788
2789 <para>
2790 Edit the file
2791 <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
2792 and add a line for the new interface we want to add as shown
2793 below:
2794 </para>
2795
2796<screen>name="vboxnet" parent="pseudo" instance=1;
2797name="vboxnet" parent="pseudo" instance=2;</screen>
2798
2799 <para>
2800 Add as many of these lines as required with each line having a
2801 unique instance number.
2802 </para>
2803
2804 <para>
2805 Next, reload the vboxnet driver by executing the following command
2806 as root:
2807 </para>
2808
2809<screen>add_drv vboxnet</screen>
2810
2811 <para>
2812 On Solaris 11.1 and newer hosts you may want to rename the default
2813 vanity interface name. To check what name has been assigned,
2814 execute:
2815 </para>
2816
2817<screen>dladm show-phys
2818LINK MEDIA STATE SPEED DUPLEX DEVICE
2819net0 Ethernet up 100 full e1000g0
2820net2 Ethernet up 1000 full vboxnet1
2821net1 Ethernet up 1000 full vboxnet0</screen>
2822
2823 <para>
2824 In the above example, we can rename "net2" to "vboxnet1" before
2825 proceeding to plumb the interface. This can be done by executing
2826 as root:
2827 </para>
2828
2829<screen>dladm rename-link net2 vboxnet1</screen>
2830
2831 <para>
2832 Now plumb all the interfaces using <computeroutput>ifconfig
2833 vboxnetX plumb</computeroutput>, where 'X' would be 1 in this
2834 case. Once the interface is plumbed, it may be configured like any
2835 other network interface. Refer to the
2836 <computeroutput>ifconfig</computeroutput> documentation for
2837 further details.
2838 </para>
2839
2840 <para>
2841 To make the settings for the newly added interfaces persistent
2842 across reboots, you will need to edit the files
2843 <computeroutput>/etc/inet/netmasks</computeroutput>, and if you
2844 are using NWAM <computeroutput>/etc/nwam/llp</computeroutput> and
2845 add the appropriate entries to set the netmask and static IP for
2846 each of those interfaces. The VirtualBox installer only updates
2847 these configuration files for the one "vboxnet0" interface it
2848 creates by default.
2849 </para>
2850
2851 </sect1>
2852
2853 <sect1 id="solariscodedumper">
2854
2855 <title>Configuring the VirtualBox CoreDumper on Solaris Hosts</title>
2856
2857 <para>
2858 VirtualBox is capable of producing its own core files for
2859 extensive debugging when things go wrong. Currently this is only
2860 available on Solaris hosts.
2861 </para>
2862
2863 <para>
2864 The VirtualBox CoreDumper can be enabled using the following
2865 command:
2866 </para>
2867
2868 <para>
2869<screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen>
2870 </para>
2871
2872 <para>
2873 You can specify which directory to use for core dumps with this
2874 command:
2875 </para>
2876
2877 <para>
2878<screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir &lt;path-to-directory&gt;</screen>
2879
2880 Make sure the directory you specify is on a volume with sufficient
2881 free space and that the VirtualBox process has sufficient
2882 permissions to write files to this directory. If you skip this
2883 command and do not specify any core dump directory, the current
2884 directory of the VirtualBox executable will be used. This would
2885 most likely fail when writing cores as they are protected with
2886 root permissions. It is recommended you explicitly set a core dump
2887 directory.
2888 </para>
2889
2890 <para>
2891 You must specify when the VirtualBox CoreDumper should be
2892 triggered. This is done using the following commands:
2893 </para>
2894
2895 <para>
2896<screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
2897VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>
2898
2899 At least one of the above two commands will have to be provided if
2900 you have enabled the VirtualBox CoreDumper.
2901 </para>
2902
2903 <para>
2904 Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
2905 sets up the VM to override the host's core dumping mechanism and
2906 in the event of any crash only the VirtualBox CoreDumper would
2907 produce the core file.
2908 </para>
2909
2910 <para>
2911 Setting <computeroutput>CoreDumpLive</computeroutput> sets up the
2912 VM to produce cores whenever the VM process receives a
2913 <computeroutput>SIGUSR2</computeroutput> signal. After producing
2914 the core file, the VM will not be terminated and will continue to
2915 run. You can thus take cores of the VM process using:
2916 </para>
2917
2918 <para>
2919<screen>kill -s SIGUSR2 &lt;VM-process-id&gt;</screen>
2920 </para>
2921
2922 <para>
2923 Core files produced by the VirtualBox CoreDumper are of the form
2924 <computeroutput>core.vb.&lt;ProcessName&gt;.&lt;ProcessID&gt;</computeroutput>,
2925 for example
2926 <computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.
2927 </para>
2928
2929 </sect1>
2930
2931 <sect1 id="vboxandsolzvmm">
2932
2933 <title>VirtualBox and Solaris Kernel Zones</title>
2934
2935 <para>
2936 Solaris kernel zones on x86-based systems make use of
2937 hardware-assisted virtualization features like VirtualBox does.
2938 However, for kernel zones and VirtualBox to share this hardware
2939 resource, they need to co-operate.
2940 </para>
2941
2942 <para>
2943 By default, due to performance reasons, VirtualBox acquires the
2944 hardware-assisted virtualization resource (VT-x/AMD-V) globally on
2945 the host machine and uses it until the last VirtualBox VM that
2946 requires it is powered off. This prevents other software from
2947 using VT-x/AMD-V during the time VirtualBox has taken control of
2948 it.
2949 </para>
2950
2951 <para>
2952 VirtualBox can be instructed to relinquish use of
2953 hardware-assisted virtualization features when not executing guest
2954 code, thereby allowing kernel zones to make use of them. To do
2955 this, shutdown all VirtualBox VMs and execute the following
2956 command:
2957 </para>
2958
2959<screen>VBoxManage setproperty hwvirtexclusive off</screen>
2960
2961 <para>
2962 This command needs to be executed only once as the setting is
2963 stored as part of the global VirtualBox settings which will
2964 continue to persist across host-reboots and VirtualBox upgrades.
2965 </para>
2966
2967 </sect1>
2968
2969 <sect1 id="guitweaks">
2970
2971 <title>Locking Down the VirtualBox GUI</title>
2972
2973 <sect2 id="customize-vm-manager">
2974
2975 <title>Customizing the VM Manager</title>
2976
2977 <para>
2978 There are several advanced customization settings for locking
2979 down the VirtualBox manager. Locking down means removing some
2980 features that the user should not see.
2981 </para>
2982
2983 <para>
2984<screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen>
2985 </para>
2986
2987 <para>
2988 where <computeroutput>OPTION</computeroutput> is one of the
2989 following keywords:
2990 </para>
2991
2992 <variablelist>
2993
2994 <varlistentry>
2995 <term>
2996 <computeroutput>noSelector</computeroutput>
2997 </term>
2998
2999 <listitem>
3000 <para>
3001 Do not allow users to start the VirtualBox manager. Trying
3002 to do so will show a window containing a proper error
3003 message.
3004 </para>
3005 </listitem>
3006 </varlistentry>
3007
3008 <varlistentry>
3009 <term>
3010 <computeroutput>noMenuBar</computeroutput>
3011 </term>
3012
3013 <listitem>
3014 <para>
3015 VM windows will not contain a menu bar.
3016 </para>
3017 </listitem>
3018 </varlistentry>
3019
3020 <varlistentry>
3021 <term>
3022 <computeroutput>noStatusBar</computeroutput>
3023 </term>
3024
3025 <listitem>
3026 <para>
3027 VM windows will not contain a status bar.
3028 </para>
3029 </listitem>
3030 </varlistentry>
3031
3032 </variablelist>
3033
3034 <para>
3035 To disable any of these VM manager customizations do
3036
3037<screen>VBoxManage setextradata global GUI/Customizations</screen>
3038 </para>
3039
3040 </sect2>
3041
3042 <sect2 id="customize-vm-selector">
3043
3044 <title>VM Selector Customization</title>
3045
3046 <para>
3047 The following per-machine VM extradata settings can be used to
3048 change the behavior of the VM selector window in respect of
3049 certain VMs:
3050 </para>
3051
3052<screen>VBoxManage setextradata "VM name" SETTING true</screen>
3053
3054 <para>
3055 where <computeroutput>SETTING</computeroutput> can be:
3056 </para>
3057
3058 <variablelist>
3059
3060 <varlistentry>
3061 <term>
3062 <computeroutput>GUI/HideDetails</computeroutput>
3063 </term>
3064
3065 <listitem>
3066 <para>
3067 Do not show the VM configuration of a certain VM. The
3068 details window will remain just empty if this VM is
3069 selected.
3070 </para>
3071 </listitem>
3072 </varlistentry>
3073
3074 <varlistentry>
3075 <term>
3076 <computeroutput>GUI/PreventReconfiguration</computeroutput>
3077 </term>
3078
3079 <listitem>
3080 <para>
3081 Do not allow the user to open the settings dialog for a
3082 certain VM.
3083 </para>
3084 </listitem>
3085 </varlistentry>
3086
3087 <varlistentry>
3088 <term>
3089 <computeroutput>GUI/PreventSnapshotOperations</computeroutput>
3090 </term>
3091
3092 <listitem>
3093 <para>
3094 Prevent snapshot operations for a VM from the GUI, either
3095 at runtime or when the VM is powered off.
3096 </para>
3097 </listitem>
3098 </varlistentry>
3099
3100 <varlistentry>
3101 <term>
3102 <computeroutput>GUI/HideFromManager</computeroutput>
3103 </term>
3104
3105 <listitem>
3106 <para>
3107 Hide a certain VM in the VM selector window.
3108 </para>
3109 </listitem>
3110 </varlistentry>
3111
3112 <varlistentry>
3113 <term>
3114 <computeroutput>GUI/PreventApplicationUpdate</computeroutput>
3115 </term>
3116
3117 <listitem>
3118 <para>
3119 Disable the automatic update check and hide the
3120 corresponding menu item.
3121 </para>
3122 </listitem>
3123 </varlistentry>
3124
3125 </variablelist>
3126
3127 <para>
3128 Please note that these settings would not prevent the user from
3129 reconfiguring the VM by <computeroutput>VBoxManage
3130 modifyvm</computeroutput>.
3131 </para>
3132
3133 </sect2>
3134
3135 <sect2 id="config-vm-selector-menu">
3136
3137 <title>Configure VM Selector Menu Entries</title>
3138
3139 <para>
3140 You can disable, or blacklist, certain entries in the global
3141 settings page of the VM selector:
3142 </para>
3143
3144<screen>VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages OPTION[,OPTION...]</screen>
3145
3146 <para>
3147 where <computeroutput>OPTION</computeroutput> is one of the
3148 following keywords:
3149 </para>
3150
3151 <variablelist>
3152
3153 <varlistentry>
3154 <term>
3155 <computeroutput>General</computeroutput>
3156 </term>
3157
3158 <listitem>
3159 <para>
3160 Do not show the <emphasis>General</emphasis> settings
3161 pane.
3162 </para>
3163 </listitem>
3164 </varlistentry>
3165
3166 <varlistentry>
3167 <term>
3168 <computeroutput>Input</computeroutput>
3169 </term>
3170
3171 <listitem>
3172 <para>
3173 Do not show the <emphasis>Input</emphasis> settings pane.
3174 </para>
3175 </listitem>
3176 </varlistentry>
3177
3178 <varlistentry>
3179 <term>
3180 <computeroutput>Update</computeroutput>
3181 </term>
3182
3183 <listitem>
3184 <para>
3185 Do not show the <emphasis>Update</emphasis> settings pane.
3186 </para>
3187 </listitem>
3188 </varlistentry>
3189
3190 <varlistentry>
3191 <term>
3192 <computeroutput>Language</computeroutput>
3193 </term>
3194
3195 <listitem>
3196 <para>
3197 Do not show the <emphasis>Language</emphasis> settings
3198 pane.
3199 </para>
3200 </listitem>
3201 </varlistentry>
3202
3203 <varlistentry>
3204 <term>
3205 <computeroutput>Display</computeroutput>
3206 </term>
3207
3208 <listitem>
3209 <para>
3210 Do not show the <emphasis>Display</emphasis> settings
3211 pane.
3212 </para>
3213 </listitem>
3214 </varlistentry>
3215
3216 <varlistentry>
3217 <term>
3218 <computeroutput>Network</computeroutput>
3219 </term>
3220
3221 <listitem>
3222 <para>
3223 Do not show the <emphasis>Network</emphasis> settings
3224 pane.
3225 </para>
3226 </listitem>
3227 </varlistentry>
3228
3229 <varlistentry>
3230 <term>
3231 <computeroutput>Extensions</computeroutput>
3232 </term>
3233
3234 <listitem>
3235 <para>
3236 Do not show the <emphasis>Extensions</emphasis> settings
3237 pane.
3238 </para>
3239 </listitem>
3240 </varlistentry>
3241
3242 <varlistentry>
3243 <term>
3244 <computeroutput>Proxy</computeroutput>
3245 </term>
3246
3247 <listitem>
3248 <para>
3249 Do not show the <emphasis>Proxy</emphasis> settings pane.
3250 </para>
3251 </listitem>
3252 </varlistentry>
3253
3254 </variablelist>
3255
3256 <para>
3257 This is a global setting. Any combination of the above is
3258 allowed. To restore the default behavior, use
3259 </para>
3260
3261<screen>VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages</screen>
3262
3263 </sect2>
3264
3265 <sect2 id="config-vm-window-menu">
3266
3267 <title>Configure VM Window Menu Entries</title>
3268
3269 <para>
3270 You can disable, or blacklist, certain menu actions in the VM
3271 window:
3272 </para>
3273
3274<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus OPTION[,OPTION...]</screen>
3275
3276 <para>
3277 where <computeroutput>OPTION</computeroutput> is one of the
3278 following keywords:
3279 </para>
3280
3281 <variablelist>
3282
3283 <varlistentry>
3284 <term>
3285 <computeroutput>All</computeroutput>
3286 </term>
3287
3288 <listitem>
3289 <para>
3290 Do not show any menu in the VM window.
3291 </para>
3292 </listitem>
3293 </varlistentry>
3294
3295 <varlistentry>
3296 <term>
3297 <computeroutput>Machine</computeroutput>
3298 </term>
3299
3300 <listitem>
3301 <para>
3302 Do not show the <emphasis>Machine</emphasis> menu in the
3303 VM window.
3304 </para>
3305 </listitem>
3306 </varlistentry>
3307
3308 <varlistentry>
3309 <term>
3310 <computeroutput>View</computeroutput>
3311 </term>
3312
3313 <listitem>
3314 <para>
3315 Do not show the <emphasis>View</emphasis> menu in the VM
3316 window.
3317 </para>
3318 </listitem>
3319 </varlistentry>
3320
3321 <varlistentry>
3322 <term>
3323 <computeroutput>Devices</computeroutput>
3324 </term>
3325
3326 <listitem>
3327 <para>
3328 Do not show the <emphasis>Devices</emphasis> menu in the
3329 VM window.
3330 </para>
3331 </listitem>
3332 </varlistentry>
3333
3334 <varlistentry>
3335 <term>
3336 <computeroutput>Help</computeroutput>
3337 </term>
3338
3339 <listitem>
3340 <para>
3341 Do not show the <emphasis>Help</emphasis> menu in the VM
3342 window.
3343 </para>
3344 </listitem>
3345 </varlistentry>
3346
3347 <varlistentry>
3348 <term>
3349 <computeroutput>Debug</computeroutput>
3350 </term>
3351
3352 <listitem>
3353 <para>
3354 Do not show the <emphasis>Debug</emphasis> menu in the VM
3355 window. The debug menu is only visible if the GUI was
3356 started with special command line parameters or
3357 environment variable settings.
3358 </para>
3359 </listitem>
3360 </varlistentry>
3361
3362 </variablelist>
3363
3364 <para>
3365 This is a per-VM setting. Any combination of the above is
3366 allowed. To restore the default behavior, use
3367 </para>
3368
3369<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus</screen>
3370
3371 <para>
3372 You can also disable, or blacklist, certain menu actions of
3373 certain menus. Use the following command to disable certain
3374 actions of the <emphasis>Application</emphasis> menu. This is
3375 only available on Mac OS X hosts.
3376 </para>
3377
3378<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
3379
3380 <para>
3381 where <computeroutput>OPTION</computeroutput> is one of the
3382 following keywords:
3383 </para>
3384
3385 <variablelist>
3386
3387 <varlistentry>
3388 <term>
3389 <computeroutput>All</computeroutput>
3390 </term>
3391
3392 <listitem>
3393 <para>
3394 Do not show any menu item in this menu.
3395 </para>
3396 </listitem>
3397 </varlistentry>
3398
3399 <varlistentry>
3400 <term>
3401 <computeroutput>About</computeroutput>
3402 </term>
3403
3404 <listitem>
3405 <para>
3406 Do not show the <emphasis>About</emphasis> menu item in
3407 this menu.
3408 </para>
3409 </listitem>
3410 </varlistentry>
3411
3412 </variablelist>
3413
3414 <para>
3415 This is a per-VM setting. Any combination of the above is
3416 allowed. To restore the default behavior, use
3417 </para>
3418
3419<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus</screen>
3420
3421 <para>
3422 Use the following command to disable certain actions of the
3423 <emphasis>Machine</emphasis> menu:
3424 </para>
3425
3426<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
3427
3428 <para>
3429 where <computeroutput>OPTION</computeroutput> is one of the
3430 following keywords:
3431 </para>
3432
3433 <variablelist>
3434
3435 <varlistentry>
3436 <term>
3437 <computeroutput>All</computeroutput>
3438 </term>
3439
3440 <listitem>
3441 <para>
3442 Do not show any menu item in this menu.
3443 </para>
3444 </listitem>
3445 </varlistentry>
3446
3447 <varlistentry>
3448 <term>
3449 <computeroutput>SettingsDialog</computeroutput>
3450 </term>
3451
3452 <listitem>
3453 <para>
3454 Do not show the <emphasis>Settings</emphasis> menu item in
3455 this menu.
3456 </para>
3457 </listitem>
3458 </varlistentry>
3459
3460 <varlistentry>
3461 <term>
3462 <computeroutput>TakeSnapshot</computeroutput>
3463 </term>
3464
3465 <listitem>
3466 <para>
3467 Do not show the <emphasis>Take Snapshot</emphasis> menu
3468 item in this menu.
3469 </para>
3470 </listitem>
3471 </varlistentry>
3472
3473 <varlistentry>
3474 <term>
3475 <computeroutput>TakeScreenshot</computeroutput>
3476 </term>
3477
3478 <listitem>
3479 <para>
3480 Do not show the <emphasis>Take Screenshot</emphasis> menu
3481 item in this menu.
3482 </para>
3483 </listitem>
3484 </varlistentry>
3485
3486 <varlistentry>
3487 <term>
3488 <computeroutput>InformationDialog</computeroutput>
3489 </term>
3490
3491 <listitem>
3492 <para>
3493 Do not show the <emphasis>Session Information</emphasis>
3494 menu item in this menu.
3495 </para>
3496 </listitem>
3497 </varlistentry>
3498
3499 <varlistentry>
3500 <term>
3501 <computeroutput>MouseIntegration</computeroutput>
3502 </term>
3503
3504 <listitem>
3505 <para>
3506 Do not show the <emphasis>Disable Mouse
3507 Integration</emphasis> menu item in this menu.
3508 </para>
3509 </listitem>
3510 </varlistentry>
3511
3512 <varlistentry>
3513 <term>
3514 <computeroutput>TypeCAD</computeroutput>
3515 </term>
3516
3517 <listitem>
3518 <para>
3519 Do not show the <emphasis>Insert Ctrl+Alt+Del</emphasis>
3520 menu item in this menu.
3521 </para>
3522 </listitem>
3523 </varlistentry>
3524
3525 <varlistentry>
3526 <term>
3527 <computeroutput>TypeCABS</computeroutput>
3528 </term>
3529
3530 <listitem>
3531 <para>
3532 Do not show the <emphasis>Insert
3533 Ctrl+Alt+Backspace</emphasis> menu item in this menu.
3534 Available on X11 hosts only.
3535 </para>
3536 </listitem>
3537 </varlistentry>
3538
3539 <varlistentry>
3540 <term>
3541 <computeroutput>Pause</computeroutput>
3542 </term>
3543
3544 <listitem>
3545 <para>
3546 Do not show the <emphasis>Pause</emphasis> menu item in
3547 this menu.
3548 </para>
3549 </listitem>
3550 </varlistentry>
3551
3552 <varlistentry>
3553 <term>
3554 <computeroutput>Reset</computeroutput>
3555 </term>
3556
3557 <listitem>
3558 <para>
3559 Do not show the <emphasis>Reset</emphasis> menu item in
3560 this menu.
3561 </para>
3562 </listitem>
3563 </varlistentry>
3564
3565 <varlistentry>
3566 <term>
3567 <computeroutput>SaveState</computeroutput>
3568 </term>
3569
3570 <listitem>
3571 <para>
3572 Do not show the <emphasis>Save the machine
3573 state</emphasis> menu item in this menu.
3574 </para>
3575 </listitem>
3576 </varlistentry>
3577
3578 <varlistentry>
3579 <term>
3580 <computeroutput>Shutdown</computeroutput>
3581 </term>
3582
3583 <listitem>
3584 <para>
3585 Do not show the <emphasis>ACPI Shutdown</emphasis> menu
3586 item in this menu.
3587 </para>
3588 </listitem>
3589 </varlistentry>
3590
3591 <varlistentry>
3592 <term>
3593 <computeroutput>PowerOff</computeroutput>
3594 </term>
3595
3596 <listitem>
3597 <para>
3598 Do not show the <emphasis>Power Off the machine</emphasis>
3599 menu item in this menu.
3600 </para>
3601 </listitem>
3602 </varlistentry>
3603
3604 </variablelist>
3605
3606 <para>
3607 This is a per-VM setting. Any combination of the above is
3608 allowed. To restore the default behavior, use
3609 </para>
3610
3611<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions</screen>
3612
3613 <para>
3614 Use the following command to disable certain actions of the
3615 <emphasis>View</emphasis> menu:
3616 </para>
3617
3618<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeViewMenuActions OPTION[,OPTION...]</screen>
3619
3620 <para>
3621 where <computeroutput>OPTION</computeroutput> is one of the
3622 following keywords:
3623 </para>
3624
3625 <variablelist>
3626
3627 <varlistentry>
3628 <term>
3629 <computeroutput>All</computeroutput>
3630 </term>
3631
3632 <listitem>
3633 <para>
3634 Do not show any menu item in this menu.
3635 </para>
3636 </listitem>
3637 </varlistentry>
3638
3639 <varlistentry>
3640 <term>
3641 <computeroutput>Fullscreen</computeroutput>
3642 </term>
3643
3644 <listitem>
3645 <para>
3646 Do not show the <emphasis>Switch to Fullscreen</emphasis>
3647 menu item in this menu.
3648 </para>
3649 </listitem>
3650 </varlistentry>
3651
3652 <varlistentry>
3653 <term>
3654 <computeroutput>Seamless</computeroutput>
3655 </term>
3656
3657 <listitem>
3658 <para>
3659 Do not show the <emphasis>Switch to Seamless
3660 Mode</emphasis> menu item in this menu.
3661 </para>
3662 </listitem>
3663 </varlistentry>
3664
3665 <varlistentry>
3666 <term>
3667 <computeroutput>Scale</computeroutput>
3668 </term>
3669
3670 <listitem>
3671 <para>
3672 Do not show the <emphasis>Switch to Scaled Mode</emphasis>
3673 menu item in this menu.
3674 </para>
3675 </listitem>
3676 </varlistentry>
3677
3678 <varlistentry>
3679 <term>
3680 <computeroutput>GuestAutoresize</computeroutput>
3681 </term>
3682
3683 <listitem>
3684 <para>
3685 Do not show the <emphasis>Auto-resize Guest
3686 Display</emphasis> menu item in this menu.
3687 </para>
3688 </listitem>
3689 </varlistentry>
3690
3691 <varlistentry>
3692 <term>
3693 <computeroutput>AdjustWindow</computeroutput>
3694 </term>
3695
3696 <listitem>
3697 <para>
3698 Do not show the <emphasis>Adjust Window Size</emphasis>
3699 menu item in this menu.
3700 </para>
3701 </listitem>
3702 </varlistentry>
3703
3704 <varlistentry>
3705 <term>
3706 <computeroutput>Multiscreen</computeroutput>
3707 </term>
3708
3709 <listitem>
3710 <para>
3711 Do not show the <emphasis>Multiscreen</emphasis> menu item
3712 in this menu. Only visible in full screen/seamless mode.
3713 </para>
3714 </listitem>
3715 </varlistentry>
3716
3717 </variablelist>
3718
3719 <para>
3720 This is a per-VM setting. Any combination of the above is
3721 allowed. To restore the default behavior, use
3722 </para>
3723
3724<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeViewMenuActions</screen>
3725
3726 <para>
3727 Use the following command to disable certain actions of the
3728 <emphasis>View</emphasis> menu:
3729 </para>
3730
3731<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDevicesMenuActions OPTION[,OPTION...]</screen>
3732
3733 <para>
3734 where <computeroutput>OPTION</computeroutput> is one of the
3735 following keywords to disable actions in the
3736 <emphasis>Devices</emphasis> menu:
3737 </para>
3738
3739 <variablelist>
3740
3741 <varlistentry>
3742 <term>
3743 <computeroutput>All</computeroutput>
3744 </term>
3745
3746 <listitem>
3747 <para>
3748 Do not show any menu item in this menu.
3749 </para>
3750 </listitem>
3751 </varlistentry>
3752
3753 <varlistentry>
3754 <term>
3755 <computeroutput>OpticalDevices</computeroutput>
3756 </term>
3757
3758 <listitem>
3759 <para>
3760 Do not show the <emphasis>CD/DVD Devices</emphasis> menu
3761 item in this menu.
3762 </para>
3763 </listitem>
3764 </varlistentry>
3765
3766 <varlistentry>
3767 <term>
3768 <computeroutput>FloppyDevices</computeroutput>
3769 </term>
3770
3771 <listitem>
3772 <para>
3773 Do not show the <emphasis>Floppy Devices</emphasis> menu
3774 item in this menu.
3775 </para>
3776 </listitem>
3777 </varlistentry>
3778
3779 <varlistentry>
3780 <term>
3781 <computeroutput>USBDevices</computeroutput>
3782 </term>
3783
3784 <listitem>
3785 <para>
3786 Do not show the <emphasis>USB Devices</emphasis> menu item
3787 in this menu.
3788 </para>
3789 </listitem>
3790 </varlistentry>
3791
3792 <varlistentry>
3793 <term>
3794 <computeroutput>SharedClipboard</computeroutput>
3795 </term>
3796
3797 <listitem>
3798 <para>
3799 Do not show the <emphasis>Shared Clipboard</emphasis> menu
3800 item in this menu.
3801 </para>
3802 </listitem>
3803 </varlistentry>
3804
3805 <varlistentry>
3806 <term>
3807 <computeroutput>DragAndDrop</computeroutput>
3808 </term>
3809
3810 <listitem>
3811 <para>
3812 Do not show the <emphasis>Drag and Drop</emphasis> menu
3813 item in this menu.
3814 </para>
3815 </listitem>
3816 </varlistentry>
3817
3818 <varlistentry>
3819 <term>
3820 <computeroutput>NetworkSettings</computeroutput>
3821 </term>
3822
3823 <listitem>
3824 <para>
3825 Do not show the <emphasis>Network Settings...</emphasis>
3826 menu item in this menu.
3827 </para>
3828 </listitem>
3829 </varlistentry>
3830
3831 <varlistentry>
3832 <term>
3833 <computeroutput>SharedFoldersSettings</computeroutput>
3834 </term>
3835
3836 <listitem>
3837 <para>
3838 Do not show the <emphasis>Shared Folders
3839 Settings...</emphasis> menu item in this menu.
3840 </para>
3841 </listitem>
3842 </varlistentry>
3843
3844 <varlistentry>
3845 <term>
3846 <computeroutput>VRDEServer</computeroutput>
3847 </term>
3848
3849 <listitem>
3850 <para>
3851 Do not show the <emphasis>Remove Display</emphasis> menu
3852 item in this menu.
3853 </para>
3854 </listitem>
3855 </varlistentry>
3856
3857 <varlistentry>
3858 <term>
3859 <computeroutput>InstallGuestTools</computeroutput>
3860 </term>
3861
3862 <listitem>
3863 <para>
3864 Do not show the <emphasis>Insert Guest Additions CD
3865 image...</emphasis> menu item in this menu.
3866 </para>
3867 </listitem>
3868 </varlistentry>
3869
3870 </variablelist>
3871
3872 <para>
3873 This is a per-VM setting. Any combination of the above is
3874 allowed. To restore the default behavior, use
3875 </para>
3876
3877<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDevicesMenuActions</screen>
3878
3879 <para>
3880 Use the following command to disable certain actions of the
3881 <emphasis>View</emphasis> menu:
3882 </para>
3883
3884<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDebuggerMenuActions OPTION[,OPTION...]</screen>
3885
3886 <para>
3887 where <computeroutput>OPTION</computeroutput> is one of the
3888 following keywords to disable actions in the
3889 <emphasis>Debug</emphasis> menu, which is normally completely
3890 disabled:
3891 </para>
3892
3893 <variablelist>
3894
3895 <varlistentry>
3896 <term>
3897 <computeroutput>All</computeroutput>
3898 </term>
3899
3900 <listitem>
3901 <para>
3902 Do not show any menu item in this menu.
3903 </para>
3904 </listitem>
3905 </varlistentry>
3906
3907 <varlistentry>
3908 <term>
3909 <computeroutput>Statistics</computeroutput>
3910 </term>
3911
3912 <listitem>
3913 <para>
3914 Do not show the <emphasis>Statistics...</emphasis> menu
3915 item in this menu.
3916 </para>
3917 </listitem>
3918 </varlistentry>
3919
3920 <varlistentry>
3921 <term>
3922 <computeroutput>CommandLine</computeroutput>
3923 </term>
3924
3925 <listitem>
3926 <para>
3927 Do not show the <emphasis>Command Line...</emphasis> menu
3928 item in this menu.
3929 </para>
3930 </listitem>
3931 </varlistentry>
3932
3933 <varlistentry>
3934 <term>
3935 <computeroutput>Logging</computeroutput>
3936 </term>
3937
3938 <listitem>
3939 <para>
3940 Do not show the <emphasis>Logging...</emphasis> menu item
3941 in this menu.
3942 </para>
3943 </listitem>
3944 </varlistentry>
3945
3946 <varlistentry>
3947 <term>
3948 <computeroutput>LogDialog</computeroutput>
3949 </term>
3950
3951 <listitem>
3952 <para>
3953 Do not show the <emphasis>Show Log...</emphasis> menu item
3954 in this menu.
3955 </para>
3956 </listitem>
3957 </varlistentry>
3958
3959 </variablelist>
3960
3961 <para>
3962 This is a per-VM setting. Any combination of the above is
3963 allowed. To restore the default behavior, use
3964 </para>
3965
3966<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDebuggerMenuActions</screen>
3967
3968 <para>
3969 Use the following command to disable certain actions of the
3970 <emphasis>View</emphasis> menu:
3971 </para>
3972
3973<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeHelpMenuActions OPTION[,OPTION...]</screen>
3974
3975 <para>
3976 where <computeroutput>OPTION</computeroutput> is one of the
3977 following keywords to disable actions in the
3978 <emphasis>Help</emphasis> menu, which is normally completely
3979 disabled:
3980 </para>
3981
3982 <variablelist>
3983
3984 <varlistentry>
3985 <term>
3986 <computeroutput>All</computeroutput>
3987 </term>
3988
3989 <listitem>
3990 <para>
3991 Do not show any menu item in this menu.
3992 </para>
3993 </listitem>
3994 </varlistentry>
3995
3996 <varlistentry>
3997 <term>
3998 <computeroutput>Contents</computeroutput>
3999 </term>
4000
4001 <listitem>
4002 <para>
4003 Do not show the <emphasis>Contents...</emphasis> menu item
4004 in this menu.
4005 </para>
4006 </listitem>
4007 </varlistentry>
4008
4009 <varlistentry>
4010 <term>
4011 <computeroutput>WebSite</computeroutput>
4012 </term>
4013
4014 <listitem>
4015 <para>
4016 Do not show the <emphasis>VirtualBox Web
4017 Site...</emphasis> menu item in this menu.
4018 </para>
4019 </listitem>
4020 </varlistentry>
4021
4022 <varlistentry>
4023 <term>
4024 <computeroutput>ResetWarnings</computeroutput>
4025 </term>
4026
4027 <listitem>
4028 <para>
4029 Do not show the <emphasis>Reset All Warnings</emphasis>
4030 menu item in this menu.
4031 </para>
4032 </listitem>
4033 </varlistentry>
4034
4035 <varlistentry>
4036 <term>
4037 <computeroutput>NetworkAccessManager</computeroutput>
4038 </term>
4039
4040 <listitem>
4041 <para>
4042 Do not show the <emphasis>Network Operations
4043 Manager</emphasis> menu item in this menu.
4044 </para>
4045 </listitem>
4046 </varlistentry>
4047
4048 <varlistentry>
4049 <term>
4050 <computeroutput>About</computeroutput>
4051 </term>
4052
4053 <listitem>
4054 <para>
4055 Do not show the <emphasis>About</emphasis> menu item in
4056 this menu. Only for non-Mac OS X hosts.
4057 </para>
4058 </listitem>
4059 </varlistentry>
4060
4061 <varlistentry>
4062 <term>
4063 <computeroutput>Contents</computeroutput>
4064 </term>
4065
4066 <listitem>
4067 <para>
4068 Do not show the <emphasis>Contents...</emphasis> menu item
4069 in this menu.
4070 </para>
4071 </listitem>
4072 </varlistentry>
4073
4074 <varlistentry>
4075 <term>
4076 <computeroutput>Contents</computeroutput>
4077 </term>
4078
4079 <listitem>
4080 <para>
4081 Do not show the <emphasis>Contents...</emphasis> menu item
4082 in this menu.
4083 </para>
4084 </listitem>
4085 </varlistentry>
4086
4087 </variablelist>
4088
4089 <para>
4090 This is a per-VM setting. Any combination of the above is
4091 allowed. To restore the default behavior, use
4092 </para>
4093
4094<screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeHelpMenuActions</screen>
4095
4096 </sect2>
4097
4098 <sect2 id="config-vm-window-status-bar">
4099
4100 <title>Configure VM Window Status Bar Entries</title>
4101
4102 <para>
4103 You can disable, or blacklist, certain status bar items:
4104 </para>
4105
4106<screen>VBoxManage setextradata "VM name" GUI/RestrictedStatusBarIndicators OPTION[,OPTION...]</screen>
4107
4108 <para>
4109 where <computeroutput>OPTION</computeroutput> is one of the
4110 following keywords:
4111 </para>
4112
4113 <variablelist>
4114
4115 <varlistentry>
4116 <term>
4117 <computeroutput>HardDisks</computeroutput>
4118 </term>
4119
4120 <listitem>
4121 <para>
4122 Do not show the hard disk icon in the VM window status
4123 bar. By default the hard disk icon is only shown if the VM
4124 configuration contains one or more hard disks.
4125 </para>
4126 </listitem>
4127 </varlistentry>
4128
4129 <varlistentry>
4130 <term>
4131 <computeroutput>OpticalDisks</computeroutput>
4132 </term>
4133
4134 <listitem>
4135 <para>
4136 Do not show the CD icon in the VM window status bar. By
4137 default the CD icon is only shown if the VM configuration
4138 contains one or more CD drives.
4139 </para>
4140 </listitem>
4141 </varlistentry>
4142
4143 <varlistentry>
4144 <term>
4145 <computeroutput>FloppyDisks</computeroutput>
4146 </term>
4147
4148 <listitem>
4149 <para>
4150 Do not show the floppy icon in the VM window status bar.
4151 By default the floppy icon is only shown if the VM
4152 configuration contains one or more floppy drives.
4153 </para>
4154 </listitem>
4155 </varlistentry>
4156
4157 <varlistentry>
4158 <term>
4159 <computeroutput>Network</computeroutput>
4160 </term>
4161
4162 <listitem>
4163 <para>
4164 Do not show the network icon in the VM window status bar.
4165 By default the network icon is only shown if the VM
4166 configuration contains one or more active network
4167 adapters.
4168 </para>
4169 </listitem>
4170 </varlistentry>
4171
4172 <varlistentry>
4173 <term>
4174 <computeroutput>USB</computeroutput>
4175 </term>
4176
4177 <listitem>
4178 <para>
4179 Do not show the USB icon in the status bar.
4180 </para>
4181 </listitem>
4182 </varlistentry>
4183
4184 <varlistentry>
4185 <term>
4186 <computeroutput>SharedFolders</computeroutput>
4187 </term>
4188
4189 <listitem>
4190 <para>
4191 Do not show the shared folders icon in the status bar.
4192 </para>
4193 </listitem>
4194 </varlistentry>
4195
4196 <varlistentry>
4197 <term>
4198 <computeroutput>VideoCapture</computeroutput>
4199 </term>
4200
4201 <listitem>
4202 <para>
4203 Do not show the video capture icon in the status bar.
4204 </para>
4205 </listitem>
4206 </varlistentry>
4207
4208 <varlistentry>
4209 <term>
4210 <computeroutput>Features</computeroutput>
4211 </term>
4212
4213 <listitem>
4214 <para>
4215 Do not show the CPU features icon in the status bar.
4216 </para>
4217 </listitem>
4218 </varlistentry>
4219
4220 <varlistentry>
4221 <term>
4222 <computeroutput>Mouse</computeroutput>
4223 </term>
4224
4225 <listitem>
4226 <para>
4227 Do not show the mouse icon in the status bar.
4228 </para>
4229 </listitem>
4230 </varlistentry>
4231
4232 <varlistentry>
4233 <term>
4234 <computeroutput>Keyboard</computeroutput>
4235 </term>
4236
4237 <listitem>
4238 <para>
4239 Do not show the keyboard icon in the status bar.
4240 </para>
4241 </listitem>
4242 </varlistentry>
4243
4244 </variablelist>
4245
4246 <para>
4247 This is a per-VM setting. Any combination of the above is
4248 allowed. If all options are specified, no icons are displayed in
4249 the status bar of the VM window. To restore the default
4250 behavior, use
4251 </para>
4252
4253<screen>VBoxManage setextradata "VM name" GUI/RestrictedStatusBarIndicators</screen>
4254
4255 </sect2>
4256
4257 <sect2 id="config-vm-window-visual-modes">
4258
4259 <title>Configure VM Window Visual Modes</title>
4260
4261 <para>
4262 You can disable, or blacklist, certain VM visual modes:
4263 </para>
4264
4265<screen>VBoxManage setextradata "VM name" GUI/RestrictedVisualStates OPTION[,OPTION...]</screen>
4266
4267 <para>
4268 where <computeroutput>OPTION</computeroutput> is one of the
4269 following keywords:
4270 </para>
4271
4272 <variablelist>
4273
4274 <varlistentry>
4275 <term>
4276 <computeroutput>Fullscreen</computeroutput>
4277 </term>
4278
4279 <listitem>
4280 <para>
4281 Do not allow to switch the VM into full screen mode.
4282 </para>
4283 </listitem>
4284 </varlistentry>
4285
4286 <varlistentry>
4287 <term>
4288 <computeroutput>Seamless</computeroutput>
4289 </term>
4290
4291 <listitem>
4292 <para>
4293 Do not allow to switch the VM into seamless mode.
4294 </para>
4295 </listitem>
4296 </varlistentry>
4297
4298 <varlistentry>
4299 <term>
4300 <computeroutput>Scale</computeroutput>
4301 </term>
4302
4303 <listitem>
4304 <para>
4305 Do not allow to switch the VM into scale mode.
4306 </para>
4307 </listitem>
4308 </varlistentry>
4309
4310 </variablelist>
4311
4312 <para>
4313 This is a per-VM setting. Any combination of the above is
4314 allowed. To restore the default behavior, use
4315 </para>
4316
4317<screen>VBoxManage setextradata "VM name" GUI/RestrictedVisualStates</screen>
4318
4319 </sect2>
4320
4321 <sect2 id="host-key-customize">
4322
4323 <title>Host Key Customization</title>
4324
4325 <para>
4326 To disable all Host key combinations, open the preferences and
4327 change the Host key to None. This might be useful when using
4328 VirtualBox in a kiosk mode.
4329 </para>
4330
4331 <para>
4332 To redefine or disable certain Host key actions, use the
4333 following command:
4334 </para>
4335
4336<screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=F,...."</screen>
4337
4338 <para>
4339 <xref linkend="table-host-key-customize"/> shows the possible
4340 Host key actions, together with their default Host key shortcut.
4341 Setting an action to None will disable that Host key action.
4342 </para>
4343
4344 <table id="table-host-key-customize">
4345 <title>Host Key Customization</title>
4346 <tgroup cols="3">
4347 <thead>
4348 <row>
4349 <entry><emphasis role="bold">Action</emphasis></entry>
4350 <entry><emphasis role="bold">Default Key</emphasis></entry>
4351 <entry><emphasis role="bold">Action</emphasis></entry>
4352 </row>
4353 </thead>
4354 <tbody>
4355 <row>
4356 <entry><computeroutput>TakeSnapshot</computeroutput></entry>
4357 <entry>T</entry>
4358 <entry>Take a snapshot</entry>
4359 </row>
4360 <row>
4361 <entry><computeroutput>TakeScreenshot</computeroutput></entry>
4362 <entry>E</entry>
4363 <entry>Take a screenshot</entry>
4364 </row>
4365 <row>
4366 <entry><computeroutput>MouseIntegration</computeroutput></entry>
4367 <entry>I</entry>
4368 <entry>Toggle mouse integration</entry>
4369 </row>
4370 <row>
4371 <entry><computeroutput>TypeCAD</computeroutput></entry>
4372 <entry>Del</entry>
4373 <entry>Inject Ctrl+Alt+Del</entry>
4374 </row>
4375 <row>
4376 <entry><computeroutput>TypeCABS</computeroutput></entry>
4377 <entry>Backspace</entry>
4378 <entry>Inject Ctrl+Alt+Backspace</entry>
4379 </row>
4380 <row>
4381 <entry><computeroutput>Pause</computeroutput></entry>
4382 <entry>P</entry>
4383 <entry>Pause the VM</entry>
4384 </row>
4385 <row>
4386 <entry><computeroutput>Reset</computeroutput></entry>
4387 <entry>R</entry>
4388 <entry>Hard reset the guest</entry>
4389 </row>
4390 <row>
4391 <entry><computeroutput>SaveState</computeroutput></entry>
4392 <entry></entry>
4393 <entry>Save the VM state and terminate the VM</entry>
4394 </row>
4395 <row>
4396 <entry><computeroutput>Shutdown</computeroutput></entry>
4397 <entry>H</entry>
4398 <entry>Press the (virtual) ACPI power button</entry>
4399 </row>
4400 <row>
4401 <entry><computeroutput>PowerOff</computeroutput></entry>
4402 <entry></entry>
4403 <entry>Power the VM off, without saving the state</entry>
4404 </row>
4405 <row>
4406 <entry><computeroutput>Close</computeroutput></entry>
4407 <entry>Q</entry>
4408 <entry>Show the VM close dialog</entry>
4409 </row>
4410 <row>
4411 <entry><computeroutput>FullscreenMode</computeroutput></entry>
4412 <entry>F</entry>
4413 <entry>Switch the VM into full screen</entry>
4414 </row>
4415 <row>
4416 <entry><computeroutput>SeamlessMode</computeroutput></entry>
4417 <entry>L</entry>
4418 <entry>Switch the VM into seamless mode</entry>
4419 </row>
4420 <row>
4421 <entry><computeroutput>ScaleMode</computeroutput></entry>
4422 <entry>C</entry>
4423 <entry>Switch the VM into scale mode</entry>
4424 </row>
4425 <row>
4426 <entry><computeroutput>GuestAutoResize</computeroutput></entry>
4427 <entry>G</entry>
4428 <entry>Automatically resize the guest window</entry>
4429 </row>
4430 <row>
4431 <entry><computeroutput>WindowAdjust</computeroutput></entry>
4432 <entry>A</entry>
4433 <entry>Immediately resize the guest window</entry>
4434 </row>
4435 <row>
4436 <entry><computeroutput>PopupMenu</computeroutput></entry>
4437 <entry>Home</entry>
4438 <entry>Show popup menu in full screen / seaml. mode</entry>
4439 </row>
4440 <row>
4441 <entry><computeroutput>SettingsDialog</computeroutput></entry>
4442 <entry>S</entry>
4443 <entry>Open the VM settings dialog</entry>
4444 </row>
4445 <row>
4446 <entry><computeroutput>InformationDialog</computeroutput></entry>
4447 <entry>N</entry>
4448 <entry>Show the VM information window</entry>
4449 </row>
4450 <row>
4451 <entry><computeroutput>NetworkAdaptersDialog</computeroutput></entry>
4452 <entry></entry>
4453 <entry>Show the VM network adapters dialog</entry>
4454 </row>
4455 <row>
4456 <entry><computeroutput>SharedFoldersDialog</computeroutput></entry>
4457 <entry></entry>
4458 <entry>Show the VM shared folders dialog</entry>
4459 </row>
4460 <row>
4461 <entry><computeroutput>InstallGuestAdditions</computeroutput></entry>
4462 <entry>D</entry>
4463 <entry>Mount the ISO containing the Guest Additions</entry>
4464 </row>
4465 </tbody>
4466 </tgroup>
4467 </table>
4468
4469 <para>
4470 To disable the full screen mode as well as the seamless mode,
4471 use the following command:
4472
4473<screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
4474 </para>
4475
4476 </sect2>
4477
4478 <sect2 id="terminate-vm-action">
4479
4480 <title>Action when Terminating the VM</title>
4481
4482 <para>
4483 You can disallow, or blacklist, certain actions when terminating
4484 a VM. To disallow specific actions, type:
4485 </para>
4486
4487 <para>
4488<screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen>
4489 </para>
4490
4491 <para>
4492 where <computeroutput>OPTION</computeroutput> is one of the
4493 following keywords:
4494 </para>
4495
4496 <variablelist>
4497
4498 <varlistentry>
4499 <term>
4500 <computeroutput>SaveState</computeroutput>
4501 </term>
4502
4503 <listitem>
4504 <para>
4505 Do not allow the user to save the VM state when
4506 terminating the VM.
4507 </para>
4508 </listitem>
4509 </varlistentry>
4510
4511 <varlistentry>
4512 <term>
4513 <computeroutput>Shutdown</computeroutput>
4514 </term>
4515
4516 <listitem>
4517 <para>
4518 Do not allow the user to shutdown the VM by sending the
4519 ACPI power-off event to the guest.
4520 </para>
4521 </listitem>
4522 </varlistentry>
4523
4524 <varlistentry>
4525 <term>
4526 <computeroutput>PowerOff</computeroutput>
4527 </term>
4528
4529 <listitem>
4530 <para>
4531 Do not allow the user to power off the VM.
4532 </para>
4533 </listitem>
4534 </varlistentry>
4535
4536 <varlistentry>
4537 <term>
4538 <computeroutput>PowerOffRestoringSnapshot</computeroutput>
4539 </term>
4540
4541 <listitem>
4542 <para>
4543 Do not allow the user to return to the last snapshot when
4544 powering off the VM.
4545 </para>
4546 </listitem>
4547 </varlistentry>
4548
4549 <varlistentry>
4550 <term>
4551 <computeroutput>Detach</computeroutput>
4552 </term>
4553
4554 <listitem>
4555 <para>
4556 Do not allow the user to detach from the VM process if the
4557 VM was started in separate mode.
4558 </para>
4559 </listitem>
4560 </varlistentry>
4561
4562 </variablelist>
4563
4564 <para>
4565 This is a per-VM setting. Any combination of the above is
4566 allowed. If all options are specified, the VM cannot be shut
4567 down at all.
4568 </para>
4569
4570 </sect2>
4571
4572 <sect2 id="terminate-vm-default-action">
4573
4574 <title>Default Action when Terminating the VM</title>
4575
4576 <para>
4577 You can define a specific action for terminating a VM. In
4578 contrast to the setting decribed in the previous section, this
4579 setting allows only one action when the user terminates the VM.
4580 No exit menu is shown.
4581 </para>
4582
4583 <para>
4584<screen>VBoxManage setextradata "VM name" GUI/DefaultCloseAction ACTION</screen>
4585 </para>
4586
4587 <para>
4588 where <computeroutput>ACTION</computeroutput> is one of the
4589 following keywords:
4590 </para>
4591
4592 <variablelist>
4593
4594 <varlistentry>
4595 <term>
4596 <computeroutput>SaveState</computeroutput>
4597 </term>
4598
4599 <listitem>
4600 <para>
4601 Save the VM state before terminating the VM process.
4602 </para>
4603 </listitem>
4604 </varlistentry>
4605
4606 <varlistentry>
4607 <term>
4608 <computeroutput>Shutdown</computeroutput>
4609 </term>
4610
4611 <listitem>
4612 <para>
4613 The VM is shut down by sending the ACPI power-off event to
4614 the guest.
4615 </para>
4616 </listitem>
4617 </varlistentry>
4618
4619 <varlistentry>
4620 <term>
4621 <computeroutput>PowerOff</computeroutput>
4622 </term>
4623
4624 <listitem>
4625 <para>
4626 The VM is powered off.
4627 </para>
4628 </listitem>
4629 </varlistentry>
4630
4631 <varlistentry>
4632 <term>
4633 <computeroutput>PowerOffRestoringSnapshot</computeroutput>
4634 </term>
4635
4636 <listitem>
4637 <para>
4638 The VM is powered off and the saved state returns to the
4639 last snapshot.
4640 </para>
4641 </listitem>
4642 </varlistentry>
4643
4644 <varlistentry>
4645 <term>
4646 <computeroutput>Detach</computeroutput>
4647 </term>
4648
4649 <listitem>
4650 <para>
4651 Terminate the frontend but leave the VM process running.
4652 </para>
4653 </listitem>
4654 </varlistentry>
4655
4656 </variablelist>
4657
4658 <para>
4659 This is a per-VM setting. Any combination of the above is
4660 allowed. If all options are specified, the VM cannot be shut
4661 down at all.
4662 </para>
4663
4664 </sect2>
4665
4666 <sect2 id="guru-meditation-action">
4667
4668 <title>Action for Handling a Guru Meditation</title>
4669
4670 <para>
4671 A VM runs into a Guru Meditation if there is a problem which
4672 cannot be fixed by other means than terminating the process. The
4673 default is to show a message window which instructs the user to
4674 open a bug report.
4675 </para>
4676
4677 <para>
4678 This behavior can be configured:
4679 </para>
4680
4681 <para>
4682<screen>VBoxManage setextradata "VM name" GUI/GuruMeditationHandler MODE</screen>
4683 </para>
4684
4685 <para>
4686 where <computeroutput>MODE</computeroutput> is one of the
4687 following keywords:
4688 </para>
4689
4690 <variablelist>
4691
4692 <varlistentry>
4693 <term>
4694 <computeroutput>Default</computeroutput>
4695 </term>
4696
4697 <listitem>
4698 <para>
4699 A message window is shown. After the user confirmed, the
4700 VM is terminated.
4701 </para>
4702 </listitem>
4703 </varlistentry>
4704
4705 <varlistentry>
4706 <term>
4707 <computeroutput>PowerOff</computeroutput>
4708 </term>
4709
4710 <listitem>
4711 <para>
4712 The VM is immediately powered-off without showing any
4713 message window. The VM logfile will show information about
4714 what happened.
4715 </para>
4716 </listitem>
4717 </varlistentry>
4718
4719 <varlistentry>
4720 <term>
4721 <computeroutput>Ignore</computeroutput>
4722 </term>
4723
4724 <listitem>
4725 <para>
4726 The VM is left in stuck mode. Execution is stopped but no
4727 message window is shown. The VM has to be powered off
4728 manually.
4729 </para>
4730 </listitem>
4731 </varlistentry>
4732
4733 </variablelist>
4734
4735 <para>
4736 This is a per-VM setting.
4737 </para>
4738
4739 </sect2>
4740
4741 <sect2 id="mouse-capture">
4742
4743 <title>Configuring Automatic Mouse Capturing</title>
4744
4745 <para>
4746 By default, the mouse is captured if the user clicks on the
4747 guest window and the guest expects relative mouse coordinates at
4748 this time. This happens if the pointing device is configured as
4749 PS/2 mouse and the guest has not yet started the VirtualBox
4750 Guest Additions. For instance, the guest is booting or the Guest
4751 Additions are not installed, or if the pointing device is
4752 configured as a USB tablet but the guest has no USB driver
4753 loaded yet. Once the Guest Additions become active or the USB
4754 guest driver is started, the mouse capture is automatically
4755 released.
4756 </para>
4757
4758 <para>
4759 The default behavior is sometimes not desired. Therefore it can
4760 be configured:
4761 </para>
4762
4763 <para>
4764<screen>VBoxManage setextradata "VM name" GUI/MouseCapturePolicy MODE</screen>
4765 </para>
4766
4767 <para>
4768 where <computeroutput>MODE</computeroutput> is one of the
4769 following keywords:
4770 </para>
4771
4772 <variablelist>
4773
4774 <varlistentry>
4775 <term>
4776 <computeroutput>Default</computeroutput>
4777 </term>
4778
4779 <listitem>
4780 <para>
4781 The default behavior as described above.
4782 </para>
4783 </listitem>
4784 </varlistentry>
4785
4786 <varlistentry>
4787 <term>
4788 <computeroutput>HostComboOnly</computeroutput>
4789 </term>
4790
4791 <listitem>
4792 <para>
4793 The mouse is only captured if the Host Key is toggled.
4794 </para>
4795 </listitem>
4796 </varlistentry>
4797
4798 <varlistentry>
4799 <term>
4800 <computeroutput>Disabled</computeroutput>
4801 </term>
4802
4803 <listitem>
4804 <para>
4805 The mouse is never captured, also not by toggling the Host
4806 Key
4807 </para>
4808 </listitem>
4809 </varlistentry>
4810
4811 </variablelist>
4812
4813 <para>
4814 This is a per-VM setting.
4815 </para>
4816
4817 </sect2>
4818
4819 <sect2 id="legacy-fullscreen-mode">
4820
4821 <title>Requesting Legacy Full-Screen Mode</title>
4822
4823 <para>
4824 As of version 4.3.16, VirtualBox uses special window manager
4825 facilities to switch a multi-screen machine to full-screen on a
4826 multi-monitor host system. However, not all window managers
4827 provide these facilities correctly, so VirtualBox can be told to
4828 use the old method of switching to full-screen mode instead
4829 using the command:
4830 </para>
4831
4832 <para>
4833<screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode true</screen>
4834 </para>
4835
4836 <para>
4837 You can go back to the new method using the command:
4838 </para>
4839
4840 <para>
4841<screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode</screen>
4842 </para>
4843
4844 <para>
4845 This is a global setting.
4846 </para>
4847
4848 </sect2>
4849
4850 </sect1>
4851
4852 <sect1 id="vboxwebsrv-daemon">
4853
4854 <title>Starting the VirtualBox Web Service Automatically</title>
4855
4856 <para>
4857 The VirtualBox web service,
4858 <computeroutput>vboxwebsrv</computeroutput>, is used for
4859 controlling VirtualBox remotely. It is documented in detail in the
4860 VirtualBox Software Development Kit (SDK). See
4861 <xref linkend="VirtualBoxAPI" />. As the client base using this
4862 interface is growing, we added start scripts for the various
4863 operation systems we support. The following sections describe how
4864 to use them. The VirtualBox web service is never started
4865 automatically as a result of a standard installation.
4866 </para>
4867
4868 <sect2 id="vboxwebsrv-linux">
4869
4870 <title>Linux: Starting the Web Service via init</title>
4871
4872 <para>
4873 On Linux, the web service can be automatically started during
4874 host boot by adding appropriate parameters to the file
4875 <computeroutput>/etc/default/virtualbox</computeroutput>. There
4876 is one mandatory parameter,
4877 <computeroutput>VBOXWEB_USER</computeroutput>, which must be set
4878 to the user which will later start the VMs. The parameters in
4879 <xref linkend="table-websrv-config-params"/> all start with the
4880 <computeroutput>VBOXWEB_</computeroutput> prefix string. For
4881 example: <computeroutput>VBOXWEB_HOST</computeroutput> and
4882 <computeroutput>VBOXWEB_PORT</computeroutput>.
4883
4884 <table id="table-websrv-config-params">
4885 <title>Web Service Configuration Parameters</title>
4886 <tgroup cols="3">
4887 <thead>
4888 <row>
4889 <entry><emphasis role="bold">Parameter</emphasis></entry>
4890 <entry><emphasis role="bold">Description</emphasis></entry>
4891 <entry><emphasis role="bold">Default</emphasis></entry>
4892 </row>
4893 </thead>
4894 <tbody>
4895 <row>
4896 <entry><computeroutput>USER</computeroutput></entry>
4897 <entry>The user as which the web service runs</entry>
4898 <entry></entry>
4899 </row>
4900 <row>
4901 <entry><computeroutput>HOST</computeroutput></entry>
4902 <entry>The host to bind the web service to</entry>
4903 <entry>localhost</entry>
4904 </row>
4905 <row>
4906 <entry><computeroutput>PORT</computeroutput></entry>
4907 <entry>The port to bind the web service to</entry>
4908 <entry>18083</entry>
4909 </row>
4910 <row>
4911 <entry><computeroutput>SSL_KEYFILE</computeroutput></entry>
4912 <entry>Server key and certificate file, PEM format</entry>
4913 <entry></entry>
4914 </row>
4915 <row>
4916 <entry><computeroutput>SSL_PASSWORDFILE</computeroutput></entry>
4917 <entry>File name for password to server key</entry>
4918 <entry></entry>
4919 </row>
4920 <row>
4921 <entry><computeroutput>SSL_CACERT</computeroutput></entry>
4922 <entry>CA certificate file, PEM format</entry>
4923 <entry></entry>
4924 </row>
4925 <row>
4926 <entry><computeroutput>SSL_CAPATH</computeroutput></entry>
4927 <entry>CA certificate path</entry>
4928 <entry></entry>
4929 </row>
4930 <row>
4931 <entry><computeroutput>SSL_DHFILE</computeroutput></entry>
4932 <entry>DH file name or DH key length in bits</entry>
4933 <entry></entry>
4934 </row>
4935 <row>
4936 <entry><computeroutput>SSL_RANDFILE</computeroutput></entry>
4937 <entry>File containing seed for random number generator</entry>
4938 <entry></entry>
4939 </row>
4940 <row>
4941 <entry><computeroutput>TIMEOUT</computeroutput></entry>
4942 <entry>Session timeout in seconds; 0 disables timeouts</entry>
4943 <entry>300</entry>
4944 </row>
4945 <row>
4946 <entry><computeroutput>CHECK_INTERVAL</computeroutput></entry>
4947 <entry>Frequency of timeout checks in seconds</entry>
4948 <entry>5</entry>
4949 </row>
4950 <row>
4951 <entry><computeroutput>THREADS</computeroutput></entry>
4952 <entry>Maximum number of worker threads to run in parallel</entry>
4953 <entry>100</entry>
4954 </row>
4955 <row>
4956 <entry><computeroutput>KEEPALIVE</computeroutput></entry>
4957 <entry>Maximum number of requests before a socket will be closed</entry>
4958 <entry>100</entry>
4959 </row>
4960 <row>
4961 <entry><computeroutput>ROTATE</computeroutput></entry>
4962 <entry>Number of log files; 0 disables log rotation</entry>
4963 <entry>10</entry>
4964 </row>
4965 <row>
4966 <entry><computeroutput>LOGSIZE</computeroutput></entry>
4967 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
4968 <entry>1MB</entry>
4969 </row>
4970 <row>
4971 <entry><computeroutput>LOGINTERVAL</computeroutput></entry>
4972 <entry>Maximum time interval in seconds to trigger log rotation</entry>
4973 <entry>1 day</entry>
4974 </row>
4975 </tbody>
4976 </tgroup>
4977 </table>
4978 </para>
4979
4980 <para>
4981 Setting the parameter
4982 <computeroutput>SSL_KEYFILE</computeroutput> enables the SSL/TLS
4983 support. Using encryption is strongly encouraged, as otherwise
4984 everything (including passwords) is transferred in clear text.
4985 </para>
4986
4987 </sect2>
4988
4989 <sect2 id="vboxwebsrv-solaris">
4990
4991 <title>Solaris: Starting the Web Service via SMF</title>
4992
4993 <para>
4994 On Solaris hosts, the VirtualBox web service daemon is
4995 integrated into the SMF framework. You can change the
4996 parameters, but do not have to if the defaults below already
4997 match your needs:
4998
4999<screen>svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
5000svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
5001svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root</screen>
5002 </para>
5003
5004 <para>
5005 <xref linkend="table-websrv-config-params"/> showing the
5006 parameter names and defaults also applies for Solaris. The
5007 parameter names must be changed to lowercase and a prefix of
5008 <computeroutput>config/</computeroutput> has to be added. For
5009 example: <computeroutput>config/user</computeroutput> or
5010 <computeroutput>config/ssl_keyfile</computeroutput>. If you make
5011 any change, do not forget to run the following command to put
5012 the changes into effect immediately:
5013
5014<screen>svcadm refresh svc:/application/virtualbox/webservice:default</screen>
5015 </para>
5016
5017 <para>
5018 If you forget the above command then the previous settings are
5019 used when enabling the service. Check the current property
5020 settings with:
5021
5022<screen>svcprop -p config svc:/application/virtualbox/webservice:default</screen>
5023 </para>
5024
5025 <para>
5026 When everything is configured correctly you can start the
5027 VirtualBox web service with the following command:
5028
5029<screen>svcadm enable svc:/application/virtualbox/webservice:default</screen>
5030 </para>
5031
5032 <para>
5033 For more information about SMF, please refer to the Solaris
5034 documentation.
5035 </para>
5036
5037 </sect2>
5038
5039 <sect2 id="vboxwebsrv-osx">
5040
5041 <title>Mac OS X: Starting the Web Service via launchd</title>
5042
5043 <para>
5044 On Mac OS X, launchd is used to start the VirtualBox webservice.
5045 An example configuration file can be found in
5046 <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
5047 It can be enabled by changing the
5048 <computeroutput>Disabled</computeroutput> key from
5049 <computeroutput>true</computeroutput> to
5050 <computeroutput>false</computeroutput>. To manually start the
5051 service use the following command:
5052
5053<screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
5054
5055 For additional information on how launchd services could be
5056 configured see:
5057 </para>
5058
5059 <para>
5060 <ulink
5061 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>.
5062 </para>
5063
5064 </sect2>
5065
5066 </sect1>
5067
5068 <sect1 id="vboxwatchdog">
5069
5070 <title>VirtualBox Watchdog</title>
5071
5072 <para>
5073 Starting with VirtualBox 4.2 the memory ballooning service
5074 formerly known as <computeroutput>VBoxBalloonCtrl</computeroutput>
5075 was renamed to VBoxWatchdog, which now incorporates several host
5076 services that are meant to be run in a server environment.
5077 </para>
5078
5079 <para>
5080 These services are as follows:
5081 </para>
5082
5083 <itemizedlist>
5084
5085 <listitem>
5086 <para>
5087 Memory ballooning control, which automatically takes care of a
5088 VM's configured memory balloon. See
5089 <xref linkend="guestadd-balloon" />. This service is useful
5090 for server environments where VMs may dynamically require more
5091 or less memory during runtime.
5092 </para>
5093
5094 <para>
5095 The service periodically checks a VM's current memory balloon
5096 and its free guest RAM and automatically adjusts the current
5097 memory balloon by inflating or deflating it accordingly. This
5098 handling only applies to running VMs having recent Guest
5099 Additions installed.
5100 </para>
5101 </listitem>
5102
5103 <listitem>
5104 <para>
5105 Host isolation detection, which provides a way to detect
5106 whether the host cannot reach the specific VirtualBox server
5107 instance anymore and take appropriate actions, such as
5108 shutting down, saving the current state or even powering down
5109 certain VMs.
5110 </para>
5111 </listitem>
5112
5113 </itemizedlist>
5114
5115 <para>
5116 All configuration values can be either specified via command line
5117 or global extradata, whereas command line values always have a
5118 higher priority when set. Some of the configuration values also be
5119 specified on a per-VM basis. So the overall lookup order is:
5120 command line, per-VM basis extradata (if available), global
5121 extradata.
5122 </para>
5123
5124 <sect2 id="vboxwatchdog-ballonctrl">
5125
5126 <title>Memory Ballooning Control</title>
5127
5128 <para>
5129 The memory ballooning control inflates and deflates the memory
5130 balloon of VMs based on the VMs free memory and the desired
5131 maximum balloon size.
5132 </para>
5133
5134 <para>
5135 To set up the memory ballooning control the maximum ballooning
5136 size a VM can reach needs to be set. This can be specified via
5137 the command line with:
5138
5139<screen>--balloon-max &lt;Size in MB&gt;</screen>
5140
5141 or on a per-VM basis extradata value with:
5142
5143<screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
5144
5145 or using a global extradata value with:
5146
5147<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
5148
5149 <note>
5150 <para>
5151 If no maximum ballooning size is specified by at least one
5152 of the parameters above, no ballooning will be performed at
5153 all.
5154 </para>
5155 </note>
5156 </para>
5157
5158 <para>
5159 Setting the ballooning increment in MB can be either done via
5160 command line with:
5161
5162<screen>--balloon-inc &lt;Size in MB&gt;</screen>
5163
5164 or using a global extradata value with:
5165
5166<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
5167
5168 The default ballooning increment is 256 MB if not specified.
5169 </para>
5170
5171 <para>
5172 The same options apply for a ballooning decrement. Using the
5173 command line with:
5174
5175<screen>--balloon-dec &lt;Size in MB&gt;</screen>
5176
5177 or using a global extradata value with:
5178
5179<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
5180
5181 The default ballooning decrement is 128 MB if not specified.
5182 </para>
5183
5184 <para>
5185 To define the lower limit in MB a balloon can be the command
5186 line with:
5187
5188<screen>--balloon-lower-limit &lt;Size in MB&gt;</screen>
5189
5190 can be used or using a global extradata value with:
5191
5192<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
5193
5194 is available. Default lower limit is 128 if not specified.
5195 </para>
5196
5197 </sect2>
5198
5199 <sect2 id="vboxwatchdog-hostisln">
5200
5201 <title>Host Isolation Detection</title>
5202
5203 <para>
5204 To detect whether a host is being isolated, that is, the host
5205 cannot reach the VirtualBox server instance anymore, the host
5206 needs to set an alternating value to a global extradata value
5207 within a time period. If this value is not set within that time
5208 period a timeout occurred and the so-called host isolation
5209 response will be performed to the VMs handled. Which VMs are
5210 handled can be controlled by defining VM groups and assigning
5211 VMs to those groups. By default no groups are set, meaning that
5212 all VMs on the server will be handled when no host response is
5213 received within 30 seconds.
5214 </para>
5215
5216 <para>
5217 To set the groups handled by the host isolation detection via
5218 command line:
5219
5220<screen>--apimon-groups=&lt;string[,stringN]&gt;</screen>
5221
5222 or using a global extradata value with:
5223
5224<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
5225 </para>
5226
5227 <para>
5228 To set the host isolation timeout via command line:
5229
5230<screen>--apimon-isln-timeout=&lt;ms&gt;</screen>
5231
5232 or using a global extradata value with:
5233
5234<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
5235 </para>
5236
5237 <para>
5238 To set the actual host isolation response via command line:
5239
5240<screen>--apimon-isln-response=&lt;cmd&gt;</screen>
5241
5242 or using a global extradata value with:
5243
5244<screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
5245
5246 The following response commands are available:
5247 </para>
5248
5249 <itemizedlist>
5250
5251 <listitem>
5252 <para>
5253 <computeroutput>none</computeroutput>. This has no effect.
5254 </para>
5255 </listitem>
5256
5257 <listitem>
5258 <para>
5259 <computeroutput>pause</computeroutput>. Pauses the execution
5260 of a VM.
5261 </para>
5262 </listitem>
5263
5264 <listitem>
5265 <para>
5266 <computeroutput>poweroff</computeroutput>. Shuts down the VM
5267 by pressing the virtual power button. The VM will not have
5268 the chance of saving any data or veto the shutdown process.
5269 </para>
5270 </listitem>
5271
5272 <listitem>
5273 <para>
5274 <computeroutput>save</computeroutput>. Saves the current
5275 machine state and powers off the VM afterwards. If saving
5276 the machine state fails the VM will be paused.
5277 </para>
5278 </listitem>
5279
5280 <listitem>
5281 <para>
5282 <computeroutput>shutdown</computeroutput>. Shuts down the VM
5283 in a gentle way by sending an
5284 <computeroutput>ACPI</computeroutput> shutdown event to the
5285 VM's operating system. The OS then has the chance of doing a
5286 clean shutdown.
5287 </para>
5288 </listitem>
5289
5290 </itemizedlist>
5291
5292 </sect2>
5293
5294 <sect2 id="vboxwatchdog-moreinfo">
5295
5296 <title>More Information</title>
5297
5298 <para>
5299 For more advanced options and parameters like verbose logging
5300 check the built-in command line help accessible with
5301 <computeroutput>--help</computeroutput>.
5302 </para>
5303
5304 </sect2>
5305
5306 <sect2 id="vboxwatchdog-linux">
5307
5308 <title>Linux: Starting the Watchdog Service via init</title>
5309
5310 <para>
5311 On Linux, the watchdog service can be automatically started
5312 during host boot by adding appropriate parameters to the file
5313 <computeroutput>/etc/default/virtualbox</computeroutput>. There
5314 is one mandatory parameter,
5315 <computeroutput>VBOXWATCHDOG_USER</computeroutput>, which must
5316 be set to the user which will later start the VMs. For backward
5317 compatibility you can also specify
5318 <computeroutput>VBOXBALLOONCTRL_USER</computeroutput>.
5319 </para>
5320
5321 <para>
5322 The parameters in
5323 <xref linkend="table-vboxwatchdog-config-params"/> all start
5324 with the <computeroutput>VBOXWATCHDOG_</computeroutput> prefix
5325 string. For example:
5326 <computeroutput>VBOXWATCHDOG_BALLOON_INTERVAL</computeroutput>
5327 and <computeroutput>VBOXWATCHDOG_LOGSIZE</computeroutput>.
5328 Legacy parameters such as
5329 <computeroutput>VBOXBALLOONCTRL_INTERVAL</computeroutput> can
5330 still be used.
5331
5332 <table id="table-vboxwatchdog-config-params">
5333 <title>VirtualBox Watchdog Configuration Parameters</title>
5334 <tgroup cols="3">
5335 <thead>
5336 <row>
5337 <entry><emphasis role="bold">Parameter</emphasis></entry>
5338 <entry><emphasis role="bold">Description</emphasis></entry>
5339 <entry><emphasis role="bold">Default</emphasis></entry>
5340 </row>
5341 </thead>
5342 <tbody>
5343 <row>
5344 <entry><computeroutput>USER</computeroutput></entry>
5345 <entry>The user as which the watchdog service runs</entry>
5346 <entry></entry>
5347 </row>
5348 <row>
5349 <entry><computeroutput>ROTATE</computeroutput></entry>
5350 <entry>Number of log files; 0 disables log rotation</entry>
5351 <entry>10</entry>
5352 </row>
5353 <row>
5354 <entry><computeroutput>LOGSIZE</computeroutput></entry>
5355 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
5356 <entry>1MB</entry>
5357 </row>
5358 <row>
5359 <entry><computeroutput>LOGINTERVAL</computeroutput></entry>
5360 <entry>Maximum time interval in seconds to trigger log rotation</entry>
5361 <entry>1 day</entry>
5362 </row>
5363 <row>
5364 <entry><computeroutput>BALLOON_INTERVAL</computeroutput></entry>
5365 <entry>Interval for checking the balloon size (msec)</entry>
5366 <entry>30000</entry>
5367 </row>
5368 <row>
5369 <entry><computeroutput>BALLOON_INCREMENT</computeroutput></entry>
5370 <entry>Balloon size increment (MByte)</entry>
5371 <entry>256</entry>
5372 </row>
5373 <row>
5374 <entry><computeroutput>BALLOON_DECREMENT</computeroutput></entry>
5375 <entry>Balloon size decrement (MByte)</entry>
5376 <entry>128</entry>
5377 </row>
5378 <row>
5379 <entry><computeroutput>BALLOON_LOWERLIMIT</computeroutput></entry>
5380 <entry>Balloon size lower limit (MByte)</entry>
5381 <entry>64</entry>
5382 </row>
5383 <row>
5384 <entry><computeroutput>BALLOON_SAFETYMARGIN</computeroutput></entry>
5385 <entry>Free memory required for decreasing the balloon size (MByte)</entry>
5386 <entry>1024</entry>
5387 </row>
5388 </tbody>
5389 </tgroup>
5390 </table>
5391 </para>
5392
5393 </sect2>
5394
5395 <sect2 id="vboxwatchdog-solaris">
5396
5397 <title>Solaris: Starting the Watchdog Service via SMF</title>
5398
5399 <para>
5400 On Solaris hosts, the VirtualBox watchdog service daemon is
5401 integrated into the SMF framework. You can change the
5402 parameters, but do not have to if the defaults already match
5403 your needs:
5404 </para>
5405
5406<screen>svccfg -s svc:/application/virtualbox/balloonctrl:default setprop \
5407 config/balloon_interval=10000
5408svccfg -s svc:/application/virtualbox/balloonctrl:default setprop \
5409config/balloon_safetymargin=134217728</screen>
5410
5411 <para>
5412 <xref linkend="table-vboxwatchdog-config-params"/> also applies
5413 for Solaris. The parameter names must be changed to lowercase
5414 and a prefix of <computeroutput>config/</computeroutput> has to
5415 be added. For example:
5416 <computeroutput>config/user</computeroutput> or
5417 <computeroutput>config/balloon_safetymargin</computeroutput>. If
5418 you made any change, do not forget to run the following command
5419 to put the changes into effect immediately:
5420
5421<screen>svcadm refresh svc:/application/virtualbox/balloonctrl:default</screen>
5422 </para>
5423
5424 <para>
5425 If you forget the above command then the previous settings will
5426 be used when enabling the service. Check the current property
5427 settings with:
5428
5429<screen>svcprop -p config svc:/application/virtualbox/balloonctrl:default</screen>
5430 </para>
5431
5432 <para>
5433 When everything is configured correctly you can start the
5434 VirtualBox watchdog service with the following command:
5435
5436<screen>svcadm enable svc:/application/virtualbox/balloonctrl:default</screen>
5437 </para>
5438
5439 <para>
5440 For more information about SMF, please refer to the Solaris
5441 documentation.
5442 </para>
5443
5444 </sect2>
5445
5446 </sect1>
5447
5448 <sect1 id="otherextpacks">
5449
5450 <title>Other Extension Packs</title>
5451
5452 <para>
5453 Starting with VirtualBox 4.2.0 there is another extension pack,
5454 <code>VNC</code>, which is open source and replaces the previous
5455 integration of the VNC remote access protocol. This is
5456 experimental code, and will be initially available in the
5457 VirtualBox source code package only. It is to a large portion code
5458 contributed by users, and is not supported in any way by Oracle.
5459 </para>
5460
5461 <para>
5462 The keyboard handling is severely limited, and only the US
5463 keyboard layout works. Other keyboard layouts will have at least
5464 some keys which produce the wrong results, often with quite
5465 surprising effects, and for layouts which have significant
5466 differences to the US keyboard layout it is most likely unusable.
5467 </para>
5468
5469 <para>
5470 It is possible to install both the Oracle VM VirtualBox Extension
5471 Pack and VNC, but only one VRDE module can be active at any time.
5472 The following command switches to the VNC VRDE module in VNC:
5473
5474<screen>VBoxManage setproperty vrdeextpack VNC</screen>
5475 </para>
5476
5477 <para>
5478 Configuring the remote access works very similarly to VRDP, see
5479 <xref linkend="vrde" />, with some limitations. VNC does not
5480 support specifying several port numbers, and the authentication is
5481 done differently. VNC can only deal with password authentication,
5482 and there is no option to use password hashes. This leaves no
5483 other choice than having a clear-text password in the VM
5484 configuration, which can be set with the following command:
5485
5486<screen>VBoxManage modifyvm "VM name" --vrdeproperty VNCPassword=secret</screen>
5487 </para>
5488
5489 <para>
5490 The user is responsible for keeping this password secret, and it
5491 should be removed when a VM configuration is passed to another
5492 person, for whatever purpose. Some VNC servers claim to have
5493 "encrypted" passwords in the configuration. This is not true
5494 encryption, it is only concealing the passwords, which is exactly
5495 as secure as clear-text passwords.
5496 </para>
5497
5498 <para>
5499 The following command switches back to VRDP, if installed:
5500
5501<screen>VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"</screen>
5502 </para>
5503
5504 </sect1>
5505
5506 <sect1 id="autostart">
5507
5508 <title>Starting Virtual Machines During System Boot</title>
5509
5510 <para>
5511 Starting with VirtualBox 4.2.0 it is possible to start VMs
5512 automatically during system boot on Linux, Solaris and Mac OS X
5513 for all users.
5514 </para>
5515
5516 <sect2 id="autostart-linux">
5517
5518 <title>Linux: Starting the Autostart Service via init</title>
5519
5520 <para>
5521 On Linux, the autostart service is activated by setting two
5522 variables in
5523 <computeroutput>/etc/default/virtualbox</computeroutput>. The
5524 first one is <computeroutput>VBOXAUTOSTART_DB</computeroutput>
5525 which contains an absolute path to the autostart database
5526 directory. The directory should have write access for every user
5527 who should be able to start virtual machines automatically.
5528 Furthermore the directory should have the sticky bit set. The
5529 second variable is
5530 <computeroutput>VBOXAUTOSTART_CONFIG</computeroutput> which
5531 points the service to the autostart configuration file which is
5532 used during boot to determine whether to allow individual users
5533 to start a VM automatically and configure startup delays. The
5534 configuration file can be placed in
5535 <computeroutput>/etc/vbox</computeroutput> and contains several
5536 options. One is <computeroutput>default_policy</computeroutput>
5537 which controls whether the autostart service allows or denies to
5538 start a VM for users which are not in the exception list. The
5539 exception list starts with
5540 <computeroutput>exception_list</computeroutput> and contains a
5541 comma separated list with usernames. Furthermore a separate
5542 startup delay can be configured for every user to avoid
5543 overloading the host. A sample configuration is given below:
5544 </para>
5545
5546 <para>
5547<screen>
5548# Default policy is to deny starting a VM, the other option is "allow".
5549default_policy = deny
5550
5551# Bob is allowed to start virtual machines but starting them
5552# will be delayed for 10 seconds
5553bob = {
5554 allow = true
5555 startup_delay = 10
5556}
5557
5558# Alice is not allowed to start virtual machines, useful to exclude certain users
5559# if the default policy is set to allow.
5560alice = {
5561 allow = false
5562}
5563 </screen>
5564 </para>
5565
5566 <para>
5567 Every user who wants to enable autostart for individual machines
5568 has to set the path to the autostart database directory with
5569
5570<screen>VBoxManage setproperty autostartdbpath &lt;Autostart directory&gt;</screen>
5571 </para>
5572
5573 </sect2>
5574
5575 <sect2 id="autostart-solaris">
5576
5577 <title>Solaris: Starting the Autostart Service via SMF</title>
5578
5579 <para>
5580 On Solaris hosts, the VirtualBox autostart daemon is integrated
5581 into the SMF framework. To enable it you have to point the
5582 service to an existing configuration file which has the same
5583 format as on Linux, see <xref linkend="autostart-linux" />. For
5584 example:
5585
5586<screen>svccfg -s svc:/application/virtualbox/autostart:default setprop \
5587 config/config=/etc/vbox/autostart.cfg</screen>
5588 </para>
5589
5590 <para>
5591 When everything is configured correctly you can start the
5592 VirtualBox autostart service with the following command:
5593
5594<screen>svcadm enable svc:/application/virtualbox/autostart:default</screen>
5595 </para>
5596
5597 <para>
5598 For more information about SMF, please refer to the Solaris
5599 documentation.
5600 </para>
5601
5602 </sect2>
5603
5604 <sect2 id="autostart-osx">
5605
5606 <title>Mac OS X: Starting the Autostart Service via launchd</title>
5607
5608 <para>
5609 On Mac OS X, launchd is used to start the VirtualBox autostart
5610 service. An example configuration file can be found in
5611 <computeroutput>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</computeroutput>.
5612 To enable the service copy the file to
5613 <computeroutput>/Library/LaunchDaemons</computeroutput> and
5614 change the <computeroutput>Disabled</computeroutput> key from
5615 <computeroutput>true</computeroutput> to
5616 <computeroutput>false</computeroutput>. Furthermore replace the
5617 second parameter to an existing configuration file which has the
5618 same format as on Linux, see <xref linkend="autostart-linux" />.
5619 To manually start the service use the following command:
5620
5621<screen>launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
5622
5623 For additional information on how launchd services could be
5624 configured see:
5625 </para>
5626
5627 <para>
5628 <ulink
5629 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>.
5630 </para>
5631
5632 </sect2>
5633
5634 </sect1>
5635
5636 <sect1 id="vboxexpertstoragemgmt">
5637
5638 <title>VirtualBox Expert Storage Management</title>
5639
5640 <para>
5641 In case the snapshot model of VirtualBox is not sufficient it is
5642 possible to enable a special mode which makes it possible to
5643 reconfigure storage attachments while the VM is paused. The user
5644 has to make sure that the disk data stays consistent to the guest
5645 because unlike with hotplugging the guest is not informed about
5646 detached or newly attached media.
5647 </para>
5648
5649 <para>
5650 The expert storage management mode can be enabled per VM
5651 executing:
5652 </para>
5653
5654<screen>VBoxManage setextradata "VM name" "VBoxInternal2/SilentReconfigureWhilePaused" 1</screen>
5655
5656 <para>
5657 Storage attachments can be reconfigured while the VM is paused
5658 afterwards using:
5659 </para>
5660
5661<screen>VBoxManage storageattach ...</screen>
5662
5663 </sect1>
5664
5665 <sect1 id="hostpowertweaks">
5666
5667 <title>Handling of Host Power Management Events</title>
5668
5669 <para>
5670 Some host power management events are handled by VirtualBox. The
5671 actual behavior depends on the platform:
5672 </para>
5673
5674 <itemizedlist>
5675
5676 <listitem>
5677 <para>
5678 <emphasis role="bold">Host Suspends.</emphasis> This event is
5679 generated when the host is about to suspend, that is, the host
5680 saves the state to some non-volatile storage and powers off.
5681 </para>
5682
5683 <para>
5684 This event is currently only handled on Windows hosts and Mac
5685 OS X hosts. When this event is generated, VirtualBox will
5686 pause all running VMs.
5687 </para>
5688 </listitem>
5689
5690 <listitem>
5691 <para>
5692 <emphasis role="bold">Host Resumes.</emphasis> This event is
5693 generated when the host woke up from the suspended state.
5694 </para>
5695
5696 <para>
5697 This event is currently only handled on Windows hosts and Mac
5698 OS X hosts. When this event is generated, VirtualBox will
5699 resume all VMs which are where paused before.
5700 </para>
5701 </listitem>
5702
5703 <listitem>
5704 <para>
5705 <emphasis role="bold">Battery Low.</emphasis> The battery
5706 level reached a critical level, usually less than 5 percent
5707 charged.
5708 </para>
5709
5710 <para>
5711 This event is currently only handled on Windows hosts and Mac
5712 OS X hosts. When this event is generated, VirtualBox will save
5713 the state and terminate all VMs in preparation of a potential
5714 host powerdown.
5715 </para>
5716
5717 <para>
5718 The behavior can be configured. By executing the following
5719 command, no VM is saved:
5720 </para>
5721
5722<screen>VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
5723
5724 <para>
5725 This is a global setting as well as a per-VM setting. The
5726 per-VM value has higher precedence than the global value. The
5727 following command will save the state of all VMs but will not
5728 save the state of VM "foo":
5729 </para>
5730
5731<screen>VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 1
5732VBoxManage setextradata "foo" "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
5733
5734 <para>
5735 The first line is actually not required as by default the
5736 savestate action is performed.
5737 </para>
5738 </listitem>
5739
5740 </itemizedlist>
5741
5742 </sect1>
5743
5744 <sect1 id="sse412passthrough">
5745
5746 <title>Passing Through SSE4.1/SSE4.2 Instructions</title>
5747
5748 <para>
5749 To provide SSE 4.1/SSE 4.2 support to guests, the host CPU has to
5750 implement these instruction sets. The instruction sets are exposed
5751 to guests by default, but it is possible to disable the instructions
5752 for certain guests using the following commands:</para>
5753<screen>VBoxManage setextradata "VM name" VBoxInternal/CPUM/IsaExts/SSE4.1 0
5754VBoxManage setextradata "VM name" VBoxInternal/CPUM/IsaExts/SSE4.2 0</screen>
5755
5756 <para>
5757 These are a per-VM settings which are turned on by default.
5758 </para>
5759
5760 </sect1>
5761
5762 <sect1 id="hidledssync">
5763
5764 <title>Support for Keyboard Indicators Synchronization</title>
5765
5766 <para>
5767 This feature makes the host keyboard lights match those of the
5768 virtual machine's emulated keyboard when the machine window is
5769 selected. It is currently implemented for Mac OS X and Windows
5770 hosts. The feature is enabled by default (on a supported host OS),
5771 but can be disabled using the following command:
5772 </para>
5773
5774<screen>VBoxManage setextradata "VM name" GUI/HidLedsSync "0"</screen>
5775
5776 <para>
5777 This is a per-VM setting and it is enabled by default.
5778 </para>
5779
5780 </sect1>
5781
5782 <sect1 id="usbtrafficcapturing">
5783
5784 <title>Capturing USB Traffic for Selected Devices</title>
5785
5786 <para>
5787 Starting with VirtualBox 5.0 it is possible to capture USB traffic
5788 for single USB devices or on the root hub level which captures the
5789 traffic of all USB devices attached to the root hub. VirtualBox
5790 stores the traffic in a format which is compatible with Wireshark.
5791 To capture the traffic of a specific USB device it must be
5792 attached to the VM with VBoxManage using the following command:
5793 </para>
5794
5795<screen>VBoxManage controlvm "VM name" usbattach "device uuid|address" --capturefile "filename"</screen>
5796
5797 <para>
5798 In order to enable capturing on the root hub use the following
5799 command while the VM is not running:
5800 </para>
5801
5802<screen>VBoxManage setextradata "VM name" \
5803 VBoxInternal/Devices/usb-ehci/0/LUN#0/Config/CaptureFilename "filename"</screen>
5804
5805 <para>
5806 The command above enables capturing on the root hub attached to
5807 the EHCI controller. To enable it for the OHCI or XHCI controller
5808 replace <computeroutput>usb-ehci</computeroutput> with
5809 <computeroutput>usb-ohci</computeroutput> or
5810 <computeroutput>usb-xhci</computeroutput> respectively.
5811 </para>
5812
5813 </sect1>
5814
5815 <sect1 id="heartbeatservice">
5816
5817 <title>Configuring the Heartbeat Service</title>
5818
5819 <para>
5820 VirtualBox ships a simple heartbeat service. Once the Guest
5821 Additions are active, the guest sends frequent heartbeat pings to
5822 the host. If the guest stops sending the heartbeat pings without
5823 properly terminating the service, the VM process will log this
5824 event in the VBox.log file. In the future it might be possible to
5825 configure dedicated actions but for now there is only a warning in
5826 the log file.
5827 </para>
5828
5829 <para>
5830 There are two parameters to configure. The <emphasis>heartbeat
5831 interval</emphasis> defines the time between two heartbeat pings.
5832 The default value is 2 seconds, that is, the heartbeat service of
5833 the VirtualBox Guest Additions will send a heartbeat ping every
5834 two seconds. The value in nanoseconds can be configured like this:
5835 </para>
5836
5837<screen>VBoxManage setextradata "VM name"\
5838 VBoxInternal/Devices/VMMDev/0/Config/HeartbeatInterval 2000000000</screen>
5839
5840 <para>
5841 The <emphasis>heartbeat timeout</emphasis> defines the time the
5842 host waits starting from the last heartbeat ping before it defines
5843 the guest as unresponsive. The default value is 2 times the
5844 heartbeat interval (4 seconds) and can be configured as following,
5845 in nanoseconds:
5846 </para>
5847
5848<screen>VBoxManage setextradata "VM name" \
5849 VBoxInternal/Devices/VMMDev/0/Config/HeartbeatTimeout 4000000000</screen>
5850
5851 <para>
5852 If the heartbeat timeout expires, there will be a log message like
5853 <emphasis>VMMDev: HeartBeatCheckTimer: Guest seems to be
5854 unresponsive. Last heartbeat received 5 seconds ago.</emphasis> If
5855 another heartbeat ping arrives after this warning, there will be a
5856 log message like <emphasis>VMMDev: GuestHeartBeat: Guest is
5857 alive.</emphasis>
5858 </para>
5859
5860 </sect1>
5861
5862 <sect1 id="diskencryption">
5863
5864 <title>Encryption of Disk Images</title>
5865
5866 <para>
5867 Starting with VirtualBox 5.0, it is possible to encrypt the data
5868 stored in hard disk images transparently for the guest. It does
5869 not depend on a specific image format to be used. Images which
5870 have the data encrypted are not portable between VirtualBox and
5871 other virtualization software.
5872 </para>
5873
5874 <para>
5875 VirtualBox uses the AES algorithm in XTS mode and supports 128-bit
5876 or 256-bit data encryption keys (DEK). The DEK is stored encrypted
5877 in the medium properties and is decrypted during VM startup by
5878 entering a password which was chosen when the image was encrypted.
5879 </para>
5880
5881 <para>
5882 Since the DEK is stored as part of the VM configuration file, it
5883 is important that it is kept safe. Losing the DEK means that the
5884 data stored in the disk images is lost irrecoverably. Having
5885 complete and up to date backups of all data related to the VM is
5886 the responsibility of the user.
5887 </para>
5888
5889 <sect2 id="diskencryption-limitations">
5890
5891 <title>Limitations of Disk Encryption</title>
5892
5893 <para>
5894 There are some limitations the user needs to be aware of when
5895 using this feature:
5896 </para>
5897
5898 <itemizedlist>
5899
5900 <listitem>
5901 <para>
5902 This feature is part of the Oracle VM VirtualBox Extension
5903 Pack, which needs to be installed. Otherwise disk encryption
5904 is unavailable.
5905 </para>
5906 </listitem>
5907
5908 <listitem>
5909 <para>
5910 Since encryption works only on the stored user data, it is
5911 currently not possible to check for metadata integrity of
5912 the disk image. Attackers might destroy data by removing or
5913 changing blocks of data in the image or change metadata
5914 items such as the disk size.
5915 </para>
5916 </listitem>
5917
5918 <listitem>
5919 <para>
5920 Exporting appliances which contain encrypted disk images is
5921 not possible because the OVF specification does not support
5922 this. All images are therefore decrypted during export.
5923 </para>
5924 </listitem>
5925
5926 <listitem>
5927 <para>
5928 The DEK is kept in memory while the VM is running to be able
5929 to decrypt data read and encrypt data written by the guest.
5930 While this should be obvious the user needs to be aware of
5931 this because an attacker might be able to extract the key on
5932 a compromised host and decrypt the data.
5933 </para>
5934 </listitem>
5935
5936 <listitem>
5937 <para>
5938 When encrypting or decrypting the images, the password is
5939 passed in clear text via the VirtualBox API. This needs to
5940 be kept in mind, especially when using third party API
5941 clients which make use of the webservice where the password
5942 might be transmitted over the network. The use of HTTPS is
5943 mandatory in such a case.
5944 </para>
5945 </listitem>
5946
5947 <listitem>
5948 <para>
5949 Encrypting images with differencing images is only possible
5950 if there are no snapshots or a linear chain of snapshots.
5951 This limitation may be addressed in a future VirtualBox
5952 version.
5953 </para>
5954 </listitem>
5955
5956 </itemizedlist>
5957
5958 </sect2>
5959
5960 <sect2 id="diskencryption-encryption">
5961
5962 <title>Encrypting Disk Images</title>
5963
5964 <para>
5965 Encrypting disk images can be done either using the GUI or
5966 VBoxManage. While the GUI is easier to use, it works on a per VM
5967 basis and encrypts all disk images attached to the specific VM.
5968 With VBoxManage one can encrypt individual images, including all
5969 differencing images. To encrypt an unencrypted medium with
5970 VBoxManage, use:
5971 </para>
5972
5973<screen>VBoxManage encryptmedium "uuid|filename" \
5974 --newpassword "file|-" --cipher "cipher id" --newpasswordid "id"</screen>
5975
5976 <para>
5977 To supply the encryption password point VBoxManage to the file
5978 where the password is stored or specify
5979 <computeroutput>-</computeroutput> to let VBoxManage ask you for
5980 the password on the command line.
5981 </para>
5982
5983 <para>
5984 The cipher parameter specifies the cipher to use for encryption
5985 and can be either
5986 <computeroutput>AES-XTS128-PLAIN64</computeroutput> or
5987 <computeroutput>AES-XTS256-PLAIN64</computeroutput>. The
5988 specified password identifier can be freely chosen by the user
5989 and is used for correct identification when supplying multiple
5990 passwords during VM startup.
5991 </para>
5992
5993 <para>
5994 If the user uses the same password when encrypting multiple
5995 images and also the same password identifier, the user needs to
5996 supply the password only once during VM startup.
5997 </para>
5998
5999 </sect2>
6000
6001 <sect2 id="diskencryption-startvm">
6002
6003 <title>Starting a VM with Encrypted Images</title>
6004
6005 <para>
6006 When a VM is started using the GUI, a dialog will open where the
6007 user needs to enter all passwords for all encrypted images
6008 attached to the VM. If another frontend like VBoxHeadless is
6009 used, the VM will be paused as soon as the guest tries to access
6010 an encrypted disk. The user needs to provide the passwords
6011 through VBoxManage using the following command:
6012 </para>
6013
6014<screen>VBoxManage controlvm "uuid|vmname" addencpassword "id" "password" [--removeonsuspend "yes|no"]</screen>
6015
6016 <para>
6017 The <computeroutput>id</computeroutput> parameter must be the
6018 same as the password identifier supplied when encrypting the
6019 images. <computeroutput>password</computeroutput> is the
6020 password used when encrypting the images. The user can
6021 optionally specify <computeroutput>--removeonsuspend
6022 "yes|no"</computeroutput> to specify whether to remove the
6023 password from VM memory when the VM is suspended. Before the VM
6024 can be resumed, the user needs to supply the passwords again.
6025 This is useful when a VM is suspended by a host suspend event
6026 and the user does not want the password to remain in memory.
6027 </para>
6028
6029 </sect2>
6030
6031 <sect2 id="diskencryption-decryption">
6032
6033 <title>Decrypting Encrypted Images</title>
6034
6035 <para>
6036 In some circumstances it might be required to decrypt previously
6037 encrypted images. This can be done in the GUI for a complete VM
6038 or using VBoxManage with the following command:
6039 </para>
6040
6041<screen>VBoxManage encryptmedium "uuid|filename" --oldpassword "file|-"</screen>
6042
6043 <para>
6044 The only required parameter is the password the image was
6045 encrypted with. The options are the same as for encrypting
6046 images.
6047 </para>
6048
6049 </sect2>
6050
6051 </sect1>
6052
6053 <sect1 id="gimdebug">
6054
6055 <title>Paravirtualized Debugging</title>
6056
6057 <para>
6058 In this section we cover debugging of guest operating systems
6059 using interfaces supported by paravirtualization providers.
6060 </para>
6061
6062 <note>
6063 <para>
6064 Paravirtualized debugging significantly alter guest operating
6065 system behaviour and should only be used by expert users for
6066 debugging and diagnostics.
6067 </para>
6068 </note>
6069
6070 <para>
6071 These debug options are specified as a string of key-value pairs
6072 separated by commas. An empty string disables paravirtualized
6073 debugging.
6074 </para>
6075
6076 <sect2 id="gimdebughyperv">
6077
6078 <title>Hyper-V Debug Options</title>
6079
6080 <para>
6081 All of the options listed below are optional, and thus the
6082 default value specified will be used when the corresponding
6083 key-value pair is not specified.
6084 </para>
6085
6086 <itemizedlist>
6087
6088 <listitem>
6089 <para>
6090 Key:
6091 <emphasis role="bold"><computeroutput>enabled</computeroutput></emphasis>
6092 </para>
6093
6094 <para>
6095 Value: <computeroutput>0</computeroutput> or
6096 <computeroutput>1</computeroutput>
6097 </para>
6098
6099 <para>
6100 Default: <computeroutput>0</computeroutput>
6101 </para>
6102
6103 <para>
6104 Specify <computeroutput>1</computeroutput> to enable the
6105 Hyper-V debug interface. If this key-value pair is not
6106 specified or the value is not
6107 <computeroutput>1</computeroutput>, the Hyper-V debug
6108 interface is disabled regardless of other key-value pairs
6109 being present.
6110 </para>
6111 </listitem>
6112
6113 <listitem>
6114 <para>
6115 Key:
6116 <emphasis role="bold"><computeroutput>address</computeroutput></emphasis>
6117 </para>
6118
6119 <para>
6120 Value: IPv4 address
6121 </para>
6122
6123 <para>
6124 Default: 127.0.0.1
6125 </para>
6126
6127 <para>
6128 Specify the IPv4 address where the remote debugger is
6129 connected.
6130 </para>
6131 </listitem>
6132
6133 <listitem>
6134 <para>
6135 Key:
6136 <emphasis role="bold"><computeroutput>port</computeroutput></emphasis>
6137 </para>
6138
6139 <para>
6140 Value: UDP port number
6141 </para>
6142
6143 <para>
6144 Default: 50000
6145 </para>
6146
6147 <para>
6148 Specify the UDP port number where the remote debugger is
6149 connected.
6150 </para>
6151 </listitem>
6152
6153 <listitem>
6154 <para>
6155 Key:
6156 <emphasis role="bold"><computeroutput>vendor</computeroutput></emphasis>
6157 </para>
6158
6159 <para>
6160 Value: Hyper-V vendor signature reported via CPUID to the
6161 guest
6162 </para>
6163
6164 <para>
6165 Default: When debugging is enabled:
6166 <computeroutput>Microsoft Hv</computeroutput>, otherwise:
6167 <computeroutput>VBoxVBoxVBox</computeroutput>
6168 </para>
6169
6170 <para>
6171 Specify the Hyper-V vendor signature which is exposed to the
6172 guest via CPUID. For debugging Microsoft Windows guests, it
6173 is required the hypervisor reports the Microsoft vendor.
6174 </para>
6175 </listitem>
6176
6177 <listitem>
6178 <para>
6179 Key:
6180 <emphasis role="bold"><computeroutput>hypercallinterface</computeroutput>
6181 </emphasis>
6182 </para>
6183
6184 <para>
6185 Value: <computeroutput>0</computeroutput> or
6186 <computeroutput>1</computeroutput>
6187 </para>
6188
6189 <para>
6190 Default: <computeroutput>0</computeroutput>
6191 </para>
6192
6193 <para>
6194 Specify whether hypercalls should be suggested for
6195 initiating debug data transfers between host and guest
6196 rather than MSRs when requested by the guest.
6197 </para>
6198 </listitem>
6199
6200 <listitem>
6201 <para>
6202 Key:
6203 <emphasis role="bold"><computeroutput>vsinterface</computeroutput>
6204 </emphasis>
6205 </para>
6206
6207 <para>
6208 Value: <computeroutput>0</computeroutput> or
6209 <computeroutput>1</computeroutput>
6210 </para>
6211
6212 <para>
6213 Default: When debugging is enabled,
6214 <computeroutput>1</computeroutput>, otherwise
6215 <computeroutput>0</computeroutput>
6216 </para>
6217
6218 <para>
6219 Specify whether to expose the "VS#1" (virtualization
6220 service) interface to the guest. This interface is required
6221 for debugging Microsoft Windows 10 32-bit guests, but is
6222 optional for other Windows versions.
6223 </para>
6224 </listitem>
6225
6226 </itemizedlist>
6227
6228 <sect3 id="gimdebughyperv-windows-setup">
6229
6230 <title>Setting up Windows Guests for Debugging with the Hyper-V
6231 Paravirtualization Provider</title>
6232
6233 <para>
6234 Windows supports debugging over a serial cable, USB, IEEE 1394
6235 Firewire, and Ethernet (only Windows 8 and later). USB and
6236 IEEE 1394 are not applicable for virtual machines, and
6237 Ethernet requires Windows 8 or later. While serial connection
6238 is universally usable, it is slow.
6239 </para>
6240
6241 <para>
6242 Debugging using the Hyper-V debug transport, supported on
6243 Windows Vista and later, offers significant benefits. It
6244 provides excellent performance due to direct host-to-guest
6245 transfers, it is easy to set up and requires minimal support
6246 from the hypervisor. It can be used with the debugger running
6247 on the same host as the VM or with the debugger and VM on
6248 separate machines connected over a network.
6249 </para>
6250
6251 <para>
6252 <emphasis role="bold">Prerequisites</emphasis>
6253 </para>
6254
6255 <itemizedlist>
6256
6257 <listitem>
6258 <para>
6259 A VM configured for Hyper-V paravirtualization running a
6260 Windows Vista or newer Windows guest. You may check the
6261 effective paravirtualization provider for your VM from the
6262 output of the following VBoxManage command:
6263 </para>
6264
6265 <para>
6266<screen>VBoxManage showvminfo "VM name"</screen>
6267 </para>
6268 </listitem>
6269
6270 <listitem>
6271 <para>
6272 A sufficiently up-to-date version of the Microsoft WinDbg
6273 debugger required to debug the version of Windows in your
6274 VM.
6275 </para>
6276 </listitem>
6277
6278 <listitem>
6279 <para>
6280 While Windows 8 and newer Windows guests ship with Hyper-V
6281 debug support, Windows 7 and Vista do not. To use Hyper-V
6282 debugging with a Windows 7 or Vista guest, copy the file
6283 <computeroutput>kdvm.dll</computeroutput> from a Windows
6284 8.0 installation
6285
6286 <footnote>
6287
6288 <para>
6289 Only Windows 8.0 ships
6290 <computeroutput>kdvm.dll</computeroutput>. Windows 8.1
6291 and newer Windows versions do not.
6292 </para>
6293
6294 </footnote>
6295
6296 . This file is typically located in
6297 <computeroutput>C:\Windows\System32</computeroutput>. Copy
6298 it to the same location in your Windows 7/Vista guest.
6299 Make sure you copy the 32-bit or 64-bit version of the DLL
6300 which matches your guest OS.
6301 </para>
6302 </listitem>
6303
6304 </itemizedlist>
6305
6306 <para>
6307 <emphasis role="bold">VM and Guest Configuration</emphasis>
6308 </para>
6309
6310 <orderedlist>
6311
6312 <listitem>
6313 <para>
6314 Power off the VM.
6315 </para>
6316 </listitem>
6317
6318 <listitem>
6319 <para>
6320 Enable the debug options by executing the following
6321 VBoxManage command:
6322 </para>
6323
6324 <para>
6325<screen>VBoxManage modifyvm "VM name" --paravirtdebug "enabled=1"</screen>
6326 </para>
6327
6328 <para>
6329 The above command assumes your debugger will connect to
6330 your host machine on UDP port 50000. However, if you need
6331 to run the debugger on a remote machine you may specify
6332 the remote address and port here. For example::
6333 </para>
6334
6335 <para>
6336<screen>VBoxManage modifyvm "VM name" --paravirtdebug "enabled=1,address=192.168.32.1,port=55000"</screen>
6337 </para>
6338
6339 <para>
6340 See <xref linkend="gimdebughyperv" /> for the complete set
6341 of options.
6342 </para>
6343 </listitem>
6344
6345 <listitem>
6346 <para>
6347 Start the VM.
6348 </para>
6349 </listitem>
6350
6351 <listitem>
6352 <para>
6353 In the guest, start an elevated command prompt and execute
6354 the following commands:
6355 </para>
6356
6357 <itemizedlist>
6358
6359 <listitem>
6360 <para>
6361 For a Windows 8 or newer Windows guest:
6362 </para>
6363
6364 <para>
6365<screen>bcdedit /dbgsettings net hostip:5.5.5.5 port:50000 key:1.2.3.4</screen>
6366 </para>
6367 </listitem>
6368
6369 <listitem>
6370 <para>
6371 For a Windows 7 or Vista guest:
6372 </para>
6373
6374 <para>
6375<screen>bcdedit /set loadoptions host_ip=5.5.5.5,host_port=50000,encryption_key=1.2.3.4</screen>
6376
6377<screen>bcdedit /set dbgtransport kdvm.dll</screen>
6378 </para>
6379
6380 <para>
6381 The IP address and port in the
6382 <computeroutput>bcdedit</computeroutput> command are
6383 ignored when using the Hyper-V debug transport. Any
6384 valid IP and a port number greater than 49151 and
6385 lower than 65536 can be entered.
6386 </para>
6387
6388 <para>
6389 The encryption key in the
6390 <computeroutput>bcdedit</computeroutput> command is
6391 relevant and must be valid. The key "1.2.3.4" used in
6392 the above example is valid and may be used if security
6393 is not a concern. If you do not specify any encryption
6394 key, <computeroutput>bcdedit</computeroutput> will
6395 generate one for you and you will need to copy this
6396 key to later enter in Microsoft WinDbg on the remote
6397 end. This encryption key is used to encrypt the debug
6398 data exchanged between Windows and the debugger.
6399 </para>
6400 </listitem>
6401
6402 <listitem>
6403 <para>
6404 Execute one or more of the following commands to
6405 enable debugging for the appropriate phase or
6406 component of your Windows guest:
6407 </para>
6408
6409 <para>
6410<screen>bcdedit /set debug on</screen>
6411
6412<screen>bcdedit /set bootdebug on</screen>
6413
6414<screen>bcdedit /set {bootmgr} bootdebug on</screen>
6415 </para>
6416
6417 <para>
6418 Please note that the
6419 <computeroutput>bootdebug</computeroutput> options are
6420 only effective on Windows 8 or newer when using the
6421 Hyper-V debug transport. Refer to Microsoft Windows
6422 documentation for detailed explanation of
6423 <computeroutput>bcdedit</computeroutput> options.
6424 </para>
6425 </listitem>
6426
6427 </itemizedlist>
6428 </listitem>
6429
6430 <listitem>
6431 <para>
6432 Start Microsoft WinDbg on your host machine or remote
6433 host.
6434 </para>
6435
6436 <para>
6437 From the <emphasis role="bold">File</emphasis> menu,
6438 select <emphasis role="bold">Kernel Debug</emphasis>. On
6439 the NET tab, specify the UDP port number you used in the
6440 <computeroutput>paravirtdebug</computeroutput> options. If
6441 you did not specify any, leave it as 50000. Ensure that
6442 the UDP port is not blocked by a firewall or other
6443 security software.
6444 </para>
6445
6446 <para>
6447 In the Key field, enter
6448 <computeroutput>1.2.3.4</computeroutput> or the encryption
6449 key from the <computeroutput>bcdedit</computeroutput>
6450 command in your Windows guest.
6451 </para>
6452
6453 <para>
6454 Click <emphasis role="bold">OK</emphasis> to start
6455 listening for connections. Microsoft WinDbg typically
6456 shows a "Waiting to reconnect" message during this phase.
6457 </para>
6458
6459 <para>
6460 Alternatively, launch WinDbg from the command line to
6461 directly start a debug session:
6462
6463<screen>windbg.exe -k net:port=50000,key=1.2.3.4</screen>
6464
6465 Please refer to the WinDbg documentation for complete
6466 command line syntax.
6467 </para>
6468 </listitem>
6469
6470 <listitem>
6471 <para>
6472 Reboot your Windows guest and it should then connect as a
6473 debuggee with Microsoft WinDbg.
6474 </para>
6475 </listitem>
6476
6477 </orderedlist>
6478
6479 </sect3>
6480
6481 </sect2>
6482
6483 </sect1>
6484
6485 <sect1 id="pcspeaker_passthrough">
6486
6487 <title>PC Speaker Passthrough</title>
6488
6489 <para>
6490 As an experimental feature, primarily due to being limited to
6491 Linux host only and unknown Linux distribution coverage,
6492 VirtualBox supports passing through the PC speaker to the host.
6493 The PC speaker, sometimes called the system speaker, is a way to
6494 produce audible feedback such as beeps without the need for
6495 regular audio and sound card support.
6496 </para>
6497
6498 <para>
6499 The PC speaker passthrough feature in VirtualBox handles beeps
6500 only. Advanced PC speaker use by the VM, such as PCM audio, will
6501 not work, resulting in undefined host behavior.
6502 </para>
6503
6504 <para>
6505 Producing beeps on Linux is a very complex topic. VirtualBox
6506 offers a collection of options, in an attempt to make this work
6507 deterministically and reliably on as many Linux distributions and
6508 system configurations as possible. These are summarized in
6509 <xref linkend="table-pcspeaker-config"/>.
6510 </para>
6511
6512 <table id="table-pcspeaker-config">
6513 <title>PC Speaker Configuration Options</title>
6514 <tgroup cols="3">
6515 <thead>
6516 <row>
6517 <entry><emphasis role="bold">Code</emphasis></entry>
6518 <entry><emphasis role="bold">Device</emphasis></entry>
6519 <entry><emphasis role="bold">Notes</emphasis></entry>
6520 </row>
6521 </thead>
6522 <tbody>
6523 <row>
6524 <entry>1</entry>
6525 <entry><computeroutput>/dev/input/ by-path/platform-
6526 pcspkr-event-spkr</computeroutput></entry>
6527 <entry>Direct host PC speaker use.</entry>
6528 </row>
6529 <row>
6530 <entry>2</entry>
6531 <entry><computeroutput>/dev/tty</computeroutput></entry>
6532 <entry>Uses the terminal association of the VM process. VM needs to be started
6533 on a virtual console.</entry>
6534 </row>
6535 <row>
6536 <entry>3</entry>
6537 <entry><computeroutput>/dev/tty0</computeroutput> or
6538 <computeroutput>/dev/vc/0</computeroutput></entry>
6539 <entry>Can only be used by user <computeroutput>root</computeroutput> or users
6540 with capability
6541 <computeroutput>cap_sys_tty_config</computeroutput></entry>
6542 </row>
6543 <row>
6544 <entry>9</entry>
6545 <entry>user specified console or evdev device path</entry>
6546 <entry>Like 1-3, just with a custom device path.</entry>
6547 </row>
6548 <row>
6549 <entry>70</entry>
6550 <entry><computeroutput>/dev/tty</computeroutput></entry>
6551 <entry>Standard beep only. Loses frequency and length. See code 2.</entry>
6552 </row>
6553 <row>
6554 <entry>79</entry>
6555 <entry>user specified terminal device path</entry>
6556 <entry>Like 70, just with a custom device path.</entry>
6557 </row>
6558 <row>
6559 <entry>100</entry>
6560 <entry>all of the above</entry>
6561 <entry>Tries all above codes.</entry>
6562 </row>
6563 </tbody>
6564 </tgroup>
6565 </table>
6566
6567 <para>
6568 To enable PC speaker passthrough use the following command:
6569
6570<screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/i8254/0/Config/PassthroughSpeaker" N</screen>
6571
6572 Replace <computeroutput>N</computeroutput> with the code
6573 representing the case you want to use. Changing this setting will
6574 take effect when the VM is started next. It is safe to enable PC
6575 speaker passthrough on all host OSes. It will only have an effect
6576 on Linux.
6577 </para>
6578
6579 <para>
6580 The VM log file, <computeroutput>VBox.log</computeroutput>, will
6581 contain lines with the prefix <computeroutput>PIT:
6582 speaker:</computeroutput> showing the PC speaker passthrough setup
6583 activities. It gives hints which device it picked or why it
6584 failed.
6585 </para>
6586
6587 <para>
6588 Enabling PC speaker passthrough for the VM is usually the simple
6589 part. The real difficulty is making sure that VirtualBox can
6590 access the necessary device, because in a typical Linux install
6591 most of them can only be accessed by user
6592 <computeroutput>root</computeroutput>. You should follow the
6593 preferred way to persistently change this, e.g. by referring to
6594 your distribution's documentation. Since there are countless Linux
6595 distribution variants, we can only give the general hints that
6596 there is often a way to give the X11 session user access to
6597 additional devices, or you need to find a working solution using a
6598 udev configuration file. If everything fails you might try setting
6599 the permissions using a script which is run late enough in the
6600 host system startup.
6601 </para>
6602
6603 <para>
6604 Sometimes additional rules are applied by the kernel to limit
6605 access (e.g. that the VM process must have the same controlling
6606 terminal as the device configured to be used for beeping,
6607 something which is often very difficult to achieve for GUI
6608 applications such as VirtualBox). The table above contains some
6609 hints, but generally refer to the Linux documentation.
6610 </para>
6611
6612 <para>
6613 If you have trouble getting any beeps even if the device
6614 permissions are set up and VBox.log confirms that it uses evdev or
6615 console for the PC speaker control, check if your system has a PC
6616 speaker. Some systems do not have one. Other complications can
6617 arise from Linux rerouting the PC speaker output to a sound card.
6618 Check if the beeps are audible if you connect speakers to your
6619 sound card. Today almost all systems have one. Finally, check if
6620 the audio mixer control has a channel named "beep" (could be
6621 hidden in the mixer settings) and that it is not muted.
6622 </para>
6623
6624 </sect1>
6625
6626 <sect1 id="usbip">
6627
6628 <title>Accessing USB devices Exposed Over the Network with USB/IP</title>
6629
6630 <para>
6631 Starting with 5.1.0, VirtualBox supports passing through USB
6632 devices which are exposed over the network using the USB over IP
6633 protocol without the need to configure the client side provided by
6634 the kernel and usbip tools. Furthermore, this feature works with
6635 VirtualBox running on any supported host, rather than just Linux
6636 alone, as is the case with the official client.
6637 </para>
6638
6639 <para>
6640 To enable support for passing through USB/IP devices, the device
6641 server exporting the devices must be added with the following
6642 command:
6643
6644<screen>VBoxManage usbdevsource add "Unique name" --backend "USBIP" --address "Device server[:port]"</screen>
6645
6646 USB devices exported on the device server are then accessible
6647 through the GUI or VBoxManage, like any USB devices attached
6648 locally. This can be used multiple times to access different
6649 device servers.
6650 </para>
6651
6652 <para>
6653 To remove a device server, the following command can be used:
6654
6655<screen>VBoxManage usbdevsource remove "Unique name"</screen>
6656 </para>
6657
6658 <sect2 id="usbip-setup-server">
6659
6660 <title>Setting up USB/IP Support on a Linux System</title>
6661
6662 <para>
6663 This section gives a brief overview on how to set up a Linux
6664 based system to act as a USB device server. The system on the
6665 server requires that the
6666 <computeroutput>usbip-core.ko</computeroutput> and
6667 <computeroutput>usbip-host.ko</computeroutput> kernel drivers
6668 are available, and that the USB/IP tools package is installed.
6669 The particular installation method for the necessary tools
6670 depends on which distribution is used. For example, for Debian
6671 based systems - the following command should be used to install
6672 the required tools:
6673
6674<screen>apt-get install usbip-utils</screen>
6675 </para>
6676
6677 <para>
6678 To check whether the necessary tools are already installed use
6679 the following command:
6680
6681<screen>
6682$ usbip list -l
6683 </screen>
6684 </para>
6685
6686 <para>
6687 This should produce output similar to that shown in the example
6688 below:
6689
6690<screen>
6691 - busid 4-2 (0bda:0301)
6692 Realtek Semiconductor Corp. : multicard reader (0bda:0301)
6693
6694 - busid 5-1 (046d:c52b)
6695 Logitech, Inc. : Unifying Receiver (046d:c52b)
6696 </screen>
6697 </para>
6698
6699 <para>
6700 If everything is installed, the USB/IP server needs to be
6701 started as <computeroutput>root</computeroutput> using the
6702 following command:
6703
6704<screen>usbipd -D</screen>
6705
6706 Refer to the documentation for the installed distribution to
6707 determine how to start the service when the system boots.
6708 </para>
6709
6710 <para>
6711 By default, no device on the server is exported. This must be
6712 done manually for each device. To export a device use:
6713
6714<screen>usbip bind -b "bus identifier"</screen>
6715
6716 To export the multicard reader from above, for example - use:
6717
6718<screen>usbip bind -b 4-2</screen>
6719 </para>
6720
6721 </sect2>
6722
6723 <sect2 id="usbip-security">
6724
6725 <title>Security Considerations</title>
6726
6727 <para>
6728 The communication between the server and client is unencrypted
6729 and there is no authorization required to access exported
6730 devices. An attacker might sniff sensitive data or gain control
6731 over a device. To mitigate this risk, the device should be
6732 exposed over a local network to which only trusted clients have
6733 access. To access the device remotely over a public network, a
6734 VPN solution should be used to provide the required level of
6735 security protection.
6736 </para>
6737
6738 </sect2>
6739
6740 </sect1>
6741
6742 <xi:include href="user_isomakercmd-man.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
6743
6744</chapter>
Note: See TracBrowser for help on using the repository browser.

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