VirtualBox

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

Last change on this file since 58472 was 58472, checked in by vboxsync, 9 years ago

doc/manual: Hyper-V debug transport, nit.

File size: 193.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4<chapter id="AdvancedTopics">
5 <title>Advanced topics</title>
6
7 <sect1 id="vboxsdl">
8 <title>VBoxSDL, the simplified VM displayer</title>
9
10 <sect2>
11 <title>Introduction</title>
12
13 <para>VBoxSDL is a simple graphical user interface (GUI) that lacks the
14 nice point-and-click support which VirtualBox, our main GUI, provides.
15 VBoxSDL is currently primarily used internally for debugging VirtualBox
16 and therefore not officially supported. Still, you may find it useful
17 for environments where the virtual machines are not necessarily
18 controlled by the same person that uses the virtual machine.<note>
19 <para>VBoxSDL is not available on the Mac OS X host platform.</para>
20 </note></para>
21
22 <para>As you can see in the following screenshot, VBoxSDL does indeed
23 only provide a simple window that contains only the "pure" virtual
24 machine, without menus or other controls to click upon and no additional
25 indicators of virtual machine activity:</para>
26
27 <para><mediaobject>
28 <imageobject>
29 <imagedata align="center" fileref="images/vbox-sdl.png"
30 width="10cm" />
31 </imageobject>
32 </mediaobject></para>
33
34 <para>To start a virtual machine with VBoxSDL instead of the VirtualBox
35 GUI, enter the following on a command line:<screen>VBoxSDL --startvm &lt;vm&gt;</screen></para>
36
37 <para>where <computeroutput>&lt;vm&gt;</computeroutput> is, as usual
38 with VirtualBox command line parameters, the name or UUID of an existing
39 virtual machine.</para>
40 </sect2>
41
42 <sect2>
43 <title>Secure labeling with VBoxSDL</title>
44
45 <para>When running guest operating systems in full screen mode, the guest
46 operating system usually has control over the whole screen. This could
47 present a security risk as the guest operating system might fool the
48 user into thinking that it is either a different system (which might
49 have a higher security level) or it might present messages on the screen
50 that appear to stem from the host operating system.</para>
51
52 <para>In order to protect the user against the above mentioned security
53 risks, the secure labeling feature has been developed. Secure labeling
54 is currently available only for VBoxSDL. When enabled, a portion of the
55 display area is reserved for a label in which a user defined message is
56 displayed. The label height in set to 20 pixels in VBoxSDL. The label
57 font color and background color can be optionally set as hexadecimal RGB
58 color values. The following syntax is used to enable secure
59 labeling:</para>
60
61 <screen>VBoxSDL --startvm "VM name"
62 --securelabel --seclabelfnt ~/fonts/arial.ttf
63 --seclabelsiz 14 --seclabelfgcol 00FF00 --seclabelbgcol 00FFFF</screen>
64
65 <para>In addition to enabling secure labeling, a TrueType font has to be
66 supplied. To use another font size than 12 point use the parameter
67 <computeroutput>--seclabelsiz</computeroutput>.</para>
68
69 <para>The label text can be set with <screen>VBoxManage setextradata "VM name" "VBoxSDL/SecureLabel" "The Label"</screen>
70 Changing this label will take effect immediately.</para>
71
72 <para>Typically, full screen resolutions are limited to certain
73 "standard" geometries such as 1024 x 768. Increasing this by twenty
74 lines is not usually feasible, so in most cases, VBoxSDL will chose the
75 next higher resolution, e.g. 1280 x 1024 and the guest's screen will not
76 cover the whole display surface. If VBoxSDL is unable to choose a higher
77 resolution, the secure label will be painted on top of the guest's
78 screen surface. In order to address the problem of the bottom part of
79 the guest screen being hidden, VBoxSDL can provide custom video modes to
80 the guest that are reduced by the height of the label. For Windows
81 guests and recent Solaris and Linux guests, the VirtualBox Guest
82 Additions automatically provide the reduced video modes. Additionally,
83 the VESA BIOS has been adjusted to duplicate its standard mode table
84 with adjusted resolutions. The adjusted mode IDs can be calculated using
85 the following formula:</para>
86
87 <screen>reduced_modeid = modeid + 0x30</screen>
88
89 <para>For example, in order to start Linux with 1024 x 748 x 16, the
90 standard mode 0x117 (1024 x 768 x 16) is used as a base. The Linux video
91 mode kernel parameter can then be calculated using:</para>
92
93 <screen>vga = 0x200 | 0x117 + 0x30
94vga = 839</screen>
95
96 <para>The reason for duplicating the standard modes instead of only
97 supplying the adjusted modes is that most guest operating systems
98 require the standard VESA modes to be fixed and refuse to start with
99 different modes.</para>
100
101 <para>When using the X.org VESA driver, custom modelines have to be
102 calculated and added to the configuration (usually in
103 <literal>/etc/X11/xorg.conf</literal>. A handy tool to determine
104 modeline entries can be found at <literal><ulink
105 url="http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html">http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html</ulink></literal>.)</para>
106 </sect2>
107
108 <sect2>
109 <title>Releasing modifiers with VBoxSDL on Linux</title>
110
111 <para>When switching from a X virtual terminal (VT) to another VT using
112 Ctrl-Alt-Fx while the VBoxSDL window has the input focus, the guest will
113 receive Ctrl and Alt keypress events without receiving the corresponding
114 key release events. This is an architectural limitation of Linux. In
115 order to reset the modifier keys, it is possible to send
116 <computeroutput>SIGUSR1</computeroutput> to the VBoxSDL main thread
117 (first entry in the <computeroutput>ps</computeroutput> list). For
118 example, when switching away to another VT and saving the virtual
119 machine from this terminal, the following sequence can be used to make
120 sure the VM is not saved with stuck modifiers:</para>
121
122 <para><screen>kill -usr1 &lt;pid&gt;
123VBoxManage controlvm "Windows 2000" savestate</screen></para>
124 </sect2>
125 </sect1>
126
127 <sect1 id="autologon">
128 <title>Automated guest logons</title>
129
130 <para>VirtualBox provides Guest Addition modules for Windows, Linux and
131 Solaris to enable automated logons on the guest.</para>
132
133 <para>When a guest operating system is running in a virtual machine, it
134 might be desirable to perform coordinated and automated logons using
135 credentials from a master logon system. (With "credentials", we are
136 referring to logon information consisting of user name, password and
137 domain name, where each value might be empty.)</para>
138
139 <sect2 id="autologon_win">
140 <title>Automated Windows guest logons</title>
141
142 <para>Since Windows NT, Windows has provided a modular system logon
143 subsystem ("Winlogon") which can be customized and extended by means of
144 so-called GINA modules (Graphical Identification and Authentication).
145 With Windows Vista and Windows 7, the GINA modules were replaced with a
146 new mechanism called "credential providers". The VirtualBox Guest
147 Additions for Windows come with both, a GINA and a credential provider
148 module, and therefore enable any Windows guest to perform automated
149 logons.</para>
150
151 <para>To activate the VirtualBox GINA or credential provider module,
152 install the Guest Additions with using the command line switch
153 <computeroutput>/with_autologon</computeroutput>. All the following
154 manual steps required for installing these modules will be then done by
155 the installer.</para>
156
157 <para>To manually install the VirtualBox GINA module, extract the Guest
158 Additions (see <xref linkend="windows-guest-file-extraction" />) and
159 copy the file <computeroutput>VBoxGINA.dll</computeroutput> to the
160 Windows <computeroutput>SYSTEM32</computeroutput> directory. Then, in
161 the registry, create the following key: <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL</screen>
162 with a value of <computeroutput>VBoxGINA.dll</computeroutput>.</para>
163
164 <note>
165 <para>The VirtualBox GINA module is implemented as a wrapper around
166 the standard Windows GINA module
167 (<computeroutput>MSGINA.DLL</computeroutput>). As a result, it will
168 most likely not work correctly with 3rd party GINA modules.</para>
169 </note>
170
171 <para>To manually install the VirtualBox credential provider module,
172 extract the Guest Additions (see <xref
173 linkend="windows-guest-file-extraction" />) and copy the file
174 <computeroutput>VBoxCredProv.dll</computeroutput> to the Windows
175 <computeroutput>SYSTEM32</computeroutput> directory. Then, in the
176 registry, create the following keys:<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
177 Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
178
179HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
180
181HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32</screen></para>
182
183 <para>with all default values (the key named
184 <computeroutput>(Default)</computeroutput> in each key) set to
185 <computeroutput>VBoxCredProv</computeroutput>. After that a new string
186 named <screen>HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel</screen>
187 with a value of <computeroutput>Apartment</computeroutput> has to be
188 created.</para>
189
190 <para>To set credentials, use the following command on a
191 <emphasis>running</emphasis> VM:</para>
192
193 <screen>VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST"</screen>
194
195 <para>While the VM is running, the credentials can be queried by the
196 VirtualBox logon modules (GINA or credential provider) using the
197 VirtualBox Guest Additions device driver. When Windows is in "logged
198 out" mode, the logon modules will constantly poll for credentials and if
199 they are present, a logon will be attempted. After retrieving the
200 credentials, the logon modules will erase them so that the above command
201 will have to be repeated for subsequent logons.</para>
202
203 <para>For security reasons, credentials are not stored in any persistent
204 manner and will be lost when the VM is reset. Also, the credentials are
205 "write-only", i.e. there is no way to retrieve the credentials from the
206 host side. Credentials can be reset from the host side by setting empty
207 values.</para>
208
209 <para>Depending on the particular variant of the Windows guest, the
210 following restrictions apply: <orderedlist>
211 <listitem>
212 <para>For <emphasis role="bold">Windows XP guests,</emphasis> the
213 logon subsystem needs to be configured to use the classic logon
214 dialog as the VirtualBox GINA module does not support the XP-style
215 welcome dialog.</para>
216 </listitem>
217
218 <listitem>
219 <para>For <emphasis role="bold">Windows Vista, Windows 7
220 and Windows 8 guests,</emphasis> the logon subsystem does not support
221 the so-called Secure Attention Sequence
222 (<computeroutput>CTRL+ALT+DEL</computeroutput>). As a result, the
223 guest's group policy settings need to be changed to not use the
224 Secure Attention Sequence. Also, the user name given is only
225 compared to the true user name, not the user friendly name. This
226 means that when you rename a user, you still have to supply the
227 original user name (internally, Windows never renames user
228 accounts).</para>
229 </listitem>
230
231 <listitem>
232 <para>Auto-logon handling of the built-in Windows Remote Desktop
233 Service (formerly known as Terminal Services) is disabled by
234 default. To enable it, create the registry key <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox Guest Additions\AutoLogon</screen>
235 with a <computeroutput>DWORD</computeroutput> value of
236 <computeroutput>1</computeroutput>.</para>
237 </listitem>
238 </orderedlist></para>
239
240 <para>The following command forces VirtualBox to keep the credentials
241 after they were read by the guest and on VM reset: <screen>VBoxManage setextradata "Windows XP" VBoxInternal/Devices/VMMDev/0/Config/KeepCredentials 1</screen>Note
242 that this is a potential security risk as a malicious application
243 running on the guest could request this information using the proper
244 interface.</para>
245 </sect2>
246
247 <sect2 id="autologon_unix">
248 <title>Automated Linux/Unix guest logons</title>
249
250 <para>Starting with version 3.2, VirtualBox provides a custom PAM module
251 (Pluggable Authentication Module) which can be used to perform automated
252 guest logons on platforms which support this framework. Virtually all
253 modern Linux/Unix distributions rely on PAM.</para>
254
255 <para>For automated logons on Ubuntu (or Ubuntu-derived) distributions
256 using LightDM as the display manager, please see
257 <xref linkend="autologon_unix_lightdm" />.</para>
258
259 <para>The <computeroutput>pam_vbox.so</computeroutput> module itself
260 <emphasis role="bold">does not</emphasis> do an actual verification of
261 the credentials passed to the guest OS; instead it relies on other
262 modules such as <computeroutput>pam_unix.so</computeroutput> or
263 <computeroutput>pam_unix2.so</computeroutput> down in the PAM stack to
264 do the actual validation using the credentials retrieved by
265 <computeroutput>pam_vbox.so</computeroutput>. Therefore
266 <computeroutput>pam_vbox.so</computeroutput> has to be on top of the
267 authentication PAM service list.</para>
268
269 <note>
270 <para>The <computeroutput>pam_vbox.so</computeroutput> only supports
271 the <computeroutput>auth</computeroutput> primitive. Other primitives
272 such as <computeroutput>account</computeroutput>,
273 <computeroutput>session</computeroutput> or
274 <computeroutput>password</computeroutput> are not supported.</para>
275 </note>
276
277 <para>The <computeroutput>pam_vbox.so</computeroutput> module is shipped
278 as part of the Guest Additions but it is not installed and/or activated
279 on the guest OS by default. In order to install it, it has to be copied
280 from
281 <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions/</computeroutput>
282 to the security modules directory, usually
283 <computeroutput>/lib/security/</computeroutput> on 32-bit guest Linuxes
284 or <computeroutput>/lib64/security/</computeroutput> on 64-bit ones.
285 Please refer to your guest OS documentation for the correct PAM module
286 directory.</para>
287
288 <para>For example, to use <computeroutput>pam_vbox.so</computeroutput>
289 with a Ubuntu Linux guest OS and GDM (the GNOME Desktop Manager) to
290 logon users automatically with the credentials passed by the host, the
291 guest OS has to be configured like the following:</para>
292
293 <orderedlist>
294 <listitem>
295 <para>The <computeroutput>pam_vbox.so</computeroutput> module has to
296 be copied to the security modules directory, in this case it is
297 <computeroutput>/lib/security</computeroutput>.</para>
298 </listitem>
299
300 <listitem>
301 <para>Edit the PAM configuration file for GDM found at
302 <computeroutput>/etc/pam.d/gdm</computeroutput>, adding the line
303 <computeroutput>auth requisite pam_vbox.so</computeroutput> at the
304 top. Additionaly, in most Linux distributions there is a file called
305 <computeroutput>/etc/pam.d/common-auth</computeroutput>. This file
306 is included in many other services (like the GDM file mentioned
307 above). There you also have to add the line <computeroutput>auth
308 requisite pam_vbox.so</computeroutput>.</para>
309 </listitem>
310
311 <listitem>
312 <para>If authentication against the shadow database using
313 <computeroutput>pam_unix.so</computeroutput> or
314 <computeroutput>pam_unix2.so</computeroutput> is desired, the
315 argument <computeroutput>try_first_pass</computeroutput> for
316 <computeroutput>pam_unix.so</computeroutput> or
317 <computeroutput>use_first_pass</computeroutput> for
318 <computeroutput>pam_unix2.so</computeroutput> is needed in order to
319 pass the credentials from the VirtualBox module to the shadow
320 database authentication module. For Ubuntu, this needs to be added
321 to <computeroutput>/etc/pam.d/common-auth</computeroutput>, to the
322 end of the line referencing
323 <computeroutput>pam_unix.so</computeroutput>. This argument tells
324 the PAM module to use credentials already present in the stack, i.e.
325 the ones provided by the VirtualBox PAM module.</para>
326 </listitem>
327 </orderedlist>
328
329 <para><warning>
330 <para>An incorrectly configured PAM stack can effectively prevent
331 you from logging into your guest system!</para>
332 </warning></para>
333
334 <para>To make deployment easier, you can pass the argument
335 <computeroutput>debug</computeroutput> right after the
336 <computeroutput>pam_vbox.so</computeroutput> statement. Debug log output
337 will then be recorded using syslog.</para>
338
339 <para><note>
340 <para>By default, pam_vbox will not wait for credentials to arrive
341 from the host, in other words: When a login prompt is shown (for
342 example by GDM/KDM or the text console) and pam_vbox does not yet
343 have credentials it does not wait until they arrive. Instead the
344 next module in the PAM stack (depending on the PAM configuration)
345 will have the chance for authentication.</para>
346 </note></para>
347
348 <para>Starting with VirtualBox 4.1.4 pam_vbox supports various guest
349 property parameters which all reside in
350 <computeroutput>/VirtualBox/GuestAdd/PAM/</computeroutput>. These
351 parameters allow pam_vbox to wait for credentials to be provided by the
352 host and optionally can show a message while waiting for those. The
353 following guest properties can be set:</para>
354
355 <orderedlist>
356 <listitem>
357 <para><computeroutput>CredsWait</computeroutput>: Set to "1" if
358 pam_vbox should start waiting until credentials arrive from the
359 host. Until then no other authentication methods such as manually
360 logging in will be available. If this property is empty or get
361 deleted no waiting for credentials will be performed and pam_vbox
362 will act like before (see paragraph above). This property must be
363 set read-only for the guest
364 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
365 </listitem>
366
367 <listitem>
368 <para><computeroutput>CredsWaitAbort</computeroutput>: Aborts waiting
369 for credentials when set to any value. Can be set from host and the
370 guest.</para>
371 </listitem>
372
373 <listitem>
374 <para><computeroutput>CredsWaitTimeout</computeroutput>: Timeout (in
375 seconds) to let pam_vbox wait for credentials to arrive. When no
376 credentials arrive within this timeout, authentication of pam_vbox
377 will be set to failed and the next PAM module in chain will be
378 asked. If this property is not specified, set to "0" or an invalid
379 value, an infinite timeout will be used. This property must be set
380 read-only for the guest
381 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
382 </listitem>
383 </orderedlist>
384
385 <para>To customize pam_vbox further there are the following guest
386 properties:</para>
387
388 <orderedlist>
389 <listitem>
390 <para><computeroutput>CredsMsgWaiting</computeroutput>: Custom
391 message showed while pam_vbox is waiting for credentials from the
392 host. This property must be set read-only for the guest
393 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
394 </listitem>
395
396 <listitem>
397 <para><computeroutput>CredsMsgWaitTimeout</computeroutput>: Custom
398 message showed when waiting for credentials by pam_vbox timed out,
399 e.g. did not arrive within time. This property must be set read-only
400 for the guest (<computeroutput>RDONLYGUEST</computeroutput>).</para>
401 </listitem>
402 </orderedlist>
403
404 <para><note>
405 <para>If a pam_vbox guest property does not have set the right flags
406 (<computeroutput>RDONLYGUEST</computeroutput>) this property will be
407 ignored then and - depending on the property - a default value will
408 be set. This can result in pam_vbox not waiting for credentials.
409 Consult the appropriate syslog file for more information and use the
410 <computeroutput>debug</computeroutput> option.</para>
411 </note></para>
412
413 <sect3 id="autologon_unix_lightdm">
414 <title>VirtualBox Greeter for Ubuntu / LightDM</title>
415
416 <para>Starting with version 4.2.12, VirtualBox comes with an own greeter
417 module named vbox-greeter which can be used with LightDM 1.0.1 or later.
418 LightDM is the default display manager since Ubuntu 10.11 and therefore
419 also can be used for automated guest logons.</para>
420
421 <para>vbox-greeter does not need the pam_vbox module described above
422 in order to function -- it comes with its own authentication mechanism
423 provided by LightDM. However, to provide maximum of flexibility both
424 modules can be used together on the same guest.</para>
425
426 <para>As for the pam_vbox module, vbox-greeter is shipped as part of
427 the Guest Additions but it is not installed and/or activated on the
428 guest OS by default For installing vbox-greeter automatically upon
429 Guest Additions installation, use the
430 <computeroutput>--with-autologon</computeroutput> switch when starting
431 the VBoxLinuxAdditions.run file:</para><screen># ./VBoxLinuxAdditions.run -- --with-autologon</screen>
432
433 <para>For manual or postponed installation, the
434 <computeroutput>vbox-greeter.desktop</computeroutput>
435 file has to be copied from
436 <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/shared/VBoxGuestAdditions/</computeroutput>
437 to the <computeroutput>xgreeters</computeroutput> directory, usually
438 <computeroutput>/usr/share/xgreeters/</computeroutput>.
439 Please refer to your guest OS documentation for the correct LightDM
440 greeter directory.</para>
441
442 <para>The vbox-greeter module itself already was installed by the
443 VirtualBox Guest Additions installer and resides in
444 <computeroutput>/usr/sbin/</computeroutput>. To enable vbox-greeter as
445 the standard greeter module, the file
446 <computeroutput>/etc/lightdm/lightdm.conf</computeroutput> needs to be
447 edited:</para>
448
449 <para><screen>[SeatDefaults]
450greeter-session=vbox-greeter</screen></para>
451
452 <note><para>The LightDM server needs to be fully restarted in order to
453 get vbox-greeter used as the default greeter. As root, do a
454 <computeroutput>service lightdm --full-restart</computeroutput> on
455 Ubuntu, or simply restart the guest.</para></note>
456
457 <note><para>vbox-greeter is independent of the graphical session chosen
458 by the user (like Gnome, KDE, Unity etc). However, it requires FLTK 1.3
459 for representing its own user interface.</para></note>
460
461 <para>There are numerous guest properties which can be used to further
462 customize the login experience. For automatically logging in users, the
463 same guest properties apply as for pam_vbox, see
464 <xref linkend="autologon_unix" />.</para>
465
466 <para>In addition to the above mentioned guest properties, vbox-greeter
467 allows further customization of its user interface. These special guest
468 properties all reside in
469 <computeroutput>/VirtualBox/GuestAdd/Greeter/</computeroutput>:</para>
470
471 <orderedlist>
472 <listitem>
473 <para><computeroutput>HideRestart</computeroutput>: Set to "1" if
474 vbox-greeter should hide the button to restart the guest. This
475 property must be set read-only for the guest
476 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
477 </listitem>
478
479 <listitem>
480 <para><computeroutput>HideShutdown</computeroutput>: Set to "1" if
481 vbox-greeter should hide the button to shutdown the guest. This
482 property must be set read-only for the guest
483 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
484 </listitem>
485
486 <listitem>
487 <para><computeroutput>BannerPath</computeroutput>: Path to a .PNG
488 file for using it as a banner on the top. The image size must be
489 460 x 90 pixels, any bit depth. This property must be
490 set read-only for the guest
491 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
492 </listitem>
493
494 <listitem>
495 <para><computeroutput>UseTheming</computeroutput>: Set to "1" for
496 turning on the following theming options. This property must be
497 set read-only for the guest
498 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
499 </listitem>
500
501 <listitem>
502 <para><computeroutput>Theme/BackgroundColor</computeroutput>:
503 Hexadecimal RRGGBB color for the background. This property must be
504 set read-only for the guest
505 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
506 </listitem>
507
508 <listitem>
509 <para><computeroutput>Theme/LogonDialog/HeaderColor</computeroutput>:
510 Hexadecimal RRGGBB foreground color for the header text. This
511 property must be set read-only for the guest
512 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
513 </listitem>
514
515 <listitem>
516 <para><computeroutput>Theme/LogonDialog/BackgroundColor</computeroutput>:
517 Hexadecimal RRGGBB color for the logon dialog background. This
518 property must be set read-only for the guest
519 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
520 </listitem>
521
522 <listitem>
523 <para><computeroutput>Theme/LogonDialog/ButtonColor</computeroutput>:
524 Hexadecimal RRGGBB background color for the logon dialog button. This
525 property must be set read-only for the guest
526 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
527 </listitem>
528 </orderedlist>
529
530 <note><para>The same restrictions for the guest properties above apply
531 as for the ones specified in the pam_vbox section.</para></note>
532 </sect3>
533 </sect2>
534 </sect1>
535
536 <sect1>
537 <title>Advanced configuration for Windows guests</title>
538
539 <sect2 id="sysprep">
540 <title>Automated Windows system preparation</title>
541
542 <para>Beginning with Windows NT 4.0, Microsoft offers a "system
543 preparation" tool (in short: Sysprep) to prepare a Windows system for
544 deployment or redistribution. Whereas Windows 2000 and XP ship with
545 Sysprep on the installation medium, the tool also is available for
546 download on the Microsoft web site. In a standard installation of
547 Windows Vista and 7, Sysprep is already included. Sysprep mainly
548 consists of an executable called
549 <computeroutput>sysprep.exe</computeroutput> which is invoked by the
550 user to put the Windows installation into preparation mode.</para>
551
552 <para>Starting with VirtualBox 3.2.2, the Guest Additions offer a way to
553 launch a system preparation on the guest operating system in an
554 automated way, controlled from the host system. To achieve that, see
555 <xref linkend="guestadd-guestcontrol" /> for using the feature with the
556 special identifier <computeroutput>sysprep</computeroutput> as the
557 program to execute, along with the user name
558 <computeroutput>sysprep</computeroutput> and password
559 <computeroutput>sysprep</computeroutput> for the credentials. Sysprep
560 then gets launched with the required system rights.</para>
561
562 <note>
563 <para>Specifying the location of "sysprep.exe" is <emphasis
564 role="bold">not possible</emphasis> -- instead the following paths are
565 used (based on the operating system): <itemizedlist>
566 <listitem>
567 <para><computeroutput>C:\sysprep\sysprep.exe</computeroutput>
568 for Windows NT 4.0, 2000 and XP</para>
569 </listitem>
570
571 <listitem>
572 <para><computeroutput>%WINDIR%\System32\Sysprep\sysprep.exe</computeroutput>
573 for Windows Vista, 2008 Server and 7</para>
574 </listitem>
575 </itemizedlist> The Guest Additions will automatically use the
576 appropriate path to execute the system preparation tool.</para>
577 </note>
578 </sect2>
579 </sect1>
580
581 <sect1>
582 <title>Advanced configuration for Linux and Solaris guests</title>
583
584 <sect2>
585 <title>Manual setup of selected guest services on Linux</title>
586
587 <para>The VirtualBox Guest Additions contain several different drivers.
588 If for any reason you do not wish to set them all up, you can install
589 the Guest Additions using the following command:</para>
590
591 <screen> sh ./VBoxLinuxAdditions.run no_setup</screen>
592
593 <para>After this, you will need to at least compile the kernel modules
594 by running the command <screen> rcvboxadd setup</screen>
595 as root (you will need to replace <emphasis>lib</emphasis> by
596 <emphasis>lib64</emphasis> on some 64bit guests), and on older guests
597 without the udev service you will need to add the
598 <emphasis>vboxadd</emphasis> service to the default runlevel to ensure
599 that the modules get loaded.</para>
600
601 <para>To setup the time synchronization service,
602 add the service vboxadd-service to the default runlevel. To set up the
603 X11 and OpenGL part of the Guest Additions, run the command
604 <screen> rcvboxadd-x11 setup</screen>
605 (you do not need to enable any services for this).</para>
606
607 <para>To recompile the guest kernel modules, use this command:
608 <screen> rcvboxadd setup</screen>
609 After compilation you should reboot your guest to ensure that the new
610 modules are actually used.</para>
611 </sect2>
612
613 <sect2 id="guestxorgsetup">
614 <title>Guest graphics and mouse driver setup in depth</title>
615
616 <para>This section assumes that you are familiar with configuring the
617 X.Org server using xorg.conf and optionally the newer mechanisms using
618 hal or udev and xorg.conf.d. If not you can learn about them by studying
619 the documentation which comes with X.Org.</para>
620
621 <para>The VirtualBox Guest Additions come with drivers for X.Org
622 versions <itemizedlist>
623 <listitem>
624 <para>X11R6.8/X11R6.9 and XFree86 version 4.3 (vboxvideo_drv_68.o and vboxmouse_drv_68.o)</para>
625 </listitem>
626
627 <listitem>
628 <para>X11R7.0 (vboxvideo_drv_70.so and vboxmouse_drv_70.so)</para>
629 </listitem>
630
631 <listitem>
632 <para>X11R7.1 (vboxvideo_drv_71.so and vboxmouse_drv_71.so)</para>
633 </listitem>
634
635 <listitem>
636 <para>X.Org Server versions 1.3 and later (vboxvideo_drv_13.so and vboxmouse_drv_13.so and so on).</para>
637 </listitem>
638 </itemizedlist> By default these drivers can be found in the
639 directory</para>
640
641 <para><computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions</computeroutput></para>
642
643 <para>and the correct versions for the X server are symbolically linked
644 into the X.Org driver directories.</para>
645
646 <para>For graphics integration to work correctly, the X server must load
647 the vboxvideo driver (many recent X server versions look for it
648 automatically if they see that they are running in VirtualBox) and for
649 an optimal user experience the guest kernel drivers must be loaded and
650 the Guest Additions tool VBoxClient must be running as a client in the X
651 session. For mouse integration to work correctly, the guest kernel
652 drivers must be loaded and in addition, in X servers from X.Org X11R6.8
653 to X11R7.1 and in XFree86 version 4.3 the right vboxmouse driver must be
654 loaded and associated with /dev/mouse or /dev/psaux; in X.Org server 1.3
655 or later a driver for a PS/2 mouse must be loaded and the right
656 vboxmouse driver must be associated with /dev/vboxguest.</para>
657
658 <para>The VirtualBox guest graphics driver can use any graphics
659 configuration for which the virtual resolution fits into the virtual
660 video memory allocated to the virtual machine (minus a small amount used
661 by the guest driver) as described in <xref
662 linkend="settings-display" />. The driver will offer a range of standard
663 modes at least up to the default guest resolution for all active guest
664 monitors. In X.Org Server 1.3 and later the default mode can be changed
665 by setting the output property VBOX_MODE to
666 "&lt;width&gt;x&lt;height&gt;" for any guest monitor. When VBoxClient
667 and the kernel drivers are active this is done automatically when the
668 host requests a mode change. The driver for older versions can only
669 receive new modes by querying the host for requests at regular
670 intervals.</para>
671
672 <para>With pre-1.3 X Servers you can also add your own modes to the X
673 server configuration file. You simply need to add them to the "Modes"
674 list in the "Display" subsection of the "Screen" section. For example,
675 the section shown here has a custom 2048x800 resolution mode
676 added:</para>
677
678 <screen>Section "Screen"
679 Identifier "Default Screen"
680 Device "VirtualBox graphics card"
681 Monitor "Generic Monitor"
682 DefaultDepth 24
683 SubSection "Display"
684 Depth 24
685 Modes "2048x800" "800x600" "640x480"
686 EndSubSection
687EndSection</screen>
688 </sect2>
689 </sect1>
690
691 <sect1 id="cpuhotplug">
692 <title>CPU hot-plugging</title>
693
694 <para>With virtual machines running modern server operating systems,
695 VirtualBox supports CPU hot-plugging.<footnote>
696 <para>Support for CPU hot-plugging was introduced with VirtualBox
697 3.2.</para>
698 </footnote> Whereas on a physical computer this would mean that a CPU
699 can be added or removed while the machine is running, VirtualBox supports
700 adding and removing virtual CPUs while a virtual machine is
701 running.</para>
702
703 <para>CPU hot-plugging works only with guest operating systems that
704 support it. So far this applies only to Linux and Windows Server 2008 x64
705 Data Center Edition. Windows supports only hot-add while Linux supports
706 hot-add and hot-remove but to use this feature with more than 8 CPUs a
707 64bit Linux guest is required.</para>
708
709 <para>At this time, CPU hot-plugging requires using the VBoxManage
710 command-line interface. First, hot-plugging needs to be enabled for a
711 virtual machine:<screen>VBoxManage modifyvm "VM name" --cpuhotplug on</screen></para>
712
713 <para>After that, the --cpus option specifies the maximum number of CPUs
714 that the virtual machine can have:<screen>VBoxManage modifyvm "VM name" --cpus 8</screen>When
715 the VM is off, you can then add and remove virtual CPUs with the modifyvm
716 --plugcpu and --unplugcpu subcommands, which take the number of the
717 virtual CPU as a parameter, like this:<screen>VBoxManage modifyvm "VM name" --plugcpu 3
718VBoxManage modifyvm "VM name" --unplugcpu 3</screen>Note that CPU 0 can never
719 be removed.</para>
720
721 <para>While the VM is running, CPUs can be added with the
722 <computeroutput>controlvm plugcpu/unplugcpu</computeroutput> commands
723 instead:<screen>VBoxManage controlvm "VM name" plugcpu 3
724VBoxManage controlvm "VM name" unplugcpu 3</screen></para>
725
726 <para>See <xref linkend="vboxmanage-modifyvm" /> and <xref
727 linkend="vboxmanage-controlvm" /> for details.</para>
728
729 <para>With Linux guests, the following applies: To prevent ejection while
730 the CPU is still used it has to be ejected from within the guest before.
731 The Linux Guest Additions contain a service which receives hot-remove
732 events and ejects the CPU. Also, after a CPU is added to the VM it is not
733 automatically used by Linux. The Linux Guest Additions service will take
734 care of that if installed. If not a CPU can be started with the following
735 command:<screen>echo 1 &gt; /sys/devices/system/cpu/cpu&lt;id&gt;/online</screen></para>
736 </sect1>
737
738 <sect1 id="pcipassthrough">
739 <title>PCI passthrough</title>
740
741 <para>When running on Linux hosts, with a recent enough kernel (at least
742 version <computeroutput>2.6.31</computeroutput>) experimental host PCI
743 devices passthrough is available.<footnote>
744 <para>Experimental support for PCI passthrough was introduced with
745 VirtualBox 4.1.</para>
746 </footnote></para>
747
748 <note>
749 <para>The PCI passthrough module is shipped as a VirtualBox extension
750 package, which must be installed separately. See <xref
751 linkend="intro-installing" /> for more information.</para>
752 </note>
753
754 <para>Essentially this feature allows to directly use physical PCI devices
755 on the host by the guest even if host doesn't have drivers for this
756 particular device. Both, regular PCI and some PCI Express cards, are
757 supported. AGP and certain PCI Express cards are not supported at the
758 moment if they rely on GART (Graphics Address Remapping Table) unit
759 programming for texture management as it does rather nontrivial operations
760 with pages remapping interfering with IOMMU. This limitation may be lifted
761 in future releases.</para>
762
763 <para>To be fully functional, PCI passthrough support in VirtualBox
764 depends upon an IOMMU hardware unit which is not yet too widely available.
765 If the device uses bus mastering (i.e. it performs DMA to the OS memory on
766 its own), then an IOMMU is required, otherwise such DMA transactions may
767 write to the wrong physical memory address as the device DMA engine is
768 programmed using a device-specific protocol to perform memory
769 transactions. The IOMMU functions as translation unit mapping physical
770 memory access requests from the device using knowledge of the guest
771 physical address to host physical addresses translation rules.</para>
772
773 <para>Intel's solution for IOMMU is marketed as "Intel Virtualization
774 Technology for Directed I/O" (VT-d), and AMD's one is called AMD-Vi. So
775 please check if your motherboard datasheet has appropriate technology.
776 Even if your hardware doesn't have a IOMMU, certain PCI cards may work
777 (such as serial PCI adapters), but the guest will show a warning on boot
778 and the VM execution will terminate if the guest driver will attempt to
779 enable card bus mastering.</para>
780
781 <para>It is very common that the BIOS or the host OS disables the IOMMU by
782 default. So before any attempt to use it please make sure that
783 <orderedlist>
784 <listitem>
785 <para>Your motherboard has an IOMMU unit.</para>
786 </listitem>
787
788 <listitem>
789 <para>Your CPU supports the IOMMU.</para>
790 </listitem>
791
792 <listitem>
793 <para>The IOMMU is enabled in the BIOS.</para>
794 </listitem>
795
796 <listitem>
797 <para>The VM must run with VT-x/AMD-V and nested paging
798 enabled.</para>
799 </listitem>
800
801 <listitem>
802 <para>Your Linux kernel was compiled with IOMMU support (including
803 DMA remapping, see <computeroutput>CONFIG_DMAR</computeroutput>
804 kernel compilation option). The PCI stub driver
805 (<computeroutput>CONFIG_PCI_STUB</computeroutput>) is required as
806 well.</para>
807 </listitem>
808
809 <listitem>
810 <para>Your Linux kernel recognizes and uses the IOMMU unit
811 (<computeroutput>intel_iommu=on</computeroutput> boot option could
812 be needed). Search for DMAR and PCI-DMA in kernel boot log.</para>
813 </listitem>
814 </orderedlist></para>
815
816 <para>Once you made sure that the host kernel supports the IOMMU, the next
817 step is to select the PCI card and attach it to the guest. To figure out
818 the list of available PCI devices, use the
819 <computeroutput>lspci</computeroutput> command. The output will look like
820 this:</para>
821 <screen>01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450]
82201:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
82302:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit
824 Ethernet controller (rev 03)
82503:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
82603:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
82706:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8500 GT] (rev a1)</screen>
828 <para>The first column is a PCI address (in format
829 <computeroutput>bus:device.function</computeroutput>). This address could
830 be used to identify the device for further operations. For example, to
831 attach a PCI network controller on the system listed above to the second
832 PCI bus in the guest, as device 5, function 0, use the following command:
833 <screen>VBoxManage modifyvm "VM name" --pciattach 02:00.0@01:05.0</screen>
834 To detach same device, use <screen>VBoxManage modifyvm "VM name" --pcidetach 02:00.0</screen>
835 Please note that both host and guest could freely assign a different PCI
836 address to the card attached during runtime, so those addresses only apply
837 to the address of the card at the moment of attachment (host), and during
838 BIOS PCI init (guest).</para>
839
840 <para>If the virtual machine has a PCI device attached, certain
841 limitations apply: <orderedlist>
842 <listitem>
843 <para>Only PCI cards with non-shared interrupts (such as using MSI on host) are supported at the moment.</para>
844 </listitem>
845
846 <listitem>
847 <para>No guest state can be reliably saved/restored (as the internal state of the PCI card could not be retrieved).</para>
848 </listitem>
849
850 <listitem>
851 <para>Teleportation (live migration) doesn't work (for the same reason).</para>
852 </listitem>
853
854 <listitem>
855 <para>No lazy physical memory allocation. The host will preallocate the whole RAM required for the VM on startup (as we cannot catch physical hardware accesses to the physical memory).</para>
856 </listitem>
857 </orderedlist></para>
858 </sect1>
859
860 <sect1>
861 <title>Webcam passthrough</title>
862
863 <sect2 id="webcam-passthrough">
864 <title>Using a host webcam in the guest</title>
865
866 <para>VirtualBox 4.3 includes an experimental feature which allows a guest to use
867 a host webcam. This complements the general USB passthrough support which was the
868 typical way of using host webcams in earlier versions. The webcam passthrough support
869 can handle non-USB video sources in theory, but this is completely untested.</para>
870
871 <note>
872 <para>The webcam passthrough module is shipped as part of the Oracle VM VirtualBox
873 extension pack, which must be installed separately. See <xref
874 linkend="intro-installing" /> for more information.</para>
875 </note>
876
877 <para>The host webcam can be attached to the VM using "Devices" menu in the VM menu bar.
878 The "Webcams" menu contains a list of available video input devices on the host.
879 Clicking on a webcam name attaches or detaches the corresponding host device.</para>
880
881 <para>The VBoxManage command line tool can be used to enable webcam passthrough.
882 Please see the host-specific sections below for additional details.
883 The following commands are available:
884 <itemizedlist>
885 <listitem><para>Get a list of host webcams (or other video input devices):
886 <screen>VBoxManage list webcams</screen>
887 The output format:
888 <screen>alias "user friendly name"
889host path or identifier</screen>
890 The alias can be used as a shortcut in other commands. Alias '.0' means
891 default video input device on the host, '.1', '.2', etc mean first, second, etc
892 video input device. The device order is host-specific.
893 </para></listitem>
894 <listitem><para>Attach a webcam to a running VM:
895 <screen>VBoxManage controlvm "VM name" webcam attach [host_path|alias [settings]]</screen>
896 This will attach a USB webcam device to the guest.</para>
897
898 <para>The <computeroutput>settings</computeroutput> parameter is a string
899 <computeroutput>Setting1=Value1;Setting2=Value2</computeroutput>, which allows to
900 configure the emulated webcam device. The following settings are supported:
901 <itemizedlist>
902 <listitem>
903 <para><computeroutput>MaxFramerate</computeroutput> The highest rate at which video frames
904 are sent to the guest. A higher frame rate requires more CPU power. Therefore sometimes
905 it is useful to set a lower limit. Default is no limit and allow the guest to use all
906 frame rates supported by the host webcam.</para>
907 </listitem>
908 <listitem>
909 <para><computeroutput>MaxPayloadTransferSize</computeroutput> How many bytes the emulated
910 webcam can send to the guest at a time. Default value is 3060 bytes, which is used by
911 some webcams. Higher values can slightly reduce CPU load, if the guest is able to use
912 larger buffers. However, a high <computeroutput>MaxPayloadTransferSize</computeroutput>
913 might be not supported by some guests.</para>
914 </listitem>
915 </itemizedlist>
916 </para></listitem>
917 <listitem><para>Detach a webcam from a running VM:
918 <screen>VBoxManage controlvm "VM name" webcam detach [host_path|alias]</screen>
919 </para></listitem>
920 <listitem><para>List webcams attached to a running VM:
921 <screen>VBoxManage controlvm "VM name" webcam list</screen>
922 The output contains path or alias which was used in 'webcam attach' command for
923 each attached webcam.
924 </para></listitem>
925 </itemizedlist>
926 </para>
927 </sect2>
928
929 <sect2>
930 <title>Windows hosts</title>
931
932 <para>When the webcam device is detached from the host, the emulated webcam device is
933 automatically detached from the guest.</para>
934 </sect2>
935
936 <sect2>
937 <title>Mac OS X hosts</title>
938
939 <para>OS X version 10.7 or newer is required.</para>
940
941 <para>When the webcam device is detached from the host, the emulated webcam device
942 remains attached to the guest and must be manually detached using the
943 <computeroutput>VBoxManage controlvm "VM name" webcam detach ...</computeroutput> command.</para>
944 </sect2>
945
946 <sect2>
947 <title>Linux and Solaris hosts</title>
948
949 <para>When the webcam is detached from the host the emulated webcam device is
950 automatically detached from the guest only if the webcam is streaming video.
951 If the emulated webcam is inactive it should be manually detached using the
952 <computeroutput>VBoxManage controlvm "VM name" webcam detach ...</computeroutput> command.</para>
953
954 <para>Aliases <computeroutput>.0</computeroutput> and <computeroutput>.1</computeroutput> are mapped
955 to <computeroutput>/dev/video0</computeroutput>, alias <computeroutput>.2</computeroutput> is mapped
956 to <computeroutput>/dev/video1</computeroutput> and so forth.</para>
957 </sect2>
958 </sect1>
959
960 <sect1>
961 <title>Advanced display configuration</title>
962
963 <sect2>
964 <title>Custom VESA resolutions</title>
965
966 <para>Apart from the standard VESA resolutions, the VirtualBox VESA BIOS
967 allows you to add up to 16 custom video modes which will be reported to
968 the guest operating system. When using Windows guests with the
969 VirtualBox Guest Additions, a custom graphics driver will be used
970 instead of the fallback VESA solution so this information does not
971 apply.</para>
972
973 <para>Additional video modes can be configured for each VM using the
974 extra data facility. The extra data key is called
975 <literal>CustomVideoMode&lt;x&gt;</literal> with <literal>x</literal>
976 being a number from 1 to 16. Please note that modes will be read from 1
977 until either the following number is not defined or 16 is reached. The
978 following example adds a video mode that corresponds to the native
979 display resolution of many notebook computers:</para>
980
981 <screen>VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</screen>
982
983 <para>The VESA mode IDs for custom video modes start at
984 <literal>0x160</literal>. In order to use the above defined custom video
985 mode, the following command line has be supplied to Linux:</para>
986
987 <screen>vga = 0x200 | 0x160
988vga = 864</screen>
989
990 <para>For guest operating systems with VirtualBox Guest Additions, a
991 custom video mode can be set using the video mode hint feature.</para>
992 </sect2>
993
994 <sect2>
995 <title>Configuring the maximum resolution of guests when using the
996 graphical frontend</title>
997
998 <para>When guest systems with the Guest Additions installed are started
999 using the graphical frontend (the normal VirtualBox application), they
1000 will not be allowed to use screen resolutions greater than the host's
1001 screen size unless the user manually resizes them by dragging the
1002 window, switching to full screen or seamless mode or sending a video mode
1003 hint using VBoxManage. This behavior is what most users will want, but
1004 if you have different needs, it is possible to change it by issuing one
1005 of the following commands from the command line:</para>
1006
1007 <screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
1008
1009 <para>will remove all limits on guest resolutions.</para>
1010
1011 <screen>VBoxManage setextradata global GUI/MaxGuestResolution &gt;width,height&lt;</screen>
1012
1013 <para>manually specifies a maximum resolution.</para>
1014
1015 <screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
1016
1017 <para>restores the default settings. Note that these settings apply
1018 globally to all guest systems, not just to a single machine.</para>
1019 </sect2>
1020 </sect1>
1021
1022 <sect1>
1023 <title>Advanced storage configuration</title>
1024
1025 <sect2 id="rawdisk">
1026 <title>Using a raw host hard disk from a guest</title>
1027
1028 <para>Starting with version 1.4, as an alternative to using virtual disk
1029 images (as described in detail in <xref linkend="storage" />),
1030 VirtualBox can also present either entire physical hard disks or
1031 selected partitions thereof as virtual disks to virtual machines.</para>
1032
1033 <para>With VirtualBox, this type of access is called "raw hard disk
1034 access"; it allows a guest operating system to access its virtual hard
1035 disk without going through the host OS file system. The actual
1036 performance difference for image files vs. raw disk varies greatly
1037 depending on the overhead of the host file system, whether dynamically
1038 growing images are used, and on host OS caching strategies. The caching
1039 indirectly also affects other aspects such as failure behavior, i.e.
1040 whether the virtual disk contains all data written before a host OS
1041 crash. Consult your host OS documentation for details on this.</para>
1042
1043 <para><warning>
1044 <para>Raw hard disk access is for expert users only. Incorrect use
1045 or use of an outdated configuration can lead to <emphasis
1046 role="bold">total loss of data </emphasis>on the physical disk. Most
1047 importantly, <emphasis>do not</emphasis> attempt to boot the
1048 partition with the currently running host operating system in a
1049 guest. This will lead to severe data corruption.</para>
1050 </warning></para>
1051
1052 <para>Raw hard disk access -- both for entire disks and individual
1053 partitions -- is implemented as part of the VMDK image format support.
1054 As a result, you will need to create a special VMDK image file which
1055 defines where the data will be stored. After creating such a special
1056 VMDK image, you can use it like a regular virtual disk image. For
1057 example, you can use the VirtualBox Manager (<xref linkend="vdis" />)
1058 or <computeroutput>VBoxManage</computeroutput> to assign the image to a
1059 virtual machine.</para>
1060
1061 <sect3>
1062 <title>Access to entire physical hard disk</title>
1063
1064 <para>While this variant is the simplest to set up, you must be aware
1065 that this will give a guest operating system direct and full access to
1066 an <emphasis>entire physical disk</emphasis>. If your
1067 <emphasis>host</emphasis> operating system is also booted from this
1068 disk, please take special care to not access the partition from the
1069 guest at all. On the positive side, the physical disk can be
1070 repartitioned in arbitrary ways without having to recreate the image
1071 file that gives access to the raw disk.</para>
1072
1073 <para>To create an image that represents an entire physical hard disk
1074 (which will not contain any actual data, as this will all be stored on
1075 the physical disk), on a Linux host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1076 -rawdisk /dev/sda</screen>This creates the image
1077 <code>/path/to/file.vmdk</code> (must be absolute), and all data will
1078 be read and written from <code>/dev/sda</code>.</para>
1079
1080 <para>On a Windows host, instead of the above device specification,
1081 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
1082 of the above device specification use e.g. <code>/dev/disk1</code>.
1083 Note that on OS X you can only get access to an entire disk if no
1084 volume is mounted from it.</para>
1085
1086 <para>Creating the image requires read/write access for the given
1087 device. Read/write access is also later needed when using the image
1088 from a virtual machine. On some host platforms (e.g. Windows Vista
1089 and later), raw disk access may be restricted and not permitted by
1090 the host OS in some situations.</para>
1091
1092 <para>Just like with regular disk images, this does not automatically
1093 attach the newly created image to a virtual machine. This can be done
1094 with e.g. <screen>VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
1095 --port 0 --device 0 --type hdd --medium /path/to/file.vmdk</screen>When
1096 this is done the selected virtual machine will boot from the specified
1097 physical disk.</para>
1098 </sect3>
1099
1100 <sect3>
1101 <title>Access to individual physical hard disk partitions</title>
1102
1103 <para>This "raw partition support" is quite similar to the "full hard
1104 disk" access described above. However, in this case, any partitioning
1105 information will be stored inside the VMDK image, so you can e.g.
1106 install a different boot loader in the virtual hard disk without
1107 affecting the host's partitioning information. While the guest will be
1108 able to <emphasis>see</emphasis> all partitions that exist on the
1109 physical disk, access will be filtered in that reading from partitions
1110 for which no access is allowed the partitions will only yield zeroes,
1111 and all writes to them are ignored.</para>
1112
1113 <para>To create a special image for raw partition support (which will
1114 contain a small amount of data, as already mentioned), on a Linux
1115 host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1116 -rawdisk /dev/sda -partitions 1,5</screen></para>
1117
1118 <para>As you can see, the command is identical to the one for "full
1119 hard disk" access, except for the additional
1120 <computeroutput>-partitions</computeroutput> parameter. This example
1121 would create the image <code>/path/to/file.vmdk</code> (which, again,
1122 must be absolute), and partitions 1 and 5 of <code>/dev/sda</code>
1123 would be made accessible to the guest.</para>
1124
1125 <para>VirtualBox uses the same partition numbering as your Linux host.
1126 As a result, the numbers given in the above example would refer to the
1127 first primary partition and the first logical drive in the extended
1128 partition, respectively.</para>
1129
1130 <para>On a Windows host, instead of the above device specification,
1131 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
1132 of the above device specification use e.g. <code>/dev/disk1</code>.
1133 Note that on OS X you can only use partitions which are not mounted
1134 (eject the respective volume first). Partition numbers are the same on
1135 Linux, Windows and Mac OS X hosts.</para>
1136
1137 <para>The numbers for the list of partitions can be taken from the
1138 output of<screen>VBoxManage internalcommands listpartitions -rawdisk /dev/sda</screen>The
1139 output lists the partition types and sizes to give the user enough
1140 information to identify the partitions necessary for the guest.</para>
1141
1142 <para>Images which give access to individual partitions are specific
1143 to a particular host disk setup. You cannot transfer these images to
1144 another host; also, whenever the host partitioning changes, the image
1145 <emphasis>must be recreated</emphasis>.</para>
1146
1147 <para>Creating the image requires read/write access for the given
1148 device. Read/write access is also later needed when using the image
1149 from a virtual machine. If this is not feasible, there is a special
1150 variant for raw partition access (currently only available on Linux
1151 hosts) that avoids having to give the current user access to the
1152 entire disk. To set up such an image, use<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1153 -rawdisk /dev/sda -partitions 1,5 -relative</screen>When used from a
1154 virtual machine, the image will then refer not to the entire disk, but
1155 only to the individual partitions (in the example
1156 <code>/dev/sda1</code> and <code>/dev/sda5</code>). As a consequence,
1157 read/write access is only required for the affected partitions, not
1158 for the entire disk. During creation however, read-only access to the
1159 entire disk is required to obtain the partitioning information.</para>
1160
1161 <para>In some configurations it may be necessary to change the MBR
1162 code of the created image, e.g. to replace the Linux boot loader that
1163 is used on the host by another boot loader. This allows e.g. the guest
1164 to boot directly to Windows, while the host boots Linux from the
1165 "same" disk. For this purpose the
1166 <computeroutput>-mbr</computeroutput> parameter is provided. It
1167 specifies a file name from which to take the MBR code. The partition
1168 table is not modified at all, so a MBR file from a system with totally
1169 different partitioning can be used. An example of this is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1170 -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr</screen>The modified
1171 MBR will be stored inside the image, not on the host disk.</para>
1172
1173 <para>The created image can be attached to a storage controller in a
1174 VM configuration as usual.</para>
1175 </sect3>
1176 </sect2>
1177
1178 <sect2 id="changevpd">
1179 <title>Configuring the hard disk vendor product data (VPD)</title>
1180
1181 <para>VirtualBox reports vendor product data for its virtual hard disks
1182 which consist of hard disk serial number, firmware revision and model
1183 number. These can be changed using the following commands:</para>
1184
1185 <screen>VBoxManage setextradata "VM name"
1186 "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
1187VBoxManage setextradata "VM name"
1188 "VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
1189VBoxManage setextradata "VM name"
1190 "VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
1191
1192 <para>The serial number is a 20 byte alphanumeric string, the firmware
1193 revision an 8 byte alphanumeric string and the model number a 40 byte
1194 alphanumeric string. Instead of "Port0" (referring to the first port),
1195 specify the desired SATA hard disk port.</para>
1196
1197 <para>The above commands apply to virtual machines with an AHCI (SATA)
1198 controller. The commands for virtual machines with an IDE controller
1199 are:</para>
1200
1201 <screen>VBoxManage setextradata "VM name"
1202 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
1203VBoxManage setextradata "VM name"
1204 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision" "firmware"
1205VBoxManage setextradata "VM name"
1206 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber" "model"</screen>
1207
1208 <para>For hard disks it's also possible to mark the
1209 drive as having a non-rotational medium with:</para>
1210
1211 <screen>VBoxManage setextradata "VM name"
1212 "VBoxInternal/Devices/ahci/0/Config/Port0/NonRotational" "1"</screen>
1213
1214 <para>Additional three parameters are needed for CD/DVD drives to report
1215 the vendor product data:</para>
1216
1217 <screen>VBoxManage setextradata "VM name"
1218 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
1219VBoxManage setextradata "VM name"
1220 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
1221VBoxManage setextradata "VM name"
1222 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
1223
1224 <para>The vendor id is an 8 byte alphanumeric string, the product id an
1225 16 byte alphanumeric string and the revision a 4 byte alphanumeric
1226 string. Instead of "Port0" (referring to the first port), specify the
1227 desired SATA hard disk port.</para>
1228 </sect2>
1229
1230 <sect2 id="iscsi-intnet">
1231 <title>Access iSCSI targets via Internal Networking</title>
1232
1233 <para>As an experimental feature, VirtualBox allows for accessing an
1234 iSCSI target running in a virtual machine which is configured for using
1235 Internal Networking mode. Please see <xref linkend="storage-iscsi" />;
1236 <xref linkend="network_internal" />; and <xref
1237 linkend="vboxmanage-storageattach" /> for additional information.</para>
1238
1239 <para>The IP stack accessing Internal Networking must be configured in
1240 the virtual machine which accesses the iSCSI target. A free static IP
1241 and a MAC address not used by other virtual machines must be chosen. In
1242 the example below, adapt the name of the virtual machine, the MAC
1243 address, the IP configuration and the Internal Networking name
1244 ("MyIntNet") according to your needs. The following eight commands must
1245 first be issued:<screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Trusted 1
1246VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f
1247VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1
1248VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0
1249VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet
1250VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet
1251VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/TrunkType 2
1252VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1</screen></para>
1253
1254 <para>Finally the iSCSI disk must be attached with the
1255 <computeroutput>--intnet</computeroutput> option to tell the iSCSI
1256 initiator to use internal networking:<screen>VBoxManage storageattach ... --medium iscsi
1257 --server 10.0.9.30 --target iqn.2008-12.com.sun:sampletarget --intnet</screen></para>
1258
1259 <para>Compared to a "regular" iSCSI setup, IP address of the target
1260 <emphasis>must</emphasis> be specified as a numeric IP address, as there
1261 is no DNS resolver for internal networking.</para>
1262
1263 <para>The virtual machine with the iSCSI target should be started before
1264 the VM using it is powered on. If a virtual machine using an iSCSI disk
1265 is started without having the iSCSI target powered up, it can take up to
1266 200 seconds to detect this situation. The VM will fail to power
1267 up.</para>
1268 </sect2>
1269 </sect1>
1270
1271 <sect1>
1272 <title>Legacy commands for using serial ports</title>
1273
1274 <para>Starting with version 1.4, VirtualBox provided support for virtual
1275 serial ports, which, at the time, was rather complicated to set up with a
1276 sequence of <computeroutput>VBoxManage setextradata</computeroutput>
1277 statements. Since version 1.5, that way of setting up serial ports is no
1278 longer necessary and <emphasis>deprecated.</emphasis> To set up virtual
1279 serial ports, use the methods now described in <xref
1280 linkend="serialports" />.<note>
1281 <para>For backwards compatibility, the old
1282 <computeroutput>setextradata</computeroutput> statements, whose
1283 description is retained below from the old version of the manual, take
1284 <emphasis>precedence</emphasis> over the new way of configuring serial
1285 ports. As a result, if configuring serial ports the new way doesn't
1286 work, make sure the VM in question does not have old configuration
1287 data such as below still active.</para>
1288 </note></para>
1289
1290 <para>The old sequence of configuring a serial port used the following 6
1291 commands:</para>
1292
1293 <screen>VBoxManage setextradata "VM name"
1294 "VBoxInternal/Devices/serial/0/Config/IRQ" 4
1295VBoxManage setextradata "VM name"
1296 "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
1297VBoxManage setextradata "VM name"
1298 "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
1299VBoxManage setextradata "VM name"
1300 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
1301VBoxManage setextradata "VM name"
1302 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
1303VBoxManage setextradata "VM name"
1304 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1</screen>
1305
1306 <para>This sets up a serial port in the guest with the default settings
1307 for COM1 (IRQ 4, I/O address 0x3f8) and the
1308 <computeroutput>Location</computeroutput> setting assumes that this
1309 configuration is used on a Windows host, because the Windows named pipe
1310 syntax is used. Keep in mind that on Windows hosts a named pipe must
1311 always start with <computeroutput>\\.\pipe\</computeroutput>. On Linux the
1312 same configuration settings apply, except that the path name for the
1313 <computeroutput>Location</computeroutput> can be chosen more freely. Local
1314 domain sockets can be placed anywhere, provided the user running
1315 VirtualBox has the permission to create a new file in the directory. The
1316 final command above defines that VirtualBox acts as a server, i.e. it
1317 creates the named pipe itself instead of connecting to an already existing
1318 one.</para>
1319 </sect1>
1320
1321 <sect1 id="changenat">
1322 <title>Fine-tuning the VirtualBox NAT engine</title>
1323
1324 <sect2>
1325 <title>Configuring the address of a NAT network interface</title>
1326
1327 <para>In NAT mode, the guest network interface is assigned to the IPv4
1328 range <computeroutput>10.0.x.0/24</computeroutput> by default where
1329 <computeroutput>x</computeroutput> corresponds to the instance of the
1330 NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
1331 is only one NAT instance active. In that case the guest is assigned to
1332 the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
1333 set to <computeroutput>10.0.2.2</computeroutput> and the name server can
1334 be found at <computeroutput>10.0.2.3</computeroutput>.</para>
1335
1336 <para>If, for any reason, the NAT network needs to be changed, this can
1337 be achieved with the following command:</para>
1338
1339 <screen>VBoxManage modifyvm "VM name" --natnet1 "192.168/16"</screen>
1340
1341 <para>This command would reserve the network addresses from
1342 <computeroutput>192.168.0.0</computeroutput> to
1343 <computeroutput>192.168.254.254</computeroutput> for the first NAT
1344 network instance of "VM name". The guest IP would be assigned to
1345 <computeroutput>192.168.0.15</computeroutput> and the default gateway
1346 could be found at <computeroutput>192.168.0.2</computeroutput>.</para>
1347 </sect2>
1348
1349 <sect2 id="nat-adv-tftp">
1350 <title>Configuring the boot server (next server) of a NAT network
1351 interface</title>
1352
1353 <para>For network booting in NAT mode, by default VirtualBox uses a
1354 built-in TFTP server at the IP address 10.0.2.4. This default behavior
1355 should work fine for typical remote-booting scenarios. However, it is
1356 possible to change the boot server IP and the location of the boot image
1357 with the following commands: <screen>VBoxManage modifyvm "VM name" --nattftpserver1 10.0.2.2
1358VBoxManage modifyvm "VM name" --nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen></para>
1359 </sect2>
1360
1361 <sect2 id="nat-adv-settings">
1362 <title>Tuning TCP/IP buffers for NAT</title>
1363
1364 <para>The VirtualBox NAT stack performance is often determined by its
1365 interaction with the host's TCP/IP stack and the size of several buffers
1366 (<computeroutput>SO_RCVBUF</computeroutput> and
1367 <computeroutput>SO_SNDBUF</computeroutput>). For certain setups users
1368 might want to adjust the buffer size for a better performance. This can
1369 by achieved using the following commands (values are in kilobytes and
1370 can range from 8 to 1024): <screen>VBoxManage modifyvm "VM name" --natsettings1 16000,128,128,0,0</screen>
1371 This example illustrates tuning the NAT settings. The first parameter is
1372 the MTU, then the size of the socket's send buffer and the size of the
1373 socket's receive buffer, the initial size of the TCP send window, and
1374 lastly the initial size of the TCP receive window. Note that specifying
1375 zero means fallback to the default value.</para>
1376
1377 <para>Each of these buffers has a default size of 64KB and default MTU
1378 is 1500.</para>
1379 </sect2>
1380
1381 <sect2>
1382 <title>Binding NAT sockets to a specific interface</title>
1383
1384 <para>By default, VirtualBox's NAT engine will route TCP/IP packets
1385 through the default interface assigned by the host's TCP/IP stack. (The
1386 technical reason for this is that the NAT engine uses sockets for
1387 communication.) If, for some reason, you want to change this behavior,
1388 you can tell the NAT engine to bind to a particular IP address instead.
1389 Use the following command: <screen>VBoxManage modifyvm "VM name" --natbindip1 "10.45.0.2"</screen></para>
1390
1391 <para>After this, all outgoing traffic will be sent through the
1392 interface with the IP address 10.45.0.2. Please make sure that this
1393 interface is up and running prior to this assignment.</para>
1394 </sect2>
1395
1396 <sect2 id="nat-adv-dns">
1397 <title>Enabling DNS proxy in NAT mode</title>
1398
1399 <para>The NAT engine by default offers the same DNS servers to the guest
1400 that are configured on the host. In some scenarios, it can be desirable
1401 to hide the DNS server IPs from the guest, for example when this
1402 information can change on the host due to expiring DHCP leases. In this
1403 case, you can tell the NAT engine to act as DNS proxy using the
1404 following command: <screen>VBoxManage modifyvm "VM name" --natdnsproxy1 on</screen></para>
1405 </sect2>
1406
1407 <sect2 id="nat_host_resolver_proxy">
1408 <title>Using the host's resolver as a DNS proxy in NAT mode</title>
1409
1410 <para>For resolving network names, the DHCP server of the NAT engine
1411 offers a list of registered DNS servers of the host. If for some reason
1412 you need to hide this DNS server list and use the host's resolver
1413 settings, thereby forcing the VirtualBox NAT engine to intercept DNS
1414 requests and forward them to host's resolver, use the following command:
1415 <screen>VBoxManage modifyvm "VM name" --natdnshostresolver1 on</screen>
1416 Note that this setting is similar to the DNS proxy mode, however whereas
1417 the proxy mode just forwards DNS requests to the appropriate servers,
1418 the resolver mode will interpret the DNS requests and use the host's DNS
1419 API to query the information and return it to the guest.</para>
1420
1421 <sect3 id="nat_host_resolver_name_intercepting">
1422 <title>User-defined host name resolving</title>
1423 <para>In some cases it might be useful to intercept the name resolving mechanism,
1424 providing a user-defined IP address on a particular DNS request. The intercepting
1425 mechanism allows the user to map not only a single host but domains and even more
1426 complex namings conventions if required.</para>
1427 <para>
1428 The following command sets a rule for mapping a name to a specified IP:</para>
1429 <screen>VBoxManage setextradata "VM name" \
1430 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1431 &lt;uniq name of interception rule&gt;/HostIP" &lt;IPv4&gt;
1432VBoxManage setextradata "VM name" \
1433 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1434 &lt;uniq name of interception rule&gt;/HostName" &lt;name of host&gt;</screen>
1435 <para>The following command sets a rule for mapping a pattern name to a specified IP:</para>
1436 <screen>VBoxManage setextradata "VM name" \
1437 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1438 &lt;uniq name of interception rule&gt;/HostIP" &lt;IPv4&gt;
1439VBoxManage setextradata "VM name" \
1440 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1441 &lt;uniq name of interception rule&gt;/HostNamePattern" &lt;hostpattern&gt;</screen>
1442 <para>The host pattern may include <computeroutput>"|", "?" and "*"</computeroutput>.</para>
1443 <para>This example demonstrates how to instruct the host-resolver mechanism to resolve
1444 all domain and probably some mirrors of www.blocked-site.info site with IP 127.0.0.1:</para>
1445 <screen>VBoxManage setextradata "VM name" \
1446 "VBoxInternal/Devices/e1000/0/LUN#0/Config/HostResolverMappings/ \
1447 all_blocked_site/HostIP" 127.0.0.1
1448VBoxManage setextradata "VM name" \
1449 "VBoxInternal/Devices/e1000/0/LUN#0/Config/HostResolverMappings/ \
1450 all_blocked_site/HostNamePattern" "*.blocked-site.*|*.fb.org"</screen>
1451 <note><para>The host resolver mechanism should be enabled to use user-defined
1452 mapping rules (please see
1453 <xref linkend="nat_host_resolver_proxy" /> for more details).</para></note>
1454 </sect3>
1455 </sect2>
1456
1457 <sect2 id="nat-adv-alias">
1458 <title>Configuring aliasing of the NAT engine</title>
1459
1460 <para>By default, the NAT core uses aliasing and uses random ports when
1461 generating an alias for a connection. This works well for the most
1462 protocols like SSH, FTP and so on. Though some protocols might need a
1463 more transparent behavior or may depend on the real port number the
1464 packet was sent from. It is possible to change the NAT mode via the
1465 VBoxManage frontend with the following commands: <screen>VBoxManage modifyvm "VM name" --nataliasmode1 proxyonly</screen>
1466 and <screen>VBoxManage modifyvm "Linux Guest" --nataliasmode1 sameports</screen>
1467 The first example disables aliasing and switches NAT into transparent
1468 mode, the second example enforces preserving of port values. These modes
1469 can be combined if necessary.</para>
1470 </sect2>
1471 </sect1>
1472
1473 <sect1 id="changedmi">
1474 <title>Configuring the BIOS DMI information</title>
1475
1476 <para>The DMI data VirtualBox provides to guests can be changed for a
1477 specific VM. Use the following commands to configure the DMI BIOS
1478 information. In case your VM is configured to use EFI firmware you need to
1479 replace <code>pcbios</code> by <code>efi</code> in the keys.</para>
1480
1481 <glosslist>
1482 <glossentry>
1483 <glossterm>DMI BIOS information</glossterm>
1484 <glossdef>
1485 <para>(type 0)</para>
1486 <screen>VBoxManage setextradata "VM name"
1487 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
1488VBoxManage setextradata "VM name"
1489 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
1490VBoxManage setextradata "VM name"
1491 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
1492VBoxManage setextradata "VM name"
1493 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
1494VBoxManage setextradata "VM name"
1495 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
1496VBoxManage setextradata "VM name"
1497 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
1498VBoxManage setextradata "VM name"
1499 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4</screen>
1500 </glossdef>
1501 </glossentry>
1502
1503 <glossentry>
1504 <glossterm>DMI system information</glossterm>
1505 <glossdef>
1506 <para>(type 1)</para>
1507 <screen>VBoxManage setextradata "VM name"
1508 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
1509VBoxManage setextradata "VM name"
1510 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
1511VBoxManage setextradata "VM name"
1512 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
1513VBoxManage setextradata "VM name"
1514 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
1515VBoxManage setextradata "VM name"
1516 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
1517VBoxManage setextradata "VM name"
1518 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
1519VBoxManage setextradata "VM name"
1520 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"
1521 "9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
1522 </glossdef>
1523 </glossentry>
1524
1525 <glossentry>
1526 <glossterm>DMI board information</glossterm>
1527 <glossdef>
1528 <para>(type 2)</para>
1529 <screen>VBoxManage setextradata "VM name"
1530 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor" "Board Vendor"
1531VBoxManage setextradata "VM name"
1532 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct" "Board Product"
1533VBoxManage setextradata "VM name"
1534 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion" "Board Version"
1535VBoxManage setextradata "VM name"
1536 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial" "Board Serial"
1537VBoxManage setextradata "VM name"
1538 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag" "Board Tag"
1539VBoxManage setextradata "VM name"
1540 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass" "Board Location"
1541VBoxManage setextradata "VM name"
1542 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType" 10</screen>
1543 </glossdef>
1544 </glossentry>
1545
1546 <glossentry>
1547 <glossterm>DMI system enclosure or chassis</glossterm>
1548 <glossdef>
1549 <para>(type 3)</para>
1550 <screen>VBoxManage setextradata "VM name"
1551 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor" "Chassis Vendor"
1552VBoxManage setextradata "VM name"
1553 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType" 3
1554VBoxManage setextradata "VM name"
1555 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion" "Chassis Version"
1556VBoxManage setextradata "VM name"
1557 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial" "Chassis Serial"
1558VBoxManage setextradata "VM name"
1559 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag" "Chassis Tag"</screen>
1560 </glossdef>
1561 </glossentry>
1562
1563 <glossentry>
1564 <glossterm>DMI processor information</glossterm>
1565 <glossdef>
1566 <para>(type 4)</para>
1567 <screen>VBoxManage setextradata "VM name"
1568 "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer" "GenuineIntel"
1569VBoxManage setextradata "VM name"
1570 "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion" "Pentium(R) III"</screen>
1571 </glossdef>
1572 </glossentry>
1573
1574 <glossentry>
1575 <glossterm>DMI OEM strings</glossterm>
1576 <glossdef>
1577 <para>(type 11)</para>
1578 <screen>VBoxManage setextradata "VM name"
1579 "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer" "vboxVer_1.2.3"
1580VBoxManage setextradata "VM name"
1581 "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev" "vboxRev_12345"</screen>
1582 </glossdef>
1583 </glossentry>
1584 </glosslist>
1585
1586 <para>If a DMI string is not set, the default value of VirtualBox is used.
1587 To set an empty string use
1588 <computeroutput>"&lt;EMPTY&gt;"</computeroutput>.</para>
1589
1590 <para>Note that in the above list, all quoted parameters (DmiBIOSVendor,
1591 DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be strings. If
1592 such a string is a valid number, the parameter is treated as number and
1593 the VM will most probably refuse to start with an
1594 <computeroutput>VERR_CFGM_NOT_STRING</computeroutput> error. In that case,
1595 use <computeroutput>"string:&lt;value&gt;"</computeroutput>, for instance
1596 <screen>VBoxManage setextradata "VM name"
1597 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen></para>
1598
1599 <para>Changing this information can be necessary to provide the DMI
1600 information of the host to the guest to prevent Windows from asking for a
1601 new product key. On Linux hosts the DMI BIOS information can be obtained
1602 with <screen>dmidecode -t0</screen>and the DMI system information can be
1603 obtained with <screen>dmidecode -t1</screen></para>
1604 </sect1>
1605
1606 <sect1 id="changeacpicust">
1607 <title>Configuring the custom ACPI table</title>
1608
1609 <para>VirtualBox can be configured to present an custom ACPI table to
1610 the guest. Use the following command to configure this:</para>
1611
1612 <screen>VBoxManage setextradata "VM name"
1613 "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/path/to/table.bin"</screen>
1614
1615 <para>Configuring a custom ACPI table can prevent Windows
1616 Vista and Windows 7 from asking for a new product key. On Linux hosts,
1617 one of the host tables can be read from
1618 <filename>/sys/firmware/acpi/tables/</filename>.</para>
1619 </sect1>
1620
1621 <sect1>
1622 <title>Fine-tuning timers and time synchronization</title>
1623
1624 <sect2 id="changetscmode">
1625 <title>Configuring the guest time stamp counter (TSC) to reflect guest
1626 execution</title>
1627
1628 <para>By default, VirtualBox keeps all sources of time visible to the
1629 guest synchronized to a single time source, the monotonic host time.
1630 This reflects the assumptions of many guest operating systems, which
1631 expect all time sources to reflect "wall clock" time. In special
1632 circumstances it may be useful however to make the TSC (time stamp
1633 counter) in the guest reflect the time actually spent executing the
1634 guest.</para>
1635
1636 <para>This special TSC handling mode can be enabled on a per-VM basis,
1637 and for best results must be used only in combination with hardware
1638 virtualization. To enable this mode use the following command:</para>
1639
1640 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
1641
1642 <para>To revert to the default TSC handling mode use:</para>
1643
1644 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
1645
1646 <para>Note that if you use the special TSC handling mode with a guest
1647 operating system which is very strict about the consistency of time
1648 sources you may get a warning or error message about the timing
1649 inconsistency. It may also cause clocks to become unreliable with some
1650 guest operating systems depending on how they use the TSC.</para>
1651 </sect2>
1652
1653 <sect2 id="warpguest">
1654 <title>Accelerate or slow down the guest clock</title>
1655
1656 <para>For certain purposes it can be useful to accelerate or to slow
1657 down the (virtual) guest clock. This can be achieved as follows:</para>
1658
1659 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
1660
1661 <para>The above example will double the speed of the guest clock
1662 while</para>
1663
1664 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
1665
1666 <para>will halve the speed of the guest clock. Note that changing the
1667 rate of the virtual clock can confuse the guest and can even lead to
1668 abnormal guest behavior. For instance, a higher clock rate means shorter
1669 timeouts for virtual devices with the result that a slightly increased
1670 response time of a virtual device due to an increased host load can
1671 cause guest failures. Note further that any time synchronization
1672 mechanism will frequently try to resynchronize the guest clock with the
1673 reference clock (which is the host clock if the VirtualBox Guest
1674 Additions are active). Therefore any time synchronization should be
1675 disabled if the rate of the guest clock is changed as described above
1676 (see <xref linkend="changetimesync" />).</para>
1677 </sect2>
1678
1679 <sect2 id="changetimesync">
1680 <title>Tuning the Guest Additions time synchronization
1681 parameters</title>
1682
1683 <para>The VirtualBox Guest Additions ensure that the guest's system time
1684 is synchronized with the host time. There are several parameters which
1685 can be tuned. The parameters can be set for a specific VM using the
1686 following command:</para>
1687
1688 <screen>VBoxManage guestproperty set "VM name" "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
1689
1690 <para>where <computeroutput>PARAMETER</computeroutput> is one of the
1691 following:</para>
1692
1693 <glosslist>
1694 <glossentry>
1695 <glossterm><computeroutput>--timesync-interval</computeroutput></glossterm>
1696 <glossdef>
1697 <para>Specifies the interval at which to synchronize the time
1698 with the host. The default is 10000 ms (10 seconds).</para>
1699 </glossdef>
1700 </glossentry>
1701
1702 <glossentry>
1703 <glossterm><computeroutput>--timesync-min-adjust</computeroutput></glossterm>
1704 <glossdef>
1705 <para>The minimum absolute drift value measured in milliseconds
1706 to make adjustments for. The default is 1000 ms on OS/2 and 100
1707 ms elsewhere.</para>
1708 </glossdef>
1709 </glossentry>
1710 <glossentry>
1711 <glossterm><computeroutput>--timesync-latency-factor</computeroutput></glossterm>
1712 <glossdef>
1713 <para>The factor to multiply the time query latency with to
1714 calculate the dynamic minimum adjust time. The default is 8
1715 times, that means in detail: Measure the time it takes to
1716 determine the host time (the guest has to contact the VM host
1717 service which may take some time), multiply this value by 8 and
1718 do an adjustment only if the time difference between host and
1719 guest is bigger than this value. Don't do any time adjustment
1720 otherwise.</para>
1721 </glossdef>
1722 </glossentry>
1723
1724 <glossentry>
1725 <glossterm><computeroutput>--timesync-max-latency</computeroutput></glossterm>
1726 <glossdef>
1727 <para>The max host timer query latency to accept. The default is
1728 250 ms.</para>
1729 </glossdef>
1730 </glossentry>
1731
1732 <glossentry>
1733 <glossterm><computeroutput>--timesync-set-threshold</computeroutput></glossterm>
1734 <glossdef>
1735 <para>The absolute drift threshold, given as milliseconds where
1736 to start setting the time instead of trying to smoothly adjust
1737 it. The default is 20 minutes.</para>
1738 </glossdef>
1739 </glossentry>
1740
1741 <glossentry>
1742 <glossterm><computeroutput>--timesync-set-start</computeroutput></glossterm>
1743 <glossdef>
1744 <para>Set the time when starting the time sync service.</para>
1745 </glossdef>
1746 </glossentry>
1747
1748 <glossentry>
1749 <glossterm><computeroutput>--timesync-set-on-restore
1750 0|1</computeroutput></glossterm>
1751 <glossdef>
1752 <para>Set the time after the VM was restored from a saved state
1753 when passing 1 as parameter (default). Disable by passing 0. In
1754 the latter case, the time will be adjusted smoothly which can
1755 take a long time.</para>
1756 </glossdef>
1757 </glossentry>
1758 </glosslist>
1759
1760 <para>All these parameters can be specified as command line parameters
1761 to VBoxService as well.</para>
1762 </sect2>
1763
1764 <sect2 id="disabletimesync">
1765
1766 <title>Disabling the Guest Additions time synchronization</title>
1767
1768 <para>Once installed and started, the VirtualBox Guest Additions will
1769 try to synchronize the guest time with the host time. This can be
1770 prevented by forbidding the guest service from reading the host
1771 clock:</para>
1772
1773 <screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1</screen>
1774
1775 </sect2>
1776
1777 </sect1>
1778
1779 <sect1 id="vboxbowsolaris11">
1780 <title>Installing the alternate bridged networking driver on Solaris 11
1781 hosts</title>
1782
1783 <para>Starting with VirtualBox 4.1, VirtualBox ships a new network filter
1784 driver that utilizes Solaris 11's Crossbow functionality. By default, this
1785 new driver is installed for Solaris 11 hosts (builds 159 and above) that
1786 has support for it.</para>
1787
1788 <para>To force installation of the older STREAMS based network filter
1789 driver, execute as root the following command before installing the
1790 VirtualBox package:</para>
1791
1792 <screen>touch /etc/vboxinst_vboxflt</screen>
1793
1794 <para>To force installation of the Crossbow based network filter driver,
1795 execute as root the following command before installing the VirtualBox
1796 package:</para>
1797
1798 <screen>touch /etc/vboxinst_vboxbow</screen>
1799
1800 <para>To check which driver is currently being used by VirtualBox,
1801 execute:</para>
1802
1803 <screen>modinfo | grep vbox</screen>
1804
1805 <para>If the output contains "vboxbow", it indicates VirtualBox is using
1806 the Crossbow network filter driver, while the name "vboxflt" indicates
1807 usage of the older STREAMS network filter.</para>
1808 </sect1>
1809
1810 <sect1 id="vboxbowvnictemplates">
1811 <title>VirtualBox VNIC templates for VLANs on Solaris 11 hosts</title>
1812
1813 <para>VirtualBox supports VNIC (Virtual Network Interface) templates for
1814 configuring VMs over VLANs.<footnote>
1815 <para>Support for Crossbow based bridged networking was introduced
1816 with VirtualBox 4.1 and requires Solaris 11 build 159 or above.</para>
1817 </footnote> A VirtualBox VNIC template is a VNIC whose name starts with
1818 "vboxvnic_template" (case-sensitive).</para>
1819
1820 <para>On Solaris 11 hosts<footnote><para>When Crossbow based bridged
1821 networking is used.</para></footnote>, a VNIC template may be used to
1822 specify the VLAN ID to use while bridging over a network link.</para>
1823
1824 <para>Here is an example of how to use a VNIC template to configure a VM
1825 over a VLAN. Create a VirtualBox VNIC template, by executing as root:</para>
1826
1827 <screen>dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0</screen>
1828
1829 <para>This will create a temporary VNIC template over interface "nge0"
1830 with the VLAN ID 23. To create VNIC templates that are persistent across
1831 host reboots, skip the <computeroutput>-t</computeroutput> parameter in the
1832 above command. You may check the current state of links using:</para>
1833
1834 <para><screen>$ dladm show-link
1835LINK CLASS MTU STATE BRIDGE OVER
1836nge0 phys 1500 up -- --
1837nge1 phys 1500 down -- --
1838vboxvnic_template0 vnic 1500 up -- nge0
1839
1840$ dladm show-vnic
1841LINK OVER SPEED MACADDRESS MACADDRTYPE VID
1842vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23</screen></para>
1843
1844 <para>Once the VNIC template is created, any VMs that need to be on VLAN
1845 23 over the interface "nge0" can be configured to bridge using this VNIC
1846 template.</para>
1847
1848 <para>VNIC templates makes managing VMs on VLANs simpler and efficient.
1849 The VLAN details are not stored as part of every VM's configuration but
1850 rather inherited from the VNIC template while starting the VM. The VNIC
1851 template itself can be modified anytime using <computeroutput>dladm</computeroutput>.</para>
1852
1853 <para>VNIC templates can be created with additional properties such as
1854 bandwidth limits, CPU fanout etc. Refer to your Solaris network
1855 documentation on how to accomplish this. These additional properties,
1856 if any, are also applied to VMs which bridge using the VNIC template.</para>
1857 </sect1>
1858
1859 <sect1 id="addhostonlysolaris">
1860 <title>Configuring multiple host-only network interfaces on Solaris
1861 hosts</title>
1862
1863 <para>By default VirtualBox provides you with one host-only network
1864 interface. Adding more host-only network interfaces on Solaris hosts
1865 requires manual configuration. Here's how to add another host-only
1866 network interface.</para>
1867
1868 <para>Begin by stopping all running VMs. Then, unplumb the existing
1869 "vboxnet0" interface by execute the following command as root:</para>
1870
1871 <screen>ifconfig vboxnet0 unplumb</screen>
1872
1873 <para>If you have several vboxnet interfaces, you will need to unplumb
1874 all of them. Once all vboxnet interfaces are unplumbed, remove the
1875 driver by executing the following command as root:</para>
1876
1877 <screen>rem_drv vboxnet</screen>
1878
1879 <para>Edit the file <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
1880 and add a line for the new interface we want to add as shown below:</para>
1881
1882 <screen>name="vboxnet" parent="pseudo" instance=1;
1883name="vboxnet" parent="pseudo" instance=2;</screen>
1884
1885 <para>Add as many of these lines as required with each line having a
1886 unique instance number.</para>
1887
1888 <para>Next, reload the vboxnet driver by executing the following command
1889 as root:</para>
1890
1891 <screen>add_drv vboxnet</screen>
1892
1893 <para>On Solaris 11.1 and newer hosts you may want to rename the default
1894 vanity interface name. To check what name has been assigned, execute:</para>
1895
1896 <screen>dladm show-phys
1897LINK MEDIA STATE SPEED DUPLEX DEVICE
1898net0 Ethernet up 100 full e1000g0
1899net2 Ethernet up 1000 full vboxnet1
1900net1 Ethernet up 1000 full vboxnet0</screen>
1901
1902 <para>In the above example, we can rename "net2" to "vboxnet1" before
1903 proceeding to plumb the interface. This can be done by executing as root:</para>
1904
1905 <screen>dladm rename-link net2 vboxnet1</screen>
1906
1907 <para>Now plumb all the interfaces using
1908 <computeroutput>ifconfig vboxnetX plumb</computeroutput> (where 'X' would
1909 be 1 in this case). Once the interface is plumbed, it may be configured
1910 like any other network interface. Refer to the
1911 <computeroutput>ifconfig</computeroutput> documentation for further details.</para>
1912
1913 <para>To make the newly added interfaces' settings persistent across
1914 reboots, you will need to edit the files
1915 <computeroutput>/etc/inet/netmasks</computeroutput>, and if you are using NWAM
1916 <computeroutput>/etc/nwam/llp</computeroutput> and add the appropriate
1917 entries to set the netmask and static IP for each of those interfaces. The
1918 VirtualBox installer only updates these configuration files for the one
1919 "vboxnet0" interface it creates by default.</para>
1920 </sect1>
1921
1922 <sect1 id="solariscodedumper">
1923 <title>Configuring the VirtualBox CoreDumper on Solaris hosts</title>
1924
1925 <para>VirtualBox is capable of producing its own core files for extensive
1926 debugging when things go wrong. Currently this is only available on
1927 Solaris hosts.</para>
1928
1929 <para>The VirtualBox CoreDumper can be enabled using the following
1930 command:</para>
1931
1932 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen></para>
1933
1934 <para>You can specify which directory to use for core dumps with this
1935 command:</para>
1936
1937 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir &lt;path-to-directory&gt;</screen>Make
1938 sure the directory you specify is on a volume with sufficient free space
1939 and that the VirtualBox process has sufficient permissions to write files
1940 to this directory. If you skip this command and don't specify any core
1941 dump directory, the current directory of the VirtualBox executable will be
1942 used (which would most likely fail when writing cores as they are
1943 protected with root permissions). It is recommended you explicitly set a
1944 core dump directory.</para>
1945
1946 <para>You must specify when the VirtualBox CoreDumper should be triggered.
1947 This is done using the following commands:</para>
1948
1949 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
1950VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>At
1951 least one of the above two commands will have to be provided if you have
1952 enabled the VirtualBox CoreDumper.</para>
1953
1954 <para>Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
1955 sets up the VM to override the host's core dumping mechanism and in the
1956 event of any crash only the VirtualBox CoreDumper would produce the core
1957 file.</para>
1958
1959 <para>Setting <computeroutput>CoreDumpLive</computeroutput> sets up the VM
1960 to produce cores whenever the VM process receives a
1961 <computeroutput>SIGUSR2</computeroutput> signal. After producing the core
1962 file, the VM will not be terminated and will continue to run. You can thus
1963 take cores of the VM process using:</para>
1964
1965 <para><screen>kill -s SIGUSR2 &lt;VM-process-id&gt;</screen></para>
1966
1967 <para>Core files produced by the VirtualBox CoreDumper are of the form
1968 <computeroutput>core.vb.&lt;ProcessName&gt;.&lt;ProcessID&gt;</computeroutput>,
1969 for example <computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.</para>
1970 </sect1>
1971
1972 <sect1 id="vboxandsolzvmm">
1973 <title>VirtualBox and Solaris kernel zones</title>
1974
1975 <para>Solaris kernel zones on x86-based systems make use of hardware-assisted
1976 virtualization features like VirtualBox does. However, for kernel zones and
1977 VirtualBox to share this hardware resource, they need to co-operate.</para>
1978
1979 <para>By default, due to performance reasons, VirtualBox acquires the
1980 hardware-assisted virtualization resource (VT-x/AMD-V) globally on the
1981 host machine and uses it until the last VirtualBox VM that requires it is
1982 powered off. This prevents other software from using VT-x/AMD-V during the
1983 time VirtualBox has taken control of it.</para>
1984
1985 <para>VirtualBox can be instructed to relinquish use of hardware-assisted
1986 virtualization features when not executing guest code, thereby allowing
1987 kernel zones to make use of them. To do this, shutdown all VirtualBox VMs
1988 and execute the following command:</para>
1989
1990 <screen>VBoxManage setproperty hwvirtexclusive off</screen>
1991
1992 <para>This command needs to be executed only once as the setting is stored
1993 as part of the global VirtualBox settings which will continue to persist
1994 across host-reboots and VirtualBox upgrades.</para>
1995 </sect1>
1996
1997 <sect1 id="guitweaks">
1998 <title>Locking down the VirtualBox manager GUI</title>
1999
2000 <sect2>
2001 <title>Customizing the VM manager</title>
2002
2003 <para>There are several advanced customization settings for locking down
2004 the VirtualBox manager, that is, removing some features that the user
2005 should not see.</para>
2006
2007 <para><screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen></para>
2008
2009 <para>where <computeroutput>OPTION</computeroutput> is one of the
2010 following keywords:<glosslist>
2011 <glossentry>
2012 <glossterm><computeroutput>noSelector</computeroutput></glossterm>
2013 <glossdef>
2014 <para>Don't allow to start the VirtualBox manager. Trying to do so
2015 will show a window containing a proper error message.</para>
2016 </glossdef>
2017 </glossentry>
2018
2019 <glossentry>
2020 <glossterm><computeroutput>noMenuBar</computeroutput></glossterm>
2021 <glossdef>
2022 <para>VM windows will not contain a menu bar.</para>
2023 </glossdef>
2024 </glossentry>
2025
2026 <glossentry>
2027 <glossterm><computeroutput>noStatusBar</computeroutput></glossterm>
2028 <glossdef>
2029 <para>VM windows will not contain a status bar.</para>
2030 </glossdef>
2031 </glossentry>
2032 </glosslist></para>
2033
2034 <para>To disable any of these VM manager customizations do
2035 <screen>VBoxManage setextradata global GUI/Customizations</screen></para>
2036
2037 </sect2>
2038 <sect2>
2039
2040 <title>VM selector customization</title>
2041 <para>The following per-machine VM extradata settings can be used to change the
2042 behavior of the VM selector window in respect of certain VMs:</para>
2043 <screen>VBoxManage setextradata "VM name" true</screen>
2044 <para>where <computeroutput>SETTING</computeroutput> can be:</para>
2045 <glosslist>
2046 <glossentry>
2047 <glossterm><computeroutput>GUI/HideDetails</computeroutput></glossterm>
2048 <glossdef>
2049 <para>Don't show the VM configuration of a certain VM. The details
2050 window will remain just empty if this VM is selected.</para>
2051 </glossdef>
2052 </glossentry>
2053 <glossentry>
2054 <glossterm><computeroutput>GUI/PreventReconfiguration</computeroutput></glossterm>
2055 <glossdef>
2056 <para>Don't allow the user to open the settings dialog for a certain VM.</para>
2057 </glossdef>
2058 </glossentry>
2059 <glossentry>
2060 <glossterm><computeroutput>GUI/PreventSnapshotOperations</computeroutput></glossterm>
2061 <glossdef>
2062 <para>Prevent snapshot operations for a VM from the GUI, either at runtime or when
2063 the VM is powered off.</para>
2064 </glossdef>
2065 </glossentry>
2066 <glossentry>
2067 <glossterm><computeroutput>GUI/HideFromManager</computeroutput></glossterm>
2068 <glossdef>
2069 <para>Hide a certain VM in the VM selector window.</para>
2070 </glossdef>
2071 </glossentry>
2072 <glossentry>
2073 <glossterm><computeroutput>GUI/PreventApplicationUpdate</computeroutput></glossterm>
2074 <glossdef>
2075 <para>Disable the automatic update check and hide the corresponding menu item.</para>
2076 </glossdef>
2077 </glossentry>
2078 </glosslist>
2079 <para>Please note that these settings wouldn't prevent the user from
2080 reconfiguring the VM by <computeroutput>VBoxManage modifyvm</computeroutput>.</para>
2081
2082 </sect2>
2083
2084 <sect2>
2085 <title>Configure VM selector menu entries</title>
2086 <para>You can disable (i.e. black-list) certain entries in the global settings
2087 page of the VM selector:</para>
2088 <screen>VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages OPTION[,OPTION...]</screen>
2089 <para>where <computeroutput>OPTION</computeroutput> is one of the
2090 following keywords:</para><glosslist>
2091 <glossentry>
2092 <glossterm><computeroutput>General</computeroutput></glossterm>
2093 <glossdef>
2094 <para>Don't show the <emphasis>General</emphasis> settings pane.</para>
2095 </glossdef>
2096 </glossentry>
2097
2098 <glossentry>
2099 <glossterm><computeroutput>Input</computeroutput></glossterm>
2100 <glossdef>
2101 <para>Don't show the <emphasis>Input</emphasis> settings pane.</para>
2102 </glossdef>
2103 </glossentry>
2104
2105 <glossentry>
2106 <glossterm><computeroutput>Update</computeroutput></glossterm>
2107 <glossdef>
2108 <para>Don't show the <emphasis>Update</emphasis> settings pane.</para>
2109 </glossdef>
2110 </glossentry>
2111
2112 <glossentry>
2113 <glossterm><computeroutput>Language</computeroutput></glossterm>
2114 <glossdef>
2115 <para>Don't show the <emphasis>Language</emphasis> settings pane.</para>
2116 </glossdef>
2117 </glossentry>
2118
2119 <glossentry>
2120 <glossterm><computeroutput>Display</computeroutput></glossterm>
2121 <glossdef>
2122 <para>Don't show the <emphasis>Display</emphasis> settings pane.</para>
2123 </glossdef>
2124 </glossentry>
2125
2126 <glossentry>
2127 <glossterm><computeroutput>Network</computeroutput></glossterm>
2128 <glossdef>
2129 <para>Don't show the <emphasis>Network</emphasis> settings pane.</para>
2130 </glossdef>
2131 </glossentry>
2132
2133 <glossentry>
2134 <glossterm><computeroutput>Extensions</computeroutput></glossterm>
2135 <glossdef>
2136 <para>Don't show the <emphasis>Extensions</emphasis> settings pane.</para>
2137 </glossdef>
2138 </glossentry>
2139
2140 <glossentry>
2141 <glossterm><computeroutput>Proxy</computeroutput></glossterm>
2142 <glossdef>
2143 <para>Don't show the <emphasis>Proxy</emphasis> settings pane.</para>
2144 </glossdef>
2145 </glossentry>
2146
2147 </glosslist>
2148
2149 <para>This is a global setting. Any combination of the above is allowed.
2150 To restore the default behavior, use</para>
2151 <screen>VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages</screen>
2152
2153 </sect2>
2154
2155 <sect2>
2156 <title>Configure VM window menu entries</title>
2157 <para>You can disable (i.e. black-list) certain menu actions in the VM window:</para>
2158 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus OPTION[,OPTION...]</screen>
2159
2160 <para>where <computeroutput>OPTION</computeroutput> is one of the
2161 following keywords:</para><glosslist>
2162 <glossentry>
2163 <glossterm><computeroutput>All</computeroutput></glossterm>
2164 <glossdef>
2165 <para>Don't show any menu in the VM window.</para>
2166 </glossdef>
2167 </glossentry>
2168
2169 <glossentry>
2170 <glossterm><computeroutput>Machine</computeroutput></glossterm>
2171 <glossdef>
2172 <para>Don't show the <emphasis>Machine</emphasis> menu in the VM window.</para>
2173 </glossdef>
2174 </glossentry>
2175
2176 <glossentry>
2177 <glossterm><computeroutput>View</computeroutput></glossterm>
2178 <glossdef>
2179 <para>Don't show the <emphasis>View</emphasis> menu in the VM window.</para>
2180 </glossdef>
2181 </glossentry>
2182
2183 <glossentry>
2184 <glossterm><computeroutput>Devices</computeroutput></glossterm>
2185 <glossdef>
2186 <para>Don't show the <emphasis>Devices</emphasis> menu in the VM window.</para>
2187 </glossdef>
2188 </glossentry>
2189
2190 <glossentry>
2191 <glossterm><computeroutput>Help</computeroutput></glossterm>
2192 <glossdef>
2193 <para>Don't show the <emphasis>Help</emphasis> menu in the VM window.</para>
2194 </glossdef>
2195 </glossentry>
2196
2197 <glossentry>
2198 <glossterm><computeroutput>Debug</computeroutput></glossterm>
2199 <glossdef>
2200 <para>Don't show the <emphasis>Debug</emphasis> menu in the VM window. The debug
2201 menu is only visible if the GUI was started with special command line parameters
2202 or environment variable settings.</para>
2203 </glossdef>
2204 </glossentry>
2205
2206 </glosslist>
2207
2208 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2209 the default behavior, use</para>
2210 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus</screen>
2211
2212 <para>You can also disable (i.e. blacklist) certain menu actions of certain
2213 menus. Use the following command to disable certain actions of the
2214 <emphasis>Application</emphasis> menu (only available on Mac OS X hosts):</para>
2215 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
2216
2217 <para>where <computeroutput>OPTION</computeroutput> is one of the
2218 following keywords:</para><glosslist>
2219 <glossentry>
2220 <glossterm><computeroutput>All</computeroutput></glossterm>
2221 <glossdef>
2222 <para>Don't show any menu item in this menu.</para>
2223 </glossdef>
2224 </glossentry>
2225 <glossentry>
2226 <glossterm><computeroutput>About</computeroutput></glossterm>
2227 <glossdef>
2228 <para>Don't show the <emphasis>About</emphasis> menu item in this menu.</para>
2229 </glossdef>
2230 </glossentry>
2231 </glosslist>
2232
2233 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2234 the default behavior, use</para>
2235 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus</screen>
2236
2237 <para>Use the following command to disable certain actions of the <emphasis>Machine</emphasis>
2238 menu:</para>
2239
2240 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
2241
2242 <para>where <computeroutput>OPTION</computeroutput> is one of the
2243 following keywords:</para><glosslist>
2244 <glossentry>
2245 <glossterm><computeroutput>All</computeroutput></glossterm>
2246 <glossdef>
2247 <para>Don't show any menu item in this menu.</para>
2248 </glossdef>
2249 </glossentry>
2250 <glossentry>
2251 <glossterm><computeroutput>SettingsDialog</computeroutput></glossterm>
2252 <glossdef>
2253 <para>Don't show the <emphasis>Settings</emphasis> menu item in this menu.</para>
2254 </glossdef>
2255 </glossentry>
2256 <glossentry>
2257 <glossterm><computeroutput>TakeSnapshot</computeroutput></glossterm>
2258 <glossdef>
2259 <para>Don't show the <emphasis>Take Snapshot</emphasis> menu item in this menu.</para>
2260 </glossdef>
2261 </glossentry>
2262 <glossentry>
2263 <glossterm><computeroutput>TakeScreenshot</computeroutput></glossterm>
2264 <glossdef>
2265 <para>Don't show the <emphasis>Take Screenshot</emphasis> menu item in this menu.</para>
2266 </glossdef>
2267 </glossentry>
2268 <glossentry>
2269 <glossterm><computeroutput>InformationDialog</computeroutput></glossterm>
2270 <glossdef>
2271 <para>Don't show the <emphasis>Session Information</emphasis> menu item in this menu.</para>
2272 </glossdef>
2273 </glossentry>
2274 <glossentry>
2275 <glossterm><computeroutput>MouseIntegration</computeroutput></glossterm>
2276 <glossdef>
2277 <para>Don't show the <emphasis>Disable Mouse Integration</emphasis> menu item in this menu.</para>
2278 </glossdef>
2279 </glossentry>
2280 <glossentry>
2281 <glossterm><computeroutput>TypeCAD</computeroutput></glossterm>
2282 <glossdef>
2283 <para>Don't show the <emphasis>Insert Ctrl+Alt+Del</emphasis> menu item in this menu.</para>
2284 </glossdef>
2285 </glossentry>
2286 <glossentry>
2287 <glossterm><computeroutput>TypeCABS</computeroutput></glossterm>
2288 <glossdef>
2289 <para>Don't show the <emphasis>Insert Ctrl+Alt+Backspace</emphasis> menu item in
2290 this menu (available on X11 hosts only).</para>
2291 </glossdef>
2292 </glossentry>
2293 <glossentry>
2294 <glossterm><computeroutput>Pause</computeroutput></glossterm>
2295 <glossdef>
2296 <para>Don't show the <emphasis>Pause</emphasis> menu item in this menu.</para>
2297 </glossdef>
2298 </glossentry>
2299 <glossentry>
2300 <glossterm><computeroutput>Reset</computeroutput></glossterm>
2301 <glossdef>
2302 <para>Don't show the <emphasis>Reset</emphasis> menu item in this menu.</para>
2303 </glossdef>
2304 </glossentry>
2305 <glossentry>
2306 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
2307 <glossdef>
2308 <para>Don't show the <emphasis>Save the machine state</emphasis> menu item in this menu.</para>
2309 </glossdef>
2310 </glossentry>
2311 <glossentry>
2312 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
2313 <glossdef>
2314 <para>Don't show the <emphasis>ACPI Shutdown</emphasis> menu item in this menu.</para>
2315 </glossdef>
2316 </glossentry>
2317 <glossentry>
2318 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2319 <glossdef>
2320 <para>Don't show the <emphasis>Power Off the machine</emphasis> menu item in this menu.</para>
2321 </glossdef>
2322 </glossentry>
2323 </glosslist>
2324
2325 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2326 the default behavior, use</para>
2327 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions</screen>
2328
2329 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2330 menu:</para>
2331
2332 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeViewMenuActions OPTION[,OPTION...]</screen>
2333
2334 <para>where <computeroutput>OPTION</computeroutput> is one of the
2335 following keywords:</para><glosslist>
2336 <glossentry>
2337 <glossterm><computeroutput>All</computeroutput></glossterm>
2338 <glossdef>
2339 <para>Don't show any menu item in this menu.</para>
2340 </glossdef>
2341 </glossentry>
2342 <glossentry>
2343 <glossterm><computeroutput>Fullscreen</computeroutput></glossterm>
2344 <glossdef>
2345 <para>Don't show the <emphasis>Switch to Fullscreen</emphasis> menu item in this menu.</para>
2346 </glossdef>
2347 </glossentry>
2348 <glossentry>
2349 <glossterm><computeroutput>Seamless</computeroutput></glossterm>
2350 <glossdef>
2351 <para>Don't show the <emphasis>Switch to Seamless Mode</emphasis> menu item in this menu.</para>
2352 </glossdef>
2353 </glossentry>
2354 <glossentry>
2355 <glossterm><computeroutput>Scale</computeroutput></glossterm>
2356 <glossdef>
2357 <para>Don't show the <emphasis>Switch to Scaled Mode</emphasis> menu item in this menu.</para>
2358 </glossdef>
2359 </glossentry>
2360 <glossentry>
2361 <glossterm><computeroutput>GuestAutoresize</computeroutput></glossterm>
2362 <glossdef>
2363 <para>Don't show the <emphasis>Auto-resize Guest Display</emphasis> menu item in this menu.</para>
2364 </glossdef>
2365 </glossentry>
2366 <glossentry>
2367 <glossterm><computeroutput>AdjustWindow</computeroutput></glossterm>
2368 <glossdef>
2369 <para>Don't show the <emphasis>Adjust Window Size</emphasis> menu item in this menu.</para>
2370 </glossdef>
2371 </glossentry>
2372 <glossentry>
2373 <glossterm><computeroutput>Multiscreen</computeroutput></glossterm>
2374 <glossdef>
2375 <para>Don't show the <emphasis>Multiscreen</emphasis> menu item in this menu (only visible in full screen / seamless mode).</para>
2376 </glossdef>
2377 </glossentry>
2378 </glosslist>
2379
2380 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2381 the default behavior, use</para>
2382 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeViewMenuActions</screen>
2383
2384 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2385 menu:</para>
2386
2387 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDevicesMenuActions OPTION[,OPTION...]</screen>
2388
2389 <para>where <computeroutput>OPTION</computeroutput> is one of the
2390 following keywords to disable actions in the <emphasis>Devices</emphasis> menu:</para><glosslist>
2391 <glossentry>
2392 <glossterm><computeroutput>All</computeroutput></glossterm>
2393 <glossdef>
2394 <para>Don't show any menu item in this menu.</para>
2395 </glossdef>
2396 </glossentry>
2397 <glossentry>
2398 <glossterm><computeroutput>OpticalDevices</computeroutput></glossterm>
2399 <glossdef>
2400 <para>Don't show the <emphasis>CD/DVD Devices</emphasis> menu item in this menu.</para>
2401 </glossdef>
2402 </glossentry>
2403 <glossentry>
2404 <glossterm><computeroutput>FloppyDevices</computeroutput></glossterm>
2405 <glossdef>
2406 <para>Don't show the <emphasis>FLoppy Devices</emphasis> menu item in this menu.</para>
2407 </glossdef>
2408 </glossentry>
2409 <glossentry>
2410 <glossterm><computeroutput>USBDevices</computeroutput></glossterm>
2411 <glossdef>
2412 <para>Don't show the <emphasis>USB Devices</emphasis> menu item in this menu.</para>
2413 </glossdef>
2414 </glossentry>
2415 <glossentry>
2416 <glossterm><computeroutput>SharedClipboard</computeroutput></glossterm>
2417 <glossdef>
2418 <para>Don't show the <emphasis>Shared Clipboard</emphasis> menu item in this menu.</para>
2419 </glossdef>
2420 </glossentry>
2421 <glossentry>
2422 <glossterm><computeroutput>DragAndDrop</computeroutput></glossterm>
2423 <glossdef>
2424 <para>Don't show the <emphasis>Drag and Drop</emphasis> menu item in this menu.</para>
2425 </glossdef>
2426 </glossentry>
2427 <glossentry>
2428 <glossterm><computeroutput>NetworkSettings</computeroutput></glossterm>
2429 <glossdef>
2430 <para>Don't show the <emphasis>Network Settings...</emphasis> menu item in this menu.</para>
2431 </glossdef>
2432 </glossentry>
2433 <glossentry>
2434 <glossterm><computeroutput>SharedFoldersSettings</computeroutput></glossterm>
2435 <glossdef>
2436 <para>Don't show the <emphasis>Shared Folders Settings...</emphasis> menu item in this menu.</para>
2437 </glossdef>
2438 </glossentry>
2439 <glossentry>
2440 <glossterm><computeroutput>VRDEServer</computeroutput></glossterm>
2441 <glossdef>
2442 <para>Don't show the <emphasis>Remove Display</emphasis> menu item in this menu.</para>
2443 </glossdef>
2444 </glossentry>
2445 <glossentry>
2446 <glossterm><computeroutput>InstallGuestTools</computeroutput></glossterm>
2447 <glossdef>
2448 <para>Don't show the <emphasis>Insert Guest Additions CD imnage...</emphasis> menu item in this menu.</para>
2449 </glossdef>
2450 </glossentry>
2451 </glosslist>
2452
2453 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2454 the default behavior, use</para>
2455 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDevicesMenuActions</screen>
2456
2457 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2458 menu:</para>
2459
2460 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDebuggerMenuActions OPTION[,OPTION...]</screen>
2461
2462 <para>where <computeroutput>OPTION</computeroutput> is one of the
2463 following keywords to disable actions in the <emphasis>Debug</emphasis> menu (normally completely disabled):</para><glosslist>
2464 <glossentry>
2465 <glossterm><computeroutput>All</computeroutput></glossterm>
2466 <glossdef>
2467 <para>Don't show any menu item in this menu.</para>
2468 </glossdef>
2469 </glossentry>
2470 <glossentry>
2471 <glossterm><computeroutput>Statistics</computeroutput></glossterm>
2472 <glossdef>
2473 <para>Don't show the <emphasis>Statistics...</emphasis> menu item in this menu.</para>
2474 </glossdef>
2475 </glossentry>
2476 <glossentry>
2477 <glossterm><computeroutput>CommandLine</computeroutput></glossterm>
2478 <glossdef>
2479 <para>Don't show the <emphasis>Command Line...</emphasis> menu item in this menu.</para>
2480 </glossdef>
2481 </glossentry>
2482 <glossentry>
2483 <glossterm><computeroutput>Logging</computeroutput></glossterm>
2484 <glossdef>
2485 <para>Don't show the <emphasis>Logging...</emphasis> menu item in this menu.</para>
2486 </glossdef>
2487 </glossentry>
2488 <glossentry>
2489 <glossterm><computeroutput>LogDialog</computeroutput></glossterm>
2490 <glossdef>
2491 <para>Don't show the <emphasis>Show Log...</emphasis> menu item in this menu.</para>
2492 </glossdef>
2493 </glossentry>
2494 </glosslist>
2495
2496 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2497 the default behavior, use</para>
2498 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDebuggerMenuActions</screen>
2499
2500 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2501 menu:</para>
2502
2503 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeHelpMenuActions OPTION[,OPTION...]</screen>
2504
2505 <para>where <computeroutput>OPTION</computeroutput> is one of the
2506 following keywords to disable actions in the <emphasis>Help</emphasis> menu (normally completely disabled):</para><glosslist>
2507 <glossentry>
2508 <glossterm><computeroutput>All</computeroutput></glossterm>
2509 <glossdef>
2510 <para>Don't show any menu item in this menu.</para>
2511 </glossdef>
2512 </glossentry>
2513 <glossentry>
2514 <glossterm><computeroutput>Contents</computeroutput></glossterm>
2515 <glossdef>
2516 <para>Don't show the <emphasis>Contents...</emphasis> menu item in this menu.</para>
2517 </glossdef>
2518 </glossentry>
2519 <glossentry>
2520 <glossterm><computeroutput>WebSite</computeroutput></glossterm>
2521 <glossdef>
2522 <para>Don't show the <emphasis>VirtualBox Web Site...</emphasis> menu item in this menu.</para>
2523 </glossdef>
2524 </glossentry>
2525 <glossentry>
2526 <glossterm><computeroutput>ResetWarnings</computeroutput></glossterm>
2527 <glossdef>
2528 <para>Don't show the <emphasis>Reset All Warnings</emphasis> menu item in this menu.</para>
2529 </glossdef>
2530 </glossentry>
2531 <glossentry>
2532 <glossterm><computeroutput>NetworkAccessManager</computeroutput></glossterm>
2533 <glossdef>
2534 <para>Don't show the <emphasis>Network Operations Manager</emphasis> menu item in this menu.</para>
2535 </glossdef>
2536 </glossentry>
2537 <glossentry>
2538 <glossterm><computeroutput>About</computeroutput></glossterm>
2539 <glossdef>
2540 <para>Don't show the <emphasis>About</emphasis> menu item in this menu (only on non Mac OS X hosts).</para>
2541 </glossdef>
2542 </glossentry>
2543 <glossentry>
2544 <glossterm><computeroutput>Contents</computeroutput></glossterm>
2545 <glossdef>
2546 <para>Don't show the <emphasis>Contents...</emphasis> menu item in this menu.</para>
2547 </glossdef>
2548 </glossentry>
2549 <glossentry>
2550 <glossterm><computeroutput>Contents</computeroutput></glossterm>
2551 <glossdef>
2552 <para>Don't show the <emphasis>Contents...</emphasis> menu item in this menu.</para>
2553 </glossdef>
2554 </glossentry>
2555 </glosslist>
2556
2557 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2558 the default behavior, use</para>
2559 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeHelpMenuActions</screen>
2560
2561 </sect2>
2562
2563 <sect2>
2564
2565 <title>Configure VM window status bar entries</title>
2566
2567 <para>You can disable (i.e. black-list) certain status bar items:</para>
2568 <screen>VBoxManage setextradata "VM name" GUI/RestrictedStatusBarIndicators OPTION[,OPTION...]</screen>
2569
2570 <para>where <computeroutput>OPTION</computeroutput> is one of the
2571 following keywords:</para><glosslist>
2572 <glossentry>
2573 <glossterm><computeroutput>HardDisks</computeroutput></glossterm>
2574 <glossdef>
2575 <para>Don't show the hard disk icon in the VM window status bar. By default
2576 the hard disk icon is only shown if the VM configuration contains one or
2577 more hard disks.</para>
2578 </glossdef>
2579 </glossentry>
2580
2581 <glossentry>
2582 <glossterm><computeroutput>OpticalDisks</computeroutput></glossterm>
2583 <glossdef>
2584 <para>Don't show the CD icon in the VM window status bar. By default the
2585 CD icon is only shown if the VM configuration contains one or more CD
2586 drives.</para>
2587 </glossdef>
2588 </glossentry>
2589
2590 <glossentry>
2591 <glossterm><computeroutput>FloppyDisks</computeroutput></glossterm>
2592 <glossdef>
2593 <para>Don't show the floppy icon in the VM window status bar. By default the
2594 floppy icon is only shown if the VM configuration contains one more
2595 more floppy drives.</para>
2596 </glossdef>
2597 </glossentry>
2598
2599 <glossentry>
2600 <glossterm><computeroutput>Network</computeroutput></glossterm>
2601 <glossdef>
2602 <para>Don't show the network icon in the VM window status bar. By default
2603 the network icon is only shown if the VM configuration contains one or more
2604 active network adapters.</para>
2605 </glossdef>
2606 </glossentry>
2607
2608 <glossentry>
2609 <glossterm><computeroutput>USB</computeroutput></glossterm>
2610 <glossdef>
2611 <para>Don't show the USB icon in the status bar. </para>
2612 </glossdef>
2613 </glossentry>
2614
2615 <glossentry>
2616 <glossterm><computeroutput>SharedFolders</computeroutput></glossterm>
2617 <glossdef>
2618 <para>Don't show the shared folders icon in the status bar.</para>
2619 </glossdef>
2620 </glossentry>
2621
2622 <glossentry>
2623 <glossterm><computeroutput>VideoCapture</computeroutput></glossterm>
2624 <glossdef>
2625 <para>Don't show the video capture icon in the status bar.</para>
2626 </glossdef>
2627 </glossentry>
2628
2629 <glossentry>
2630 <glossterm><computeroutput>Features</computeroutput></glossterm>
2631 <glossdef>
2632 <para>Don't show the CPU features icon in the status bar.</para>
2633 </glossdef>
2634 </glossentry>
2635
2636 <glossentry>
2637 <glossterm><computeroutput>Mouse</computeroutput></glossterm>
2638 <glossdef>
2639 <para>Don't show the mouse icon in the status bar.</para>
2640 </glossdef>
2641 </glossentry>
2642
2643 <glossentry>
2644 <glossterm><computeroutput>Keyboard</computeroutput></glossterm>
2645 <glossdef>
2646 <para>Don't show the keyboard icon in the status bar.</para>
2647 </glossdef>
2648 </glossentry>
2649
2650 </glosslist>
2651
2652 <para>This is a per-VM setting. Any combination of the above is allowed. If all options
2653 are specified, no icons are displayed in the status bar of the VM window. To restore
2654 the default behavior, use</para>
2655
2656 <screen>VBoxManage setextradata "VM name" GUI/RestrictedStatusBarIndicators</screen>
2657
2658 </sect2>
2659
2660 <sect2>
2661 <title>Configure VM window visual modes</title>
2662
2663 <para>You can disable (i.e. black-list) certain VM visual modes:</para>
2664 <screen>VBoxManage setextradata "VM name" GUI/RestrictedVisualStates OPTION[,OPTION...]</screen>
2665
2666 <para>where <computeroutput>OPTION</computeroutput> is one of the
2667 following keywords:</para><glosslist>
2668 <glossentry>
2669 <glossterm><computeroutput>Fullscreen</computeroutput></glossterm>
2670 <glossdef>
2671 <para>Don't allow to switch the VM into full screen mode.</para>
2672 </glossdef>
2673 </glossentry>
2674
2675 <glossentry>
2676 <glossterm><computeroutput>Seamless</computeroutput></glossterm>
2677 <glossdef>
2678 <para>Don't allow to switch the VM into seamless mode.</para>
2679 </glossdef>
2680 </glossentry>
2681
2682 <glossentry>
2683 <glossterm><computeroutput>Scale</computeroutput></glossterm>
2684 <glossdef>
2685 <para>Don't allow to switch the VM into scale mode.</para>
2686 </glossdef>
2687 </glossentry>
2688
2689 </glosslist>
2690
2691 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2692 the default behavior, use</para>
2693
2694 <screen>VBoxManage setextradata "VM name" GUI/RestrictedVisualStates</screen>
2695
2696 </sect2>
2697
2698 <sect2>
2699 <title>Host Key customization</title>
2700
2701 <para>To disable all host key combinations, open the preferences and
2702 change the host key to <emphasis>None</emphasis>. This might be useful
2703 when using VirtualBox in a kiosk mode.</para>
2704
2705 <para>To redefine or disable certain host key actions, use the following command:</para>
2706
2707 <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=F,...."</screen>
2708
2709 <para>The following list shows the possible host key actions together with their default
2710 host key shortcut. Setting an action to <emphasis>None</emphasis> will disable
2711 that host key action.</para>
2712 <table>
2713 <title>Host Key customization</title>
2714 <tgroup cols="3">
2715 <thead>
2716 <row>
2717 <entry><emphasis role="bold">Action</emphasis></entry>
2718 <entry><emphasis role="bold">Default Key</emphasis></entry>
2719 <entry><emphasis role="bold">Action</emphasis></entry>
2720 </row>
2721 </thead>
2722 <tbody>
2723 <row>
2724 <entry><computeroutput>TakeSnapshot</computeroutput></entry>
2725 <entry>T</entry>
2726 <entry>take a snapshot</entry>
2727 </row>
2728 <row>
2729 <entry><computeroutput>TakeScreenshot</computeroutput></entry>
2730 <entry>E</entry>
2731 <entry>take a screenshot</entry>
2732 </row>
2733 <row>
2734 <entry><computeroutput>MouseIntegration</computeroutput></entry>
2735 <entry>I</entry>
2736 <entry>toggle mouse integration</entry>
2737 </row>
2738 <row>
2739 <entry><computeroutput>TypeCAD</computeroutput></entry>
2740 <entry>Del</entry>
2741 <entry>inject Ctrl+Alt+Del</entry>
2742 </row>
2743 <row>
2744 <entry><computeroutput>TypeCABS</computeroutput></entry>
2745 <entry>Backspace</entry>
2746 <entry>inject Ctrl+Alt+Backspace</entry>
2747 </row>
2748 <row>
2749 <entry><computeroutput>Pause</computeroutput></entry>
2750 <entry>P</entry>
2751 <entry>Pause the VM</entry>
2752 </row>
2753 <row>
2754 <entry><computeroutput>Reset</computeroutput></entry>
2755 <entry>R</entry>
2756 <entry>(hard) reset the guest</entry>
2757 </row>
2758 <row>
2759 <entry><computeroutput>SaveState</computeroutput></entry>
2760 <entry></entry>
2761 <entry>save the VM state and terminate the VM</entry>
2762 </row>
2763 <row>
2764 <entry><computeroutput>Shutdown</computeroutput></entry>
2765 <entry>H</entry>
2766 <entry>press the (virtual) ACPI power button</entry>
2767 </row>
2768 <row>
2769 <entry><computeroutput>PowerOff</computeroutput></entry>
2770 <entry></entry>
2771 <entry>power the VM off (without saving the state!)</entry>
2772 </row>
2773 <row>
2774 <entry><computeroutput>Close</computeroutput></entry>
2775 <entry>Q</entry>
2776 <entry>show the VM close dialog</entry>
2777 </row>
2778 <row>
2779 <entry><computeroutput>FullscreenMode</computeroutput></entry>
2780 <entry>F</entry>
2781 <entry>switch the VM into full screen</entry>
2782 </row>
2783 <row>
2784 <entry><computeroutput>SeamlessMode</computeroutput></entry>
2785 <entry>L</entry>
2786 <entry>switch the VM into seamless mode</entry>
2787 </row>
2788 <row>
2789 <entry><computeroutput>ScaleMode</computeroutput></entry>
2790 <entry>C</entry>
2791 <entry>switch the VM into scale mode</entry>
2792 </row>
2793 <row>
2794 <entry><computeroutput>GuestAutoResize</computeroutput></entry>
2795 <entry>G</entry>
2796 <entry>automatically resize the guest window</entry>
2797 </row>
2798 <row>
2799 <entry><computeroutput>WindowAdjust</computeroutput></entry>
2800 <entry>A</entry>
2801 <entry>immediately resize the guest window</entry>
2802 </row>
2803 <row>
2804 <entry><computeroutput>PopupMenu</computeroutput></entry>
2805 <entry>Home</entry>
2806 <entry>show popup menu in full screen / seaml. mode</entry>
2807 </row>
2808 <row>
2809 <entry><computeroutput>SettingsDialog</computeroutput></entry>
2810 <entry>S</entry>
2811 <entry>open the VM settings dialog</entry>
2812 </row>
2813 <row>
2814 <entry><computeroutput>InformationDialog</computeroutput></entry>
2815 <entry>N</entry>
2816 <entry>show the VM information window</entry>
2817 </row>
2818 <row>
2819 <entry><computeroutput>NetworkAdaptersDialog</computeroutput></entry>
2820 <entry></entry>
2821 <entry>show the VM network adapters dialog</entry>
2822 </row>
2823 <row>
2824 <entry><computeroutput>SharedFoldersDialog</computeroutput></entry>
2825 <entry></entry>
2826 <entry>show the VM shared folders dialog</entry>
2827 </row>
2828 <row>
2829 <entry><computeroutput>InstallGuestAdditions</computeroutput></entry>
2830 <entry>D</entry>
2831 <entry>mount the ISO containing the Guest Additions</entry>
2832 </row>
2833 </tbody>
2834 </tgroup>
2835 </table>
2836
2837 <para>To disable the full screen mode as well as the seamless mode, use the following command:
2838 <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
2839 </para>
2840
2841 </sect2>
2842
2843 <sect2>
2844 <title>Action when terminating the VM</title>
2845
2846 <para>You can disallow (i.e. black-list) certain actions when terminating a VM.
2847 To disallow specific actions, type:</para>
2848
2849 <para><screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen></para>
2850
2851 <para>where <computeroutput>OPTION</computeroutput> is one of the
2852 following keywords:</para><glosslist>
2853 <glossentry>
2854 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
2855 <glossdef>
2856 <para>Don't allow the user to save the VM state when terminating
2857 the VM.</para>
2858 </glossdef>
2859 </glossentry>
2860
2861 <glossentry>
2862 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
2863 <glossdef>
2864 <para>Don't allow the user to shutdown the VM by sending the ACPI
2865 power-off event to the guest.</para>
2866 </glossdef>
2867 </glossentry>
2868
2869 <glossentry>
2870 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2871 <glossdef>
2872 <para>Don't allow the user to power off the VM.</para>
2873 </glossdef>
2874 </glossentry>
2875
2876 <glossentry>
2877 <glossterm><computeroutput>PowerOffRestoringSnapshot</computeroutput></glossterm>
2878 <glossdef>
2879 <para>Don't allow the user to return to the last snapshot when
2880 powering off the VM.</para>
2881 </glossdef>
2882 </glossentry>
2883 </glosslist>
2884
2885 <para>This is a per-VM setting. Any combination of the above is allowed. If all
2886 options are specified, the VM cannot be shut down at all.</para>
2887 </sect2>
2888
2889 <sect2>
2890 <title>Action for handling a Guru Meditation</title>
2891
2892 <para>A VM runs into a Guru Meditation if there is a problem which
2893 cannot be fixed by other means than terminating the process. The
2894 default is to show a message window which instructs the user to
2895 open a bug report.</para>
2896 <para>This behavior can be configured:</para>
2897
2898 <para><screen>VBoxManage setextradata "VM name" GUI/GuruMeditationHandler MODE</screen></para>
2899
2900 <para>where <computeroutput>MODE</computeroutput> is one of the
2901 following keywords:</para><glosslist>
2902 <glossentry>
2903 <glossterm><computeroutput>Default</computeroutput></glossterm>
2904 <glossdef>
2905 <para>A message window is shown. After the user confirmed, the
2906 VM is terminated.</para>
2907 </glossdef>
2908 </glossentry>
2909
2910 <glossentry>
2911 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2912 <glossdef>
2913 <para>The VM is immediately powered-off without showing any message
2914 window. The VM logfile will show information about what happend.</para>
2915 </glossdef>
2916 </glossentry>
2917
2918 <glossentry>
2919 <glossterm><computeroutput>Ignore</computeroutput></glossterm>
2920 <glossdef>
2921 <para>The VM is left in stuck mode. Execution is stopped but no
2922 message window is shown. The VM has to be powered off manually.</para>
2923 </glossdef>
2924 </glossentry>
2925 </glosslist>
2926
2927 <para>This is a per-VM setting.</para>
2928 </sect2>
2929
2930 <sect2>
2931 <title>Configuring automatic mouse capturing</title>
2932
2933 <para>
2934 By default, the mouse is captured if the user clicks on the guest window
2935 and the guest expects relative mouse coordiantes at this time. This
2936 happens if the pointing device is configured as PS/2 mouse and the guest did
2937 not (yet) start the VirtualBox Guest Additions (for instance, the guest is
2938 booting or no Guest Additions installed at all) or if the pointing device
2939 is configured as USB tablet but the guest has no USB driver loaded yet.
2940 Once the Guest Additions become active or the USB guest driver is started,
2941 the mouse capture is automatically released.
2942 </para>
2943 <para>
2944 The default behavior is sometimes not desired. Therefore it can be configured:
2945 </para>
2946 <para><screen>VBoxManage setextradata "VM name" GUI/MouseCapturePolicy MODE</screen></para>
2947
2948 <para>where <computeroutput>MODE</computeroutput> is one of the
2949 following keywords:</para><glosslist>
2950 <glossentry>
2951 <glossterm><computeroutput>Default</computeroutput></glossterm>
2952 <glossdef>
2953 <para>The default behavior as described above.</para>
2954 </glossdef>
2955 </glossentry>
2956 <glossentry>
2957 <glossterm><computeroutput>HostComboOnly</computeroutput></glossterm>
2958 <glossdef>
2959 <para>The mouse is only captured if the Host Key is toggled.</para>
2960 </glossdef>
2961 </glossentry>
2962 <glossentry>
2963 <glossterm><computeroutput>Disabled</computeroutput></glossterm>
2964 <glossdef>
2965 <para>The mouse is never captured, also not by toggling the Host Key</para>
2966 </glossdef>
2967 </glossentry>
2968 </glosslist>
2969
2970 <para>This is a per-VM setting.</para>
2971
2972 </sect2>
2973
2974 <sect2 id="mouse-capture">
2975 <title>Configuring automatic mouse capturing</title>
2976
2977 <para>
2978 By default, the mouse is captured if the user clicks on the guest window
2979 and the guest expects relative mouse coordiantes at this time. This
2980 happens if the pointing device is configured as PS/2 mouse and the guest did
2981 not (yet) start the VirtualBox Guest Additions (for instance, the guest is
2982 booting or no Guest Additions installed at all) or if the pointing device
2983 is configured as USB tablet but the guest has no USB driver loaded yet.
2984 Once the Guest Additions become active or the USB guest driver is started,
2985 the mouse capture is automatically released.
2986 </para>
2987 <para>
2988 The default behavior is sometimes not desired. Therefore it can be configured:
2989 </para>
2990 <para><screen>VBoxManage setextradata "VM name" GUI/MouseCapturePolicy MODE</screen></para>
2991
2992 <para>where <computeroutput>MODE</computeroutput> is one of the
2993 following keywords:</para><glosslist>
2994 <glossentry>
2995 <glossterm><computeroutput>Default</computeroutput></glossterm>
2996 <glossdef>
2997 <para>The default behavior as described above.</para>
2998 </glossdef>
2999 </glossentry>
3000 <glossentry>
3001 <glossterm><computeroutput>HostComboOnly</computeroutput></glossterm>
3002 <glossdef>
3003 <para>The mouse is only captured if the Host Key is toggled.</para>
3004 </glossdef>
3005 </glossentry>
3006 <glossentry>
3007 <glossterm><computeroutput>Disabled</computeroutput></glossterm>
3008 <glossdef>
3009 <para>The mouse is never captured, also not by toggling the Host Key</para>
3010 </glossdef>
3011 </glossentry>
3012 </glosslist>
3013
3014 <para>This is a per-VM setting.</para>
3015
3016 </sect2>
3017
3018 <sect2 id="legacy-fullscreen-mode">
3019 <title>Requesting legacy full-screen mode</title>
3020
3021 <para>
3022 As of version 4.3.16, VirtualBox uses special window manager facilities to switch
3023 a multi-screen machine to full-screen on a multi-monitor host system. However,
3024 not all window managers provide these facilities correctly, so VirtualBox can be
3025 told to use the old method of switching to full-screen mode instead using the command:
3026 </para>
3027 <para><screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode true</screen></para>
3028
3029 <para>
3030 You can go back to the new method using the command:
3031 </para>
3032 <para><screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode</screen></para>
3033
3034 <para>This is a global setting.</para>
3035
3036 </sect2>
3037
3038 </sect1>
3039
3040 <sect1 id="vboxwebsrv-daemon">
3041 <title>Starting the VirtualBox web service automatically</title>
3042
3043 <para>The VirtualBox web service
3044 (<computeroutput>vboxwebsrv</computeroutput>) is used for controlling
3045 VirtualBox remotely. It is documented in detail in the VirtualBox Software
3046 Development Kit (SDK); please see <xref linkend="VirtualBoxAPI" />. As the
3047 client base using this interface is growing, we added start scripts for
3048 the various operation systems we support. The following sections describe
3049 how to use them. The VirtualBox web service is never started automatically
3050 as a result of a standard installation.</para>
3051
3052 <sect2 id="vboxwebsrv-linux">
3053 <title>Linux: starting the webservice via <computeroutput>init</computeroutput></title>
3054
3055 <para>On Linux, the web service can be automatically started during
3056 host boot by adding appropriate parameters to the file
3057 <computeroutput>/etc/default/virtualbox</computeroutput>.
3058 There is one mandatory parameter, <computeroutput>VBOXWEB_USER</computeroutput>,
3059 which must be set to the user which will later start the VMs. The
3060 parameters in the table below all start with <computeroutput>VBOXWEB_</computeroutput>
3061 (<computeroutput>VBOXWEB_HOST</computeroutput>,
3062 <computeroutput>VBOXWEB_PORT</computeroutput> etc.):
3063 <table>
3064 <title>Web service configuration parameters</title>
3065 <tgroup cols="3">
3066 <thead>
3067 <row>
3068 <entry><emphasis role="bold">Parameter</emphasis></entry>
3069 <entry><emphasis role="bold">Description</emphasis></entry>
3070 <entry><emphasis role="bold">Default</emphasis></entry>
3071 </row>
3072 </thead>
3073 <tbody>
3074 <row>
3075 <entry><computeroutput>USER</computeroutput></entry>
3076 <entry>The user as which the web service runs</entry>
3077 <entry></entry>
3078 </row>
3079 <row>
3080 <entry><computeroutput>HOST</computeroutput></entry>
3081 <entry>The host to bind the web service to</entry>
3082 <entry>localhost</entry>
3083 </row>
3084 <row>
3085 <entry><computeroutput>PORT</computeroutput></entry>
3086 <entry>The port to bind the web service to</entry>
3087 <entry>18083</entry>
3088 </row>
3089 <row>
3090 <entry><computeroutput>SSL_KEYFILE</computeroutput></entry>
3091 <entry>Server key and certificate file, PEM format</entry>
3092 <entry></entry>
3093 </row>
3094 <row>
3095 <entry><computeroutput>SSL_PASSWORDFILE</computeroutput></entry>
3096 <entry>File name for password to server key</entry>
3097 <entry></entry>
3098 </row>
3099 <row>
3100 <entry><computeroutput>SSL_CACERT</computeroutput></entry>
3101 <entry>CA certificate file, PEM format</entry>
3102 <entry></entry>
3103 </row>
3104 <row>
3105 <entry><computeroutput>SSL_CAPATH</computeroutput></entry>
3106 <entry>CA certificate path</entry>
3107 <entry></entry>
3108 </row>
3109 <row>
3110 <entry><computeroutput>SSL_DHFILE</computeroutput></entry>
3111 <entry>DH file name or DH key length in bits</entry>
3112 <entry></entry>
3113 </row>
3114 <row>
3115 <entry><computeroutput>SSL_RANDFILE</computeroutput></entry>
3116 <entry>File containing seed for random number generator</entry>
3117 <entry></entry>
3118 </row>
3119 <row>
3120 <entry><computeroutput>TIMEOUT</computeroutput></entry>
3121 <entry>Session timeout in seconds; 0 disables timeouts</entry>
3122 <entry>300</entry>
3123 </row>
3124 <row>
3125 <entry><computeroutput>CHECK_INTERVAL</computeroutput></entry>
3126 <entry>Frequency of timeout checks in seconds</entry>
3127 <entry>5</entry>
3128 </row>
3129 <row>
3130 <entry><computeroutput>THREADS</computeroutput></entry>
3131 <entry>Maximum number of worker threads to run in parallel</entry>
3132 <entry>100</entry>
3133 </row>
3134 <row>
3135 <entry><computeroutput>KEEPALIVE</computeroutput></entry>
3136 <entry>Maximum number of requests before a socket will be closed</entry>
3137 <entry>100</entry>
3138 </row>
3139 <row>
3140 <entry><computeroutput>ROTATE</computeroutput></entry>
3141 <entry>Number of log files; 0 disables log rotation</entry>
3142 <entry>10</entry>
3143 </row>
3144 <row>
3145 <entry><computeroutput>LOGSIZE</computeroutput></entry>
3146 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
3147 <entry>1MB</entry>
3148 </row>
3149 <row>
3150 <entry><computeroutput>LOGINTERVAL</computeroutput></entry>
3151 <entry>Maximum time interval in seconds to trigger log rotation</entry>
3152 <entry>1 day</entry>
3153 </row>
3154 </tbody>
3155 </tgroup>
3156 </table>
3157 </para>
3158
3159 <para>Setting the parameter <computeroutput>SSL_KEYFILE</computeroutput>
3160 enables the SSL/TLS support. Using encryption is strongly encouraged, as
3161 otherwise everything (including passwords) is transferred in clear
3162 text.</para>
3163 </sect2>
3164
3165 <sect2 id="vboxwebsrv-solaris">
3166 <title>Solaris: starting the web service via SMF</title>
3167
3168 <para>On Solaris hosts, the VirtualBox web service daemon is
3169 integrated into the SMF framework. You can change the parameters, but
3170 don't have to if the defaults below already match your needs:<screen>svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
3171svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
3172svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root</screen></para>
3173
3174 <para>The table in the previous section showing the parameter names and
3175 defaults also applies to Solaris. The parameter names must be changed
3176 to lowercase and a prefix of <computeroutput>config/</computeroutput>
3177 has to be added, e.g. <computeroutput>config/user</computeroutput> or
3178 <computeroutput>config/ssl_keyfile</computeroutput>. If you made any
3179 change, don't forget to run the following command to put the changes into
3180 effect immediately:<screen>svcadm refresh svc:/application/virtualbox/webservice:default</screen></para>
3181
3182 <para>If you forget the above command then the previous settings will
3183 be used when enabling the service. Check the current property settings
3184 with:<screen>svcprop -p config svc:/application/virtualbox/webservice:default</screen></para>
3185
3186 <para>When everything is configured correctly you can start the
3187 VirtualBox web service with the following command:<screen>svcadm enable svc:/application/virtualbox/webservice:default</screen></para>
3188
3189 <para>For more information about SMF, please refer to the Solaris
3190 documentation.</para>
3191 </sect2>
3192
3193 <sect2 id="vboxwebsrv-osx">
3194 <title>Mac OS X: starting the webservice via launchd</title>
3195
3196 <para>On Mac OS X, launchd is used to start the VirtualBox webservice. An
3197 example configuration file can be found in
3198 <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
3199 It can be enabled by changing the
3200 <computeroutput>Disabled</computeroutput> key from
3201 <computeroutput>true</computeroutput> to
3202 <computeroutput>false</computeroutput>. To manually start the
3203 service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
3204 For additional information on how launchd services could be
3205 configured see <literal><ulink
3206 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></literal>.</para>
3207 </sect2>
3208 </sect1>
3209
3210 <sect1 id="vboxwatchdog">
3211 <title>VirtualBox Watchdog</title>
3212 <para>Starting with VirtualBox 4.2 the memory ballooning service formerly
3213 known as <computeroutput>VBoxBalloonCtrl</computeroutput> was renamed to
3214 VBoxWatchdog, which now incorporates several host services that are meant
3215 to be run in a server environment.</para>
3216
3217 <para>These services are: <itemizedlist>
3218 <listitem>
3219 <para>Memory ballooning control, which automatically takes care of
3220 a VM's configured memory balloon (see <xref linkend="guestadd-balloon" />
3221 for an introduction to memory ballooning). This especially is useful
3222 for server environments where VMs may dynamically require more or
3223 less memory during runtime.</para>
3224
3225 <para>The service periodically checks a VM's current memory balloon
3226 and its free guest RAM and automatically adjusts the current memory
3227 balloon by inflating or deflating it accordingly. This handling only
3228 applies to running VMs having recent Guest Additions installed.</para>
3229 </listitem>
3230 <listitem>
3231 <para>Host isolation detection, which provides a way to detect whether
3232 the host cannot reach the specific VirtualBox server instance anymore
3233 and take appropriate actions, such as shutting down, saving the
3234 current state or even powering down certain VMs.</para>
3235 </listitem>
3236 </itemizedlist></para>
3237
3238 <para>
3239 All configuration values can be either specified via command line or global
3240 extradata, whereas command line values always have a higher priority when set.
3241 Some of the configuration values also be be specified on a per-VM basis. So
3242 the overall lookup order is: command line, per-VM basis extradata (if available),
3243 global extradata.
3244 </para>
3245
3246 <sect2 id="vboxwatchdog-ballonctrl">
3247 <title>Memory ballooning control</title>
3248 <para>The memory ballooning control inflates and deflates the memory balloon
3249 of VMs based on the VMs free memory and the desired maximum balloon size.</para>
3250
3251 <para>To set up the memory ballooning control the maximum ballooning size a
3252 VM can reach needs to be set. This can be specified via command line with
3253 <screen>--balloon-max &lt;Size in MB&gt;</screen>, on a per-VM basis extradata value with
3254 <screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
3255 or using a global extradata value with
3256 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
3257 <note><para>If no maximum ballooning size is specified by at least one of
3258 the parameters above, no ballooning will be performed at all.</para></note>
3259 </para>
3260
3261 <para>Setting the ballooning increment in MB can be either done via
3262 command line with
3263 <screen>--balloon-inc &lt;Size in MB&gt;</screen> or using a global
3264 extradata value with
3265 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
3266 Default ballooning increment is 256 MB if not specified.</para>
3267
3268 <para>Same goes with the ballooning decrement: Via command line with
3269 <screen>--balloon-dec &lt;Size in MB&gt;</screen> or using a global
3270 extradata value with
3271 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
3272 Default ballooning decrement is 128 MB if not specified.</para>
3273
3274 <para>To define the lower limit in MB a balloon can be the command line with
3275 <screen>--balloon-lower-limit &lt;Size in MB&gt;</screen> can be used or using a global
3276 extradata value with
3277 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
3278 is available. Default lower limit is 128 if not specified.</para>
3279 </sect2>
3280
3281 <sect2 id="vboxwatchdog-hostisln">
3282 <title>Host isolation detection</title>
3283 <para>To detect whether a host is being isolated, that is, the host cannot
3284 reach the VirtualBox server instance anymore, the host needs to set an
3285 alternating value to a global extradata value within a time period. If
3286 this value is not set within that time period a timeout occurred and the
3287 so-called host isolation response will be performed to the VMs handled.
3288 Which VMs are handled can be controlled by defining VM groups and assigning
3289 VMs to those groups. By default no groups are set, meaning that all VMs
3290 on the server will be handled when no host response is received within
3291 30 seconds.</para>
3292
3293 <para>To set the groups handled by the host isolation detection via
3294 command line:
3295 <screen>--apimon-groups=&lt;string[,stringN]&gt;</screen> or using a global
3296 extradata value with
3297 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
3298 </para>
3299
3300 <para>To set the host isolation timeout via command line:
3301 <screen>--apimon-isln-timeout=&lt;ms&gt;</screen> or using a global
3302 extradata value with
3303 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
3304 </para>
3305
3306 <para>To set the actual host isolation response via command line:
3307 <screen>--apimon-isln-response=&lt;cmd&gt;</screen> or using a global
3308 extradata value with
3309 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
3310 The following response commands are available:
3311 <itemizedlist>
3312 <listitem>
3313 <para><computeroutput>none</computeroutput>, which does nothing.</para>
3314 </listitem>
3315 <listitem>
3316 <para><computeroutput>pause</computeroutput>, which pauses the
3317 execution of a VM.</para>
3318 </listitem>
3319 <listitem>
3320 <para><computeroutput>poweroff</computeroutput>, which shuts down
3321 the VM by pressing the virtual power button. The VM will not have
3322 the chance of saving any data or veto the shutdown process.</para>
3323 </listitem>
3324 <listitem>
3325 <para><computeroutput>save</computeroutput>, which saves the current
3326 machine state and powers off the VM afterwards. If saving the machine
3327 state fails the VM will be paused.</para>
3328 </listitem>
3329 <listitem>
3330 <para><computeroutput>shutdown</computeroutput>, which shuts down
3331 the VM in a gentle way by sending an <computeroutput>ACPI</computeroutput>
3332 shutdown event to the VM's operating system. The OS then has the
3333 chance of doing a clean shutdown.</para>
3334 </listitem>
3335 </itemizedlist>
3336 </para>
3337 </sect2>
3338
3339 <sect2 id="vboxwatchdog-moreinfo">
3340 <title>More information</title>
3341 <para>For more advanced options and parameters like verbose logging check
3342 the built-in command line help accessible with
3343 <computeroutput>--help</computeroutput>.</para>
3344 </sect2>
3345
3346 <sect2 id="vboxwatchdog-linux">
3347 <title>Linux: starting the watchdog service via <computeroutput>init</computeroutput></title>
3348
3349 <para>On Linux, the watchdog service can be automatically started during
3350 host boot by adding appropriate parameters to the file
3351 <computeroutput>/etc/default/virtualbox</computeroutput>.
3352 There is one mandatory parameter, <computeroutput>VBOXWATCHDOG_USER</computeroutput>,
3353 which must be set to the user which will later start the VMs. For backward
3354 compatibility you can also specify <computeroutput>VBOXBALLOONCTRL_USER</computeroutput>The
3355 parameters in the table below all start with <computeroutput>VBOXWATCHDOG_</computeroutput>
3356 (<computeroutput>VBOXWATCHDOG_BALLOON_INTERVAL</computeroutput>,
3357 <computeroutput>VBOXWATCHDOG_LOGSIZE</computeroutput> etc., and for
3358 previously existing parameters the
3359 <computeroutput>VBOXBALLOONCTRL_INTERVAL</computeroutput> etc. parameters
3360 can still be used):
3361 <table>
3362 <title>VirtualBox watchdog configuration parameters</title>
3363 <tgroup cols="3">
3364 <thead>
3365 <row>
3366 <entry><emphasis role="bold">Parameter</emphasis></entry>
3367 <entry><emphasis role="bold">Description</emphasis></entry>
3368 <entry><emphasis role="bold">Default</emphasis></entry>
3369 </row>
3370 </thead>
3371 <tbody>
3372 <row>
3373 <entry><computeroutput>USER</computeroutput></entry>
3374 <entry>The user as which the watchdog service runs</entry>
3375 <entry></entry>
3376 </row>
3377 <row>
3378 <entry><computeroutput>ROTATE</computeroutput></entry>
3379 <entry>Number of log files; 0 disables log rotation</entry>
3380 <entry>10</entry>
3381 </row>
3382 <row>
3383 <entry><computeroutput>LOGSIZE</computeroutput></entry>
3384 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
3385 <entry>1MB</entry>
3386 </row>
3387 <row>
3388 <entry><computeroutput>LOGINTERVAL</computeroutput></entry>
3389 <entry>Maximum time interval in seconds to trigger log rotation</entry>
3390 <entry>1 day</entry>
3391 </row>
3392 <row>
3393 <entry><computeroutput>BALLOON_INTERVAL</computeroutput></entry>
3394 <entry>Interval for checking the balloon size (msec)</entry>
3395 <entry>30000</entry>
3396 </row>
3397 <row>
3398 <entry><computeroutput>BALLOON_INCREMENT</computeroutput></entry>
3399 <entry>Balloon size increment (MByte)</entry>
3400 <entry>256</entry>
3401 </row>
3402 <row>
3403 <entry><computeroutput>BALLOON_DECREMENT</computeroutput></entry>
3404 <entry>Balloon size decrement (MByte)</entry>
3405 <entry>128</entry>
3406 </row>
3407 <row>
3408 <entry><computeroutput>BALLOON_LOWERLIMIT</computeroutput></entry>
3409 <entry>Balloon size lower limit (MByte)</entry>
3410 <entry>64</entry>
3411 </row>
3412 <row>
3413 <entry><computeroutput>BALLOON_SAFETYMARGIN</computeroutput></entry>
3414 <entry>Free memory required for decreasing the balloon size (MByte)</entry>
3415 <entry>1024</entry>
3416 </row>
3417 </tbody>
3418 </tgroup>
3419 </table>
3420 </para>
3421 </sect2>
3422
3423 <sect2 id="vboxwatchdog-solaris">
3424 <title>Solaris: starting the watchdog service via SMF</title>
3425
3426 <para>On Solaris hosts, the VirtualBox watchdog service daemon is
3427 integrated into the SMF framework. You can change the parameters, but
3428 don't have to if the defaults already match your needs:<screen>svccfg -s svc:/application/virtualbox/balloonctrl:default setprop config/balloon_interval=10000
3429svccfg -s svc:/application/virtualbox/balloonctrl:default setprop config/balloon_safetymargin=134217728</screen></para>
3430
3431 <para>The table in the previous section showing the parameter names and
3432 defaults also applies to Solaris. The parameter names must be changed
3433 to lowercase and a prefix of <computeroutput>config/</computeroutput>
3434 has to be added, e.g. <computeroutput>config/user</computeroutput> or
3435 <computeroutput>config/balloon_safetymargin</computeroutput>. If you made any
3436 change, don't forget to run the following command to put the changes into
3437 effect immediately:<screen>svcadm refresh svc:/application/virtualbox/balloonctrl:default</screen></para>
3438
3439 <para>If you forget the above command then the previous settings will
3440 be used when enabling the service. Check the current property settings
3441 with:<screen>svcprop -p config svc:/application/virtualbox/balloonctrl:default</screen></para>
3442
3443 <para>When everything is configured correctly you can start the
3444 VirtualBox watchdog service with the following command:<screen>svcadm enable svc:/application/virtualbox/balloonctrl:default</screen></para>
3445
3446 <para>For more information about SMF, please refer to the Solaris
3447 documentation.</para>
3448 </sect2>
3449
3450 </sect1>
3451
3452 <sect1 id="otherextpacks">
3453 <title>Other extension packs</title>
3454
3455 <para>Starting with VirtualBox 4.2.0 there is another extension pack,
3456 <code>VNC</code>, which is open source and replaces the previous
3457 integration of the VNC remote access protocol. This is experimental code,
3458 and will be initially available in the VirtualBox source code package only.
3459 It is to a large portion code contributed by users, and is not supported
3460 in any way by Oracle.</para>
3461
3462 <para>The keyboard handling is severely limited, and only the US keyboard
3463 layout works. Other keyboard layouts will have at least some keys which
3464 produce the wrong results (often quite surprising effects), and for layouts
3465 which have significant differences to the US keyboard layout it is most
3466 likely unusable.</para>
3467
3468 <para>It is possible to install both the Oracle VM VirtualBox Extension
3469 Pack and VNC, but only one VRDE module can be active at any time. The
3470 following command switches to the VNC VRDE module in
3471 VNC:<screen>VBoxManage setproperty vrdeextpack VNC</screen></para>
3472
3473 <para>Configuring the remote access works very similarly to VRDP (see
3474 <xref linkend="vrde" />), with some limitations: VNC does not
3475 support specifying several port numbers, and the authentication is done
3476 differently. VNC can only deal with password authentication, and there
3477 is no option to use password hashes. This leaves no other choice than
3478 having a clear-text password in the VM configuration, which can be set with
3479 the following command:<screen>VBoxManage modifyvm "VM name" --vrdeproperty VNCPassword=secret</screen></para>
3480
3481 <para>The user is responsible for keeping this password secret, and it
3482 should be removed when a VM configuration is passed to another person,
3483 for whatever purpose. Some VNC servers claim to have "encrypted" passwords
3484 in the configuration. This is not true encryption, it is only concealing
3485 the passwords, which is exactly as secure as clear-text passwords.</para>
3486
3487 <para>The following command switches back to VRDP (if
3488 installed):<screen>VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"</screen></para>
3489 </sect1>
3490
3491 <sect1 id="autostart">
3492 <title>Starting virtual machines during system boot</title>
3493
3494 <para>Starting with VirtualBox 4.2.0 it is possible to start VMs automatically during
3495 system boot on Linux, Solaris and Mac OS X for all users. </para>
3496
3497 <sect2 id="autostart-linux">
3498 <title>Linux: starting the autostart service via <computeroutput>init</computeroutput></title>
3499
3500 <para>On Linux, the autostart service is activated by setting two variables in
3501 <computeroutput>/etc/default/virtualbox</computeroutput>.
3502 The first one is <computeroutput>VBOXAUTOSTART_DB</computeroutput> which
3503 contains an absolute path to the autostart database directory.
3504 The directory should have write access for every user who should be able to
3505 start virtual machines automatically. Furthermore the directory should have the
3506 sticky bit set.
3507 The second variable is <computeroutput>VBOXAUTOSTART_CONFIG</computeroutput>
3508 which points the service to the autostart configuration file which is used
3509 during boot to determine whether to allow individual users to start a VM
3510 automatically and configure startup delays.
3511 The configuration file can be placed in <computeroutput>/etc/vbox</computeroutput>
3512 and contains several options. One is <computeroutput>default_policy</computeroutput>
3513 which controls whether the autostart service allows or denies to start a VM
3514 for users which are not in the exception list.
3515 The exception list starts with <computeroutput>exception_list</computeroutput>
3516 and contains a comma separated list with usernames. Furthermore a separate
3517 startup delay can be configured for every user to avoid overloading the host.
3518 A sample configuration is given below:</para>
3519
3520 <para><screen>
3521# Default policy is to deny starting a VM, the other option is "allow".
3522default_policy = deny
3523
3524# Bob is allowed to start virtual machines but starting them
3525# will be delayed for 10 seconds
3526bob = {
3527 allow = true
3528 startup_delay = 10
3529}
3530
3531# Alice is not allowed to start virtual machines, useful to exclude certain users
3532# if the default policy is set to allow.
3533alice = {
3534 allow = false
3535}
3536 </screen></para>
3537
3538 <para>Every user who wants to enable autostart for individual machines
3539 has to set the path to the autostart database directory with
3540 <screen>VBoxManage setproperty autostartdbpath &lt;Autostart directory&gt;</screen>
3541 </para>
3542 </sect2>
3543
3544 <sect2 id="autostart-solaris">
3545 <title>Solaris: starting the autostart service via SMF</title>
3546
3547 <para>On Solaris hosts, the VirtualBox autostart daemon is
3548 integrated into the SMF framework. To enable it you have to point the service
3549 to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />):
3550 <screen>svccfg -s svc:/application/virtualbox/autostart:default setprop config/config=/etc/vbox/autostart.cfg</screen>
3551 </para>
3552
3553 <para>When everything is configured correctly you can start the
3554 VirtualBox autostart service with the following command:<screen>svcadm enable svc:/application/virtualbox/autostart:default</screen></para>
3555
3556 <para>For more information about SMF, please refer to the Solaris
3557 documentation.</para>
3558 </sect2>
3559
3560 <sect2 id="autostart-osx">
3561 <title>Mac OS X: starting the autostart service via launchd</title>
3562
3563 <para>On Mac OS X, launchd is used to start the VirtualBox autostart service. An
3564 example configuration file can be found in
3565 <computeroutput>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</computeroutput>.
3566 To enable the service copy the file to <computeroutput>/Library/LaunchDaemons</computeroutput> and change the
3567 <computeroutput>Disabled</computeroutput> key from
3568 <computeroutput>true</computeroutput> to
3569 <computeroutput>false</computeroutput>. Furthermore replace the second parameter
3570 to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />).
3571 To manually start the service use the following command:
3572 <screen>launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
3573 For additional information on how launchd services could be
3574 configured see <literal><ulink
3575 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></literal>.</para>
3576 </sect2>
3577 </sect1>
3578
3579 <sect1 id="vboxexpertstoragemgmt">
3580 <title>VirtualBox expert storage management</title>
3581
3582 <para>In case the snapshot model of VirtualBox is not sufficient
3583 it is possible to enable a special mode which makes it possible to
3584 reconfigure storage attachments while the VM is paused.
3585 The user has to make sure that the disk data stays consistent to the guest
3586 because unlike with hotplugging the guest is not informed about detached
3587 or newly attached media.</para>
3588
3589 <para>The expert storage management mode can be enabled per VM executing:</para>
3590
3591 <screen>VBoxManage setextradata "VM name" "VBoxInternal2/SilentReconfigureWhilePaused" 1</screen>
3592
3593 <para>Storage attachments can be reconfigured while the VM is paused afterwards using:</para>
3594 <screen>VBoxManage storageattach ...</screen>
3595 </sect1>
3596
3597 <sect1 id="hostpowertweaks">
3598 <title>Handling of host power management events</title>
3599
3600 <para>Some host power management events are handled by VirtualBox. The
3601 actual behavior depends on the platform:</para>
3602
3603 <para>
3604 <glosslist>
3605 <glossentry>
3606 <glossterm>Host Suspends</glossterm>
3607 <glossdef>
3608 <para>
3609 This event is generated when the host is about to suspend, that is,
3610 the host saves the state to some non-volatile storage and powers off.
3611 </para>
3612 <para>
3613 This event is currently only handled on Windows hosts and Mac OS X hosts.
3614 When this event is generated, VirtualBox will pause all running VMs.
3615 </para>
3616 </glossdef>
3617 </glossentry>
3618 <glossentry>
3619 <glossterm>Host Resumes</glossterm>
3620 <glossdef>
3621 <para>
3622 This event is generated when the host woke up from the suspended
3623 state.
3624 </para>
3625 <para>
3626 This event is currently only handled on Windows hosts and Mac OS X hosts.
3627 When this event is generated, VirtualBox will resume all VMs which
3628 are where paused before.
3629 </para>
3630 </glossdef>
3631 </glossentry>
3632 <glossentry>
3633 <glossterm>Battery Low</glossterm>
3634 <glossdef>
3635 <para>
3636 The battery level reached a critical level (usually less than 5
3637 percent charged).
3638 </para>
3639 <para>
3640 This event is currently only handled on Windows hosts and Mac OS X hosts.
3641 When this event is generated, VirtualBox will save the state and
3642 terminate all VMs in preperation of a potential host powerdown.
3643 </para>
3644 <para>The behavior can be configured. By executing the following command,
3645 no VM is saved:</para>
3646 <screen>VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
3647 <para>This is a global setting as well as a per-VM setting. The per-VM
3648 value has higher precedence than the global value. The following command
3649 will save the state of all VMs but will not save the state of VM "foo":</para>
3650 <screen>VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 1
3651VBoxManage setextradata "foo" "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
3652 <para>The first line is actually not required as by default the savestate
3653 action is performed.</para>
3654 </glossdef>
3655 </glossentry>
3656 </glosslist>
3657 </para>
3658
3659 </sect1>
3660
3661 <sect1 id="sse412passthrough">
3662 <title>Experimental support for passing through SSE4.1 / SSE4.2 instructions</title>
3663 <para>
3664 To provide SSE 4.1 / SSE 4.2 support to guests, the host CPU has to
3665 implement these instruction sets. Starting with VirtualBox 4.3.8 it is
3666 possible to enable these instructions for certain guests using the
3667 following commands:</para><screen>VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.1 1
3668VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.2 1</screen>
3669 <para>
3670 These are a per-VM settings and they are turned off by default.
3671 </para>
3672 </sect1>
3673
3674 <sect1 id="hidledssync">
3675 <title>Support for keyboard indicators synchronization</title>
3676
3677 <para>
3678 This feature makes the host keyboard lights match those of the virtual machine's virtual
3679 keyboard when the machine window is selected. It is currently implemented for Mac OS X and
3680 Windows hosts and available as of releases 4.2.24 and 4.3.8. The feature can be enabled using
3681 the following command:
3682 </para>
3683
3684 <screen>VBoxManage setextradata "VM name" GUI/HidLedsSync "1"</screen>
3685
3686 <para>
3687 In order to disable it, use the same command but change "1" to "0", or use the VBoxManage
3688 command to remove the extra data. This is a per-VM setting and it is disabled by default.
3689 </para>
3690
3691 </sect1>
3692
3693 <sect1 id="usbtrafficcapturing">
3694 <title>Capturing USB traffic for selected devices</title>
3695
3696 <para>
3697 Starting with VirtualBox 5.0 it is possible to capture USB traffic for
3698 single USB devices or on the root hub level which captures the traffic of
3699 all USB devices attached to the root hub. VirtualBox stores the traffic
3700 in a format which is compatible with Wireshark. To capture the traffic
3701 of a specific USB device it must be attached to the VM with VBoxManage
3702 using the following command:
3703 </para>
3704
3705 <screen>VBoxManage controlvm "VM name" usbattach "device uuid|address" --capturefile "filename"</screen>
3706
3707 <para>
3708 In order to enable capturing on the root hub use the following command
3709 while the VM is not running:
3710 </para>
3711
3712 <screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/usb-ehci/0/LUN#0/Config/CaptureFilename "filename"</screen>
3713
3714 <para>The command above enables capturing on the root hub attached to the EHCI controller.
3715 To enable it for the OHCI or XHCI controller replace <computeroutput>usb-ehci</computeroutput>
3716 with <computeroutput>usb-ohci</computeroutput> or <computeroutput>usb-xhci</computeroutput> respectively.</para>
3717
3718 </sect1>
3719
3720 <sect1 id="heartbeatservice">
3721 <title>Configuring the heartbeat service</title>
3722 <para>
3723 VirtualBox ships a simple heartbeat service. Once the Guest Additions are
3724 active, the guest sends frequent heartbeat pings to the host. If the guest
3725 stops sending the heartbeat pings without properly termination the service,
3726 the VM process will log this event in the VBox.log file. In the future it
3727 might be possible to configure dedicated actions but for there is only a
3728 warning in the log file.</para>
3729
3730 <para>
3731 There are two parameters to configure. The <emphasis>heartbeat interval</emphasis>
3732 defines the time between two heartbeat pings. The default value is 2 seconds, that
3733 is, the heartbeat service of the VirtualBox Guest Additions will send a heartbeat
3734 ping every two seconds. The value in nanoseconds can be configured like this:
3735 </para>
3736 <screen>VBoxManage controlvm "VM name" VBoxInternal/Devices/VMMDev/0/Config/HeartbeatInterval 2000000000</screen>
3737 <para>
3738 The <emphasis>heartbeat timeout</emphasis> defines the time the host waits
3739 starting from the last heartbeat ping before it defines the guest as unresponsive.
3740 The default value is 2 times the heartbeat interval (4 seconds) and can be configured
3741 as following (in nanoseconds):
3742 </para>
3743
3744 <screen>VBoxManage controlvm "VM name" VBoxInternal/Devices/VMMDev/0/Config/HeartbeatTimeout 4000000000</screen>
3745
3746 <para>
3747 If the heartbeat timeout expires, there will be a log message like
3748 <emphasis>VMMDev: HeartBeatCheckTimer: Guest seems to be unresponsive. Last heartbeat
3749 received 5 seconds ago.</emphasis>
3750 If another heartbeat ping arrives after this warning, there will be a log
3751 message like
3752 <emphasis>VMMDev: GuestHeartBeat: Guest is alive.</emphasis>
3753 </para>
3754
3755 </sect1>
3756
3757 <sect1 id="diskencryption">
3758 <title>Encryption of disk images</title>
3759
3760 <para>
3761 Starting with VirtualBox 5.0, it is possible to encrypt the data stored in
3762 hard disk images transparently for the guest. It does not depend on a specific
3763 image format to be used. Images which have the data encrypted are not portable
3764 between VirtualBox and other virtualization software.
3765 </para>
3766
3767 <para>
3768 VirtualBox uses the AES algorithm in XTS mode and supports 128 or 256 bit
3769 data encryption keys (DEK).
3770 The DEK is stored encrypted in the medium properties and is decrypted during
3771 VM startup by entering a password which was chosen when the image was encrypted.
3772 </para>
3773
3774 <para>
3775 Since the DEK is stored as part of the VM configuration file, it is
3776 important that it is kept safe. Losing the DEK means that the data stored
3777 in the disk images is lost irrecoverably. Having complete and up to
3778 date backups of all data related to the VM is the responsibility of the
3779 user.
3780 </para>
3781
3782 <sect2 id="diskencryption-limitations">
3783 <title>Limitations</title>
3784
3785 <para>
3786 There are some limitations the user needs to be aware of when using this
3787 feature:
3788 </para>
3789
3790 <itemizedlist>
3791
3792 <listitem>
3793 <para>This feature is part of the Oracle VM VirtualBox Extension
3794 Pack, which needs to be installed. Otherwise disk encryption
3795 is unavailable.</para>
3796 </listitem>
3797
3798 <listitem>
3799 <para>Since encryption works only on the stored user data,
3800 it is currently not possible to check for metadata integrity of the disk image.
3801 Attackers might destroy data by removing or changing blocks of data
3802 in the image or change metadata items such as the disk size.
3803 </para>
3804 </listitem>
3805
3806 <listitem>
3807 <para>Exporting appliances which contain encrypted disk images is not
3808 possible because the OVF specification doesn't support this.
3809 All images are therefore decrypted during export.</para>
3810 </listitem>
3811
3812 <listitem>
3813 <para>The DEK is kept in memory while the VM is running to be able to
3814 decrypt data read and encrypt data written by the guest. While this should
3815 be obvious the user needs to be aware of this because an attacker might be able
3816 to extract the key on a compromised host and decrypt the data.</para>
3817 </listitem>
3818
3819 <listitem>
3820 <para>When encrypting or decrypting the images, the password is
3821 passed in clear text via the VirtualBox API. This needs to be kept
3822 in mind, especially when using third party API clients which make
3823 use of the webservice where the password might be transmitted
3824 over the network. The use of HTTPS is mandatory in such a case.
3825 </para>
3826 </listitem>
3827
3828 <listitem>
3829 <para>Encrypting images with differencing images is only possible if
3830 there are no snapshots or a linear chain of snapshots. This
3831 limitation may be addressed in a future VirtualBox version.</para>
3832 </listitem>
3833
3834 </itemizedlist>
3835
3836 </sect2>
3837
3838 <sect2 id="diskencryption-encryption">
3839 <title>Encrypting disk images</title>
3840
3841 <para>
3842 Encrypting disk images can be done either using the GUI or VBoxManage.
3843 While the GUI is easier to use, it works on a per VM basis and encrypts
3844 all disk images attached to the specific VM.
3845 With VBoxManage one can encrypt individual images (including all differencing
3846 images). To encrypt an unencrypted medium with VBoxManage, use:
3847 </para>
3848
3849 <screen>VBoxManage encryptmedium "uuid|filename" --newpassword "file|-" --cipher "cipher id" --newpasswordid "id"</screen>
3850
3851 <para>
3852 To supply the encryption password point VBoxManage to the file where the
3853 password is stored or specify <computeroutput>-</computeroutput> to let VBoxManage
3854 ask you for the password on the command line.
3855 </para>
3856 <para>
3857 The cipher parameter specifies the cipher to use for encryption and can be either
3858 <computeroutput>AES-XTS128-PLAIN64</computeroutput> or <computeroutput>AES-XTS256-PLAIN64</computeroutput>.
3859 The specified password identifier can be freely chosen by the user and is
3860 used for correct identification when supplying multiple passwords during
3861 VM startup.
3862 </para>
3863 <para>
3864 If the user uses the same password when encrypting multiple images and also the
3865 same password identifier, the user needs to supply the password only once during
3866 VM startup.
3867 </para>
3868 </sect2>
3869
3870 <sect2 id="diskencryption-startvm">
3871 <title>Starting a VM with encrypted images</title>
3872
3873 <para>
3874 When a VM is started using the GUI, a dialog will open where the user
3875 needs to enter all passwords for all encrypted images attached to the VM.
3876 If another frontend like VBoxHeadless is used, the VM will be paused as soon
3877 as the guest tries to access an encrypted disk.
3878 The user needs to provide the passwords through VBoxManage using the following
3879 command:
3880 </para>
3881
3882 <screen>VBoxManage controlvm "uuid|vmname" addencpassword "id" "password" [--removeonsuspend "yes|no"]</screen>
3883
3884 <para>
3885 The <computeroutput>id</computeroutput> parameter must be the same as the password identifier
3886 supplied when encrypting the images. <computeroutput>password</computeroutput> is the password
3887 used when encrypting the images. The user can optionally specify
3888 <computeroutput>--removeonsuspend "yes|no"</computeroutput> to specify whether
3889 to remove the password from VM memory when the VM is suspended. Before the VM can be
3890 resumed, the user needs to supply the passwords again. This is useful when
3891 a VM is suspended by a host suspend event and the user doesn't want
3892 the password to remain in memory.
3893 </para>
3894 </sect2>
3895
3896 <sect2 id="diskencryption-decryption">
3897 <title>Decrypting encrypted images</title>
3898
3899 <para>
3900 In some circumstances it might be required to decrypt previously encrypted
3901 images. This can be done in the GUI for a complete VM or using VBoxManage
3902 with the following command:
3903 </para>
3904
3905 <screen>VBoxManage encryptmedium "uuid|filename" --oldpassword "file|-"</screen>
3906
3907 <para>
3908 The only required parameter is the password the image was encrypted with.
3909 The options are the same as for encrypting images.
3910 </para>
3911 </sect2>
3912 </sect1>
3913
3914 <sect1 id="gimdebug">
3915 <title>Paravirtualization debug options</title>
3916
3917 <note>
3918 <para>These debug options significantly alter guest operating system behaviour
3919 and should only be used by expert users for debugging and diagnostics.</para>
3920 </note>
3921
3922 <para>The paravirtualization debug options are specified as a string of key-value
3923 pairs. An empty string is equivalent to disabling all debug options.</para>
3924
3925 <sect2 id="gimdebughyperv">
3926 <title>Hyper-V debug options</title>
3927
3928 <para>All of the options listed below are optional, and thus the default value
3929 specified will be used when the corresponding key-value pair is not
3930 specified.</para>
3931
3932 <itemizedlist>
3933 <listitem>
3934 <para>Key: <emphasis role="bold"><computeroutput>enabled</computeroutput></emphasis></para>
3935 <para>Value: <computeroutput>0</computeroutput> or <computeroutput>1</computeroutput></para>
3936 <para>Default: <computeroutput>0</computeroutput></para>
3937 <para>Specify <computeroutput>1</computeroutput> to enable the Hyper-V debug
3938 interface. If this key-value pair is not specified or the value is not
3939 <computeroutput>1</computeroutput>, the Hyper-V debug interface is disabled
3940 regardless of other key-value pairs being present.</para>
3941 </listitem>
3942 <listitem>
3943 <para>Key: <emphasis role="bold"><computeroutput>address</computeroutput></emphasis></para>
3944 <para>Value: IPv4 address</para>
3945 <para>Default: 127.0.0.1</para>
3946 <para>Specify the IPv4 address where the remote debugger is connected.</para>
3947 </listitem>
3948 <listitem>
3949 <para>Key: <emphasis role="bold"><computeroutput>port</computeroutput></emphasis></para>
3950 <para>Value: UDP port number</para>
3951 <para>Default: 50000</para>
3952 <para>Specify the UDP port number where the remote debugger is connected.</para>
3953 </listitem>
3954 <listitem>
3955 <para>Key: <emphasis role="bold"><computeroutput>vendorid</computeroutput></emphasis></para>
3956 <para>Value: Hyper-V vendor signature reported via CPUID to the guest</para>
3957 <para>Default: When debugging is enabled: <computeroutput>Microsoft Hv</computeroutput>,
3958 otherwise: <computeroutput>VBoxVBoxVBox</computeroutput></para>
3959 <para>Specify the Hyper-V vendor signature which is exposed to the guest via CPUID.
3960 For debugging Microsoft Windows guests, it is required the hypervisor reports
3961 the Microsoft vendor.</para>
3962 </listitem>
3963 <listitem>
3964 <para>Key: <emphasis role="bold"><computeroutput>hypercallinterface</computeroutput>
3965 </emphasis></para>
3966 <para>Value: <computeroutput>0</computeroutput> or <computeroutput>1</computeroutput></para>
3967 <para>Default: <computeroutput>0</computeroutput></para>
3968 <para>Specify whether hypercalls should be suggested for initiating debug data
3969 transfers between host and guest rather than MSRs when requested by the guest.</para>
3970 </listitem>
3971 <listitem>
3972 <para>Key: <emphasis role="bold"><computeroutput>vsinterface</computeroutput>
3973 </emphasis></para>
3974 <para>Value: <computeroutput>0</computeroutput> or <computeroutput>1</computeroutput></para>
3975 <para>Default: When debugging is enabled, <computeroutput>1</computeroutput>,
3976 otherwise <computeroutput>0</computeroutput></para>
3977 <para>Specify whether to expose the "VS#1" (virtualization service interface) to the
3978 guest. This interface is required for debugging Microsoft Windows 10 32-bit guests, but
3979 is optional for other Windows versions.</para>
3980 </listitem>
3981 </itemizedlist>
3982
3983 <sect3 id="gimdebughyperv-windows-setup">
3984 <title>Setting up Windows guests for debugging with the Hyper-V paravirtualization provider</title>
3985
3986 <para>Windows supports debugging over a serial cable, USB, IEEE 1394 Firewire, and Ethernet
3987 (only Windows 8 and later). USB and IEEE 1394 are not applicable for virtual machines, and
3988 Ethernet requires Windows 8 or later. While serial connection is universally usable, it is
3989 slow.</para>
3990
3991 <para>Debugging using the Hyper-V debug transport, supported on Windows 7 and later,
3992 offers significant benefits. It provides excellent performance due to direct host-to-guest
3993 transfers, it is easy to set up and requires minimal support from the hypervisor. It can be
3994 used with the debugger running on the same host as the VM or with the debugger and VM on
3995 separate machines connected over a network.</para>
3996
3997 <sect4><title>Prerequisites</title>
3998 <itemizedlist>
3999 <listitem>
4000 <para>A VM configured for Hyper-V paravirtualization running a Windows 7 or newer
4001 Windows guest. You may check the effective paravirtualization provider for your VM from
4002 the output of the following VBoxManage command:</para>
4003 <para><screen>VBoxManage showvminfo "VM name"</screen></para>
4004 </listitem>
4005
4006 <listitem>
4007 <para>A sufficiently up-to-date version of the Microsoft WinDbg debugger required
4008 to debug the version of Windows in your VM.</para>
4009 </listitem>
4010
4011 <listitem>
4012 <para>While Windows 8 and newer Windows guests ship with Hyper-V debug support,
4013 Windows 7 does not. To enable Hyper-V debugging on a Windows 7 guest, copy the file
4014 <computeroutput>kdvm.dll</computeroutput> from a Windows 8.0 installation<footnote>
4015 <para>Only Windows 8.0 ships <computeroutput>kdvm.dll</computeroutput>. Windows 8.1
4016 and newer Windows guests do not.</para></footnote>. This file is
4017 typically located in <computeroutput>C:\Windows\System32</computeroutput>. Copy it
4018 to the same location in your Windows 7 guest. Make sure you copy the 32-bit or
4019 or 64-bit version of the DLL which matches your Windows 7 guest.</para>
4020 </listitem>
4021 </itemizedlist>
4022 </sect4>
4023
4024 <sect4><title>VM and guest configuration</title>
4025 <orderedlist>
4026 <listitem>
4027 <para>Power off the VM.</para>
4028 </listitem>
4029
4030 <listitem>
4031 <para>Enable the debug options by executing the following VBoxManage command:</para>
4032 <para><screen>VBoxManage modifyvm "VM name" --paravirtdebug "enabled=1"</screen></para>
4033 <para>The above command assumes your debugger will connect to your host machine
4034 on UDP port 50000. However, if you need to run the debugger on a remote machine
4035 you may specify the remote address and port here, e.g. using:</para>
4036 <para>
4037 <screen>VBoxManage modifyvm "VM name" --paravirtdebug "enabled=1,address=192.168.32.1,port=55000"</screen>
4038 </para>
4039 </listitem>
4040
4041 <listitem>
4042 <para>Start the VM.</para>
4043 </listitem>
4044
4045 <listitem>
4046 <para>Once the guest has booted, start a command prompt as Administrator
4047 and execute the following commands:</para>
4048 <itemizedlist>
4049 <listitem><para>For a Windows 8 or newer Windows guest:</para>
4050 <para>
4051 <screen>bcdedit /dbgsettings net hostip:5.5.5.5 port:50000 key:1.2.3.4</screen>
4052 </para>
4053 </listitem>
4054 <listitem><para>For a Windows 7 guest:</para>
4055 <para>
4056 <screen>bcdedit /set {default} loadoptions host_ip=5.5.5.5,host_port=50000,encryption_key=1.2.3.4</screen>
4057 <screen>bcdedit /set dbgtransport kdvm.dll</screen>
4058 </para>
4059 </listitem>
4060
4061 <para>The IP and port in the <computeroutput>bcdedit</computeroutput> command are
4062 ignored completely when using the Hyper-V debug transport. Specify any valid IP and a
4063 port greater than 49151 and less than 65536.</para>
4064
4065 <para>The encryption key in the <computeroutput>bcdedit</computeroutput> command is
4066 relevant and must be valid. The key "1.2.3.4" used in the above example is valid
4067 and may be used if security is not a concern. If you do not specify any encryption key,
4068 <computeroutput>bcdedit</computeroutput> will generate one for you and you will need to copy
4069 this key to later paste into Microsoft WinDbg on the remote end.</para>
4070
4071 <listitem>
4072 <para>Execute one or more of the following commands to enable debugging for
4073 the appropriate phase or component of your Windows guest: </para>
4074 <para>
4075 <screen>bcdedit /set debug on</screen>
4076 <screen>bcdedit /set bootdebug on</screen>
4077 <screen>bcdedit /set bootdebug {bootmgr} on</screen>
4078 </para>
4079 <para>Refer to your official Microsoft documentation for what each of the above
4080 debug option covers.</para>
4081 </listitem>
4082 </itemizedlist>
4083 </listitem>
4084
4085 <listitem>
4086 <para>Start Microsoft WinDbg on your host machine or remote host.</para>
4087
4088 <para>From the "File" menu, select "Kernel debug". Under the "NET" tab, specify the UDP port
4089 number you used in the <computeroutput>paravirtdebug</computeroutput> options. If you didn't
4090 specify any, leave it as 50000. Ensure that the UDP port not blocked by a firewall or other
4091 security software.</para>
4092
4093 <para>In the "Key" field, enter <computeroutput>1.2.3.4</computeroutput> or the encryption
4094 key from the <computeroutput>bcdedit</computeroutput> command in your Windows guest.</para>
4095
4096 <para>Now press "OK" to start listening for connections. Microsoft WinDbg typically shows
4097 a "Waiting to reconnect" message during this phase.</para>
4098
4099 </listitem>
4100
4101 <listitem>
4102 <para>Reboot your Windows guest and it should then connect as a debuggee with Microsoft
4103 WinDbg.</para>
4104 </listitem>
4105 </orderedlist>
4106 </sect4>
4107 </sect3>
4108 </sect2>
4109
4110 </sect1>
4111
4112</chapter>
Note: See TracBrowser for help on using the repository browser.

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