VirtualBox

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

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

doc/manual: Updating manual section(s) related to GUI customization thru extra data.

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

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