VirtualBox

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

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

doc/manual: typo/wording.

File size: 196.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. Additionally, 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 non-trivial 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
856 (as we cannot catch physical hardware accesses to the physical memory).</para>
857 </listitem>
858 </orderedlist></para>
859 </sect1>
860
861 <sect1>
862 <title>Webcam passthrough</title>
863
864 <sect2 id="webcam-passthrough">
865 <title>Using a host webcam in the guest</title>
866
867 <para>VirtualBox 4.3 includes an experimental feature which allows a guest to use
868 a host webcam. This complements the general USB passthrough support which was the
869 typical way of using host webcams in earlier versions. The webcam passthrough support
870 can handle non-USB video sources in theory, but this is completely untested.</para>
871
872 <note>
873 <para>The webcam passthrough module is shipped as part of the Oracle VM VirtualBox
874 extension pack, which must be installed separately. See <xref
875 linkend="intro-installing" /> for more information.</para>
876 </note>
877
878 <para>The host webcam can be attached to the VM using "Devices" menu in the VM menu bar.
879 The "Webcams" menu contains a list of available video input devices on the host.
880 Clicking on a webcam name attaches or detaches the corresponding host device.</para>
881
882 <para>The VBoxManage command line tool can be used to enable webcam passthrough.
883 Please see the host-specific sections below for additional details.
884 The following commands are available:
885 <itemizedlist>
886 <listitem><para>Get a list of host webcams (or other video input devices):
887 <screen>VBoxManage list webcams</screen>
888 The output format:
889 <screen>alias "user friendly name"
890host path or identifier</screen>
891 The alias can be used as a shortcut in other commands. Alias '.0' means
892 default video input device on the host, '.1', '.2', etc mean first, second, etc
893 video input device. The device order is host-specific.
894 </para></listitem>
895 <listitem><para>Attach a webcam to a running VM:
896 <screen>VBoxManage controlvm "VM name" webcam attach [host_path|alias [settings]]</screen>
897 This will attach a USB webcam device to the guest.</para>
898
899 <para>The <computeroutput>settings</computeroutput> parameter is a string
900 <computeroutput>Setting1=Value1;Setting2=Value2</computeroutput>, which allows to
901 configure the emulated webcam device. The following settings are supported:
902 <itemizedlist>
903 <listitem>
904 <para><computeroutput>MaxFramerate</computeroutput> The highest rate at which video frames
905 are sent to the guest. A higher frame rate requires more CPU power. Therefore sometimes
906 it is useful to set a lower limit. Default is no limit and allow the guest to use all
907 frame rates supported by the host webcam.</para>
908 </listitem>
909 <listitem>
910 <para><computeroutput>MaxPayloadTransferSize</computeroutput> How many bytes the emulated
911 webcam can send to the guest at a time. Default value is 3060 bytes, which is used by
912 some webcams. Higher values can slightly reduce CPU load, if the guest is able to use
913 larger buffers. However, a high <computeroutput>MaxPayloadTransferSize</computeroutput>
914 might be not supported by some guests.</para>
915 </listitem>
916 </itemizedlist>
917 </para></listitem>
918 <listitem><para>Detach a webcam from a running VM:
919 <screen>VBoxManage controlvm "VM name" webcam detach [host_path|alias]</screen>
920 </para></listitem>
921 <listitem><para>List webcams attached to a running VM:
922 <screen>VBoxManage controlvm "VM name" webcam list</screen>
923 The output contains path or alias which was used in 'webcam attach' command for
924 each attached webcam.
925 </para></listitem>
926 </itemizedlist>
927 </para>
928 </sect2>
929
930 <sect2>
931 <title>Windows hosts</title>
932
933 <para>When the webcam device is detached from the host, the emulated webcam device is
934 automatically detached from the guest.</para>
935 </sect2>
936
937 <sect2>
938 <title>Mac OS X hosts</title>
939
940 <para>OS X version 10.7 or newer is required.</para>
941
942 <para>When the webcam device is detached from the host, the emulated webcam device
943 remains attached to the guest and must be manually detached using the
944 <computeroutput>VBoxManage controlvm "VM name" webcam detach ...</computeroutput> command.</para>
945 </sect2>
946
947 <sect2>
948 <title>Linux and Solaris hosts</title>
949
950 <para>When the webcam is detached from the host the emulated webcam device is
951 automatically detached from the guest only if the webcam is streaming video.
952 If the emulated webcam is inactive it should be manually detached using the
953 <computeroutput>VBoxManage controlvm "VM name" webcam detach ...</computeroutput> command.</para>
954
955 <para>Aliases <computeroutput>.0</computeroutput> and <computeroutput>.1</computeroutput> are mapped
956 to <computeroutput>/dev/video0</computeroutput>, alias <computeroutput>.2</computeroutput> is mapped
957 to <computeroutput>/dev/video1</computeroutput> and so forth.</para>
958 </sect2>
959 </sect1>
960
961 <sect1>
962 <title>Advanced display configuration</title>
963
964 <sect2>
965 <title>Custom VESA resolutions</title>
966
967 <para>Apart from the standard VESA resolutions, the VirtualBox VESA BIOS
968 allows you to add up to 16 custom video modes which will be reported to
969 the guest operating system. When using Windows guests with the
970 VirtualBox Guest Additions, a custom graphics driver will be used
971 instead of the fallback VESA solution so this information does not
972 apply.</para>
973
974 <para>Additional video modes can be configured for each VM using the
975 extra data facility. The extra data key is called
976 <literal>CustomVideoMode&lt;x&gt;</literal> with <literal>x</literal>
977 being a number from 1 to 16. Please note that modes will be read from 1
978 until either the following number is not defined or 16 is reached. The
979 following example adds a video mode that corresponds to the native
980 display resolution of many notebook computers:</para>
981
982 <screen>VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</screen>
983
984 <para>The VESA mode IDs for custom video modes start at
985 <literal>0x160</literal>. In order to use the above defined custom video
986 mode, the following command line has be supplied to Linux:</para>
987
988 <screen>vga = 0x200 | 0x160
989vga = 864</screen>
990
991 <para>For guest operating systems with VirtualBox Guest Additions, a
992 custom video mode can be set using the video mode hint feature.</para>
993 </sect2>
994
995 <sect2>
996 <title>Configuring the maximum resolution of guests when using the
997 graphical frontend</title>
998
999 <para>When guest systems with the Guest Additions installed are started
1000 using the graphical frontend (the normal VirtualBox application), they
1001 will not be allowed to use screen resolutions greater than the host's
1002 screen size unless the user manually resizes them by dragging the
1003 window, switching to full screen or seamless mode or sending a video mode
1004 hint using VBoxManage. This behavior is what most users will want, but
1005 if you have different needs, it is possible to change it by issuing one
1006 of the following commands from the command line:</para>
1007
1008 <screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
1009
1010 <para>will remove all limits on guest resolutions.</para>
1011
1012 <screen>VBoxManage setextradata global GUI/MaxGuestResolution &gt;width,height&lt;</screen>
1013
1014 <para>manually specifies a maximum resolution.</para>
1015
1016 <screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
1017
1018 <para>restores the default settings. Note that these settings apply
1019 globally to all guest systems, not just to a single machine.</para>
1020 </sect2>
1021 </sect1>
1022
1023 <sect1>
1024 <title>Advanced storage configuration</title>
1025
1026 <sect2 id="rawdisk">
1027 <title>Using a raw host hard disk from a guest</title>
1028
1029 <para>Starting with version 1.4, as an alternative to using virtual disk
1030 images (as described in detail in <xref linkend="storage" />),
1031 VirtualBox can also present either entire physical hard disks or
1032 selected partitions thereof as virtual disks to virtual machines.</para>
1033
1034 <para>With VirtualBox, this type of access is called "raw hard disk
1035 access"; it allows a guest operating system to access its virtual hard
1036 disk without going through the host OS file system. The actual
1037 performance difference for image files vs. raw disk varies greatly
1038 depending on the overhead of the host file system, whether dynamically
1039 growing images are used, and on host OS caching strategies. The caching
1040 indirectly also affects other aspects such as failure behavior, i.e.
1041 whether the virtual disk contains all data written before a host OS
1042 crash. Consult your host OS documentation for details on this.</para>
1043
1044 <para><warning>
1045 <para>Raw hard disk access is for expert users only. Incorrect use
1046 or use of an outdated configuration can lead to <emphasis
1047 role="bold">total loss of data </emphasis>on the physical disk. Most
1048 importantly, <emphasis>do not</emphasis> attempt to boot the
1049 partition with the currently running host operating system in a
1050 guest. This will lead to severe data corruption.</para>
1051 </warning></para>
1052
1053 <para>Raw hard disk access -- both for entire disks and individual
1054 partitions -- is implemented as part of the VMDK image format support.
1055 As a result, you will need to create a special VMDK image file which
1056 defines where the data will be stored. After creating such a special
1057 VMDK image, you can use it like a regular virtual disk image. For
1058 example, you can use the VirtualBox Manager (<xref linkend="vdis" />)
1059 or <computeroutput>VBoxManage</computeroutput> to assign the image to a
1060 virtual machine.</para>
1061
1062 <sect3>
1063 <title>Access to entire physical hard disk</title>
1064
1065 <para>While this variant is the simplest to set up, you must be aware
1066 that this will give a guest operating system direct and full access to
1067 an <emphasis>entire physical disk</emphasis>. If your
1068 <emphasis>host</emphasis> operating system is also booted from this
1069 disk, please take special care to not access the partition from the
1070 guest at all. On the positive side, the physical disk can be
1071 repartitioned in arbitrary ways without having to recreate the image
1072 file that gives access to the raw disk.</para>
1073
1074 <para>To create an image that represents an entire physical hard disk
1075 (which will not contain any actual data, as this will all be stored on
1076 the physical disk), on a Linux host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1077 -rawdisk /dev/sda</screen>This creates the image
1078 <code>/path/to/file.vmdk</code> (must be absolute), and all data will
1079 be read and written from <code>/dev/sda</code>.</para>
1080
1081 <para>On a Windows host, instead of the above device specification,
1082 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
1083 of the above device specification use e.g. <code>/dev/disk1</code>.
1084 Note that on OS X you can only get access to an entire disk if no
1085 volume is mounted from it.</para>
1086
1087 <para>Creating the image requires read/write access for the given
1088 device. Read/write access is also later needed when using the image
1089 from a virtual machine. On some host platforms (e.g. Windows Vista
1090 and later), raw disk access may be restricted and not permitted by
1091 the host OS in some situations.</para>
1092
1093 <para>Just like with regular disk images, this does not automatically
1094 attach the newly created image to a virtual machine. This can be done
1095 with e.g. <screen>VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
1096 --port 0 --device 0 --type hdd --medium /path/to/file.vmdk</screen>When
1097 this is done the selected virtual machine will boot from the specified
1098 physical disk.</para>
1099 </sect3>
1100
1101 <sect3>
1102 <title>Access to individual physical hard disk partitions</title>
1103
1104 <para>This "raw partition support" is quite similar to the "full hard
1105 disk" access described above. However, in this case, any partitioning
1106 information will be stored inside the VMDK image, so you can e.g.
1107 install a different boot loader in the virtual hard disk without
1108 affecting the host's partitioning information. While the guest will be
1109 able to <emphasis>see</emphasis> all partitions that exist on the
1110 physical disk, access will be filtered in that reading from partitions
1111 for which no access is allowed the partitions will only yield zeroes,
1112 and all writes to them are ignored.</para>
1113
1114 <para>To create a special image for raw partition support (which will
1115 contain a small amount of data, as already mentioned), on a Linux
1116 host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1117 -rawdisk /dev/sda -partitions 1,5</screen></para>
1118
1119 <para>As you can see, the command is identical to the one for "full
1120 hard disk" access, except for the additional
1121 <computeroutput>-partitions</computeroutput> parameter. This example
1122 would create the image <code>/path/to/file.vmdk</code> (which, again,
1123 must be absolute), and partitions 1 and 5 of <code>/dev/sda</code>
1124 would be made accessible to the guest.</para>
1125
1126 <para>VirtualBox uses the same partition numbering as your Linux host.
1127 As a result, the numbers given in the above example would refer to the
1128 first primary partition and the first logical drive in the extended
1129 partition, respectively.</para>
1130
1131 <para>On a Windows host, instead of the above device specification,
1132 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
1133 of the above device specification use e.g. <code>/dev/disk1</code>.
1134 Note that on OS X you can only use partitions which are not mounted
1135 (eject the respective volume first). Partition numbers are the same on
1136 Linux, Windows and Mac OS X hosts.</para>
1137
1138 <para>The numbers for the list of partitions can be taken from the
1139 output of<screen>VBoxManage internalcommands listpartitions -rawdisk /dev/sda</screen>The
1140 output lists the partition types and sizes to give the user enough
1141 information to identify the partitions necessary for the guest.</para>
1142
1143 <para>Images which give access to individual partitions are specific
1144 to a particular host disk setup. You cannot transfer these images to
1145 another host; also, whenever the host partitioning changes, the image
1146 <emphasis>must be recreated</emphasis>.</para>
1147
1148 <para>Creating the image requires read/write access for the given
1149 device. Read/write access is also later needed when using the image
1150 from a virtual machine. If this is not feasible, there is a special
1151 variant for raw partition access (currently only available on Linux
1152 hosts) that avoids having to give the current user access to the
1153 entire disk. To set up such an image, use<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1154 -rawdisk /dev/sda -partitions 1,5 -relative</screen>When used from a
1155 virtual machine, the image will then refer not to the entire disk, but
1156 only to the individual partitions (in the example
1157 <code>/dev/sda1</code> and <code>/dev/sda5</code>). As a consequence,
1158 read/write access is only required for the affected partitions, not
1159 for the entire disk. During creation however, read-only access to the
1160 entire disk is required to obtain the partitioning information.</para>
1161
1162 <para>In some configurations it may be necessary to change the MBR
1163 code of the created image, e.g. to replace the Linux boot loader that
1164 is used on the host by another boot loader. This allows e.g. the guest
1165 to boot directly to Windows, while the host boots Linux from the
1166 "same" disk. For this purpose the
1167 <computeroutput>-mbr</computeroutput> parameter is provided. It
1168 specifies a file name from which to take the MBR code. The partition
1169 table is not modified at all, so a MBR file from a system with totally
1170 different partitioning can be used. An example of this is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1171 -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr</screen>The modified
1172 MBR will be stored inside the image, not on the host disk.</para>
1173
1174 <para>The created image can be attached to a storage controller in a
1175 VM configuration as usual.</para>
1176 </sect3>
1177 </sect2>
1178
1179 <sect2 id="changevpd">
1180 <title>Configuring the hard disk vendor product data (VPD)</title>
1181
1182 <para>VirtualBox reports vendor product data for its virtual hard disks
1183 which consist of hard disk serial number, firmware revision and model
1184 number. These can be changed using the following commands:</para>
1185
1186 <screen>VBoxManage setextradata "VM name"
1187 "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
1188VBoxManage setextradata "VM name"
1189 "VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
1190VBoxManage setextradata "VM name"
1191 "VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
1192
1193 <para>The serial number is a 20 byte alphanumeric string, the firmware
1194 revision an 8 byte alphanumeric string and the model number a 40 byte
1195 alphanumeric string. Instead of "Port0" (referring to the first port),
1196 specify the desired SATA hard disk port.</para>
1197
1198 <para>The above commands apply to virtual machines with an AHCI (SATA)
1199 controller. The commands for virtual machines with an IDE controller
1200 are:</para>
1201
1202 <screen>VBoxManage setextradata "VM name"
1203 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
1204VBoxManage setextradata "VM name"
1205 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision" "firmware"
1206VBoxManage setextradata "VM name"
1207 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber" "model"</screen>
1208
1209 <para>For hard disks it's also possible to mark the
1210 drive as having a non-rotational medium with:</para>
1211
1212 <screen>VBoxManage setextradata "VM name"
1213 "VBoxInternal/Devices/ahci/0/Config/Port0/NonRotational" "1"</screen>
1214
1215 <para>Additional three parameters are needed for CD/DVD drives to report
1216 the vendor product data:</para>
1217
1218 <screen>VBoxManage setextradata "VM name"
1219 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
1220VBoxManage setextradata "VM name"
1221 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
1222VBoxManage setextradata "VM name"
1223 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
1224
1225 <para>The vendor id is an 8 byte alphanumeric string, the product id an
1226 16 byte alphanumeric string and the revision a 4 byte alphanumeric
1227 string. Instead of "Port0" (referring to the first port), specify the
1228 desired SATA hard disk port.</para>
1229 </sect2>
1230
1231 <sect2 id="iscsi-intnet">
1232 <title>Access iSCSI targets via Internal Networking</title>
1233
1234 <para>As an experimental feature, VirtualBox allows for accessing an
1235 iSCSI target running in a virtual machine which is configured for using
1236 Internal Networking mode. Please see <xref linkend="storage-iscsi" />;
1237 <xref linkend="network_internal" />; and <xref
1238 linkend="vboxmanage-storageattach" /> for additional information.</para>
1239
1240 <para>The IP stack accessing Internal Networking must be configured in
1241 the virtual machine which accesses the iSCSI target. A free static IP
1242 and a MAC address not used by other virtual machines must be chosen. In
1243 the example below, adapt the name of the virtual machine, the MAC
1244 address, the IP configuration and the Internal Networking name
1245 ("MyIntNet") according to your needs. The following eight commands must
1246 first be issued:<screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Trusted 1
1247VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f
1248VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1
1249VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0
1250VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet
1251VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet
1252VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/TrunkType 2
1253VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1</screen></para>
1254
1255 <para>Finally the iSCSI disk must be attached with the
1256 <computeroutput>--intnet</computeroutput> option to tell the iSCSI
1257 initiator to use internal networking:<screen>VBoxManage storageattach ... --medium iscsi
1258 --server 10.0.9.30 --target iqn.2008-12.com.sun:sampletarget --intnet</screen></para>
1259
1260 <para>Compared to a "regular" iSCSI setup, IP address of the target
1261 <emphasis>must</emphasis> be specified as a numeric IP address, as there
1262 is no DNS resolver for internal networking.</para>
1263
1264 <para>The virtual machine with the iSCSI target should be started before
1265 the VM using it is powered on. If a virtual machine using an iSCSI disk
1266 is started without having the iSCSI target powered up, it can take up to
1267 200 seconds to detect this situation. The VM will fail to power
1268 up.</para>
1269 </sect2>
1270 </sect1>
1271
1272 <sect1>
1273 <title>Legacy commands for using serial ports</title>
1274
1275 <para>Starting with version 1.4, VirtualBox provided support for virtual
1276 serial ports, which, at the time, was rather complicated to set up with a
1277 sequence of <computeroutput>VBoxManage setextradata</computeroutput>
1278 statements. Since version 1.5, that way of setting up serial ports is no
1279 longer necessary and <emphasis>deprecated.</emphasis> To set up virtual
1280 serial ports, use the methods now described in <xref
1281 linkend="serialports" />.<note>
1282 <para>For backwards compatibility, the old
1283 <computeroutput>setextradata</computeroutput> statements, whose
1284 description is retained below from the old version of the manual, take
1285 <emphasis>precedence</emphasis> over the new way of configuring serial
1286 ports. As a result, if configuring serial ports the new way doesn't
1287 work, make sure the VM in question does not have old configuration
1288 data such as below still active.</para>
1289 </note></para>
1290
1291 <para>The old sequence of configuring a serial port used the following 6
1292 commands:</para>
1293
1294 <screen>VBoxManage setextradata "VM name"
1295 "VBoxInternal/Devices/serial/0/Config/IRQ" 4
1296VBoxManage setextradata "VM name"
1297 "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
1298VBoxManage setextradata "VM name"
1299 "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
1300VBoxManage setextradata "VM name"
1301 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
1302VBoxManage setextradata "VM name"
1303 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
1304VBoxManage setextradata "VM name"
1305 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1</screen>
1306
1307 <para>This sets up a serial port in the guest with the default settings
1308 for COM1 (IRQ 4, I/O address 0x3f8) and the
1309 <computeroutput>Location</computeroutput> setting assumes that this
1310 configuration is used on a Windows host, because the Windows named pipe
1311 syntax is used. Keep in mind that on Windows hosts a named pipe must
1312 always start with <computeroutput>\\.\pipe\</computeroutput>. On Linux the
1313 same configuration settings apply, except that the path name for the
1314 <computeroutput>Location</computeroutput> can be chosen more freely. Local
1315 domain sockets can be placed anywhere, provided the user running
1316 VirtualBox has the permission to create a new file in the directory. The
1317 final command above defines that VirtualBox acts as a server, i.e. it
1318 creates the named pipe itself instead of connecting to an already existing
1319 one.</para>
1320 </sect1>
1321
1322 <sect1 id="changenat">
1323 <title>Fine-tuning the VirtualBox NAT engine</title>
1324
1325 <sect2>
1326 <title>Configuring the address of a NAT network interface</title>
1327
1328 <para>In NAT mode, the guest network interface is assigned to the IPv4
1329 range <computeroutput>10.0.x.0/24</computeroutput> by default where
1330 <computeroutput>x</computeroutput> corresponds to the instance of the
1331 NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
1332 is only one NAT instance active. In that case the guest is assigned to
1333 the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
1334 set to <computeroutput>10.0.2.2</computeroutput> and the name server can
1335 be found at <computeroutput>10.0.2.3</computeroutput>.</para>
1336
1337 <para>If, for any reason, the NAT network needs to be changed, this can
1338 be achieved with the following command:</para>
1339
1340 <screen>VBoxManage modifyvm "VM name" --natnet1 "192.168/16"</screen>
1341
1342 <para>This command would reserve the network addresses from
1343 <computeroutput>192.168.0.0</computeroutput> to
1344 <computeroutput>192.168.254.254</computeroutput> for the first NAT
1345 network instance of "VM name". The guest IP would be assigned to
1346 <computeroutput>192.168.0.15</computeroutput> and the default gateway
1347 could be found at <computeroutput>192.168.0.2</computeroutput>.</para>
1348 </sect2>
1349
1350 <sect2 id="nat-adv-tftp">
1351 <title>Configuring the boot server (next server) of a NAT network
1352 interface</title>
1353
1354 <para>For network booting in NAT mode, by default VirtualBox uses a
1355 built-in TFTP server at the IP address 10.0.2.4. This default behavior
1356 should work fine for typical remote-booting scenarios. However, it is
1357 possible to change the boot server IP and the location of the boot image
1358 with the following commands: <screen>VBoxManage modifyvm "VM name" --nattftpserver1 10.0.2.2
1359VBoxManage modifyvm "VM name" --nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen></para>
1360 </sect2>
1361
1362 <sect2 id="nat-adv-settings">
1363 <title>Tuning TCP/IP buffers for NAT</title>
1364
1365 <para>The VirtualBox NAT stack performance is often determined by its
1366 interaction with the host's TCP/IP stack and the size of several buffers
1367 (<computeroutput>SO_RCVBUF</computeroutput> and
1368 <computeroutput>SO_SNDBUF</computeroutput>). For certain setups users
1369 might want to adjust the buffer size for a better performance. This can
1370 by achieved using the following commands (values are in kilobytes and
1371 can range from 8 to 1024): <screen>VBoxManage modifyvm "VM name" --natsettings1 16000,128,128,0,0</screen>
1372 This example illustrates tuning the NAT settings. The first parameter is
1373 the MTU, then the size of the socket's send buffer and the size of the
1374 socket's receive buffer, the initial size of the TCP send window, and
1375 lastly the initial size of the TCP receive window. Note that specifying
1376 zero means fallback to the default value.</para>
1377
1378 <para>Each of these buffers has a default size of 64KB and default MTU
1379 is 1500.</para>
1380 </sect2>
1381
1382 <sect2>
1383 <title>Binding NAT sockets to a specific interface</title>
1384
1385 <para>By default, VirtualBox's NAT engine will route TCP/IP packets
1386 through the default interface assigned by the host's TCP/IP stack. (The
1387 technical reason for this is that the NAT engine uses sockets for
1388 communication.) If, for some reason, you want to change this behavior,
1389 you can tell the NAT engine to bind to a particular IP address instead.
1390 Use the following command: <screen>VBoxManage modifyvm "VM name" --natbindip1 "10.45.0.2"</screen></para>
1391
1392 <para>After this, all outgoing traffic will be sent through the
1393 interface with the IP address 10.45.0.2. Please make sure that this
1394 interface is up and running prior to this assignment.</para>
1395 </sect2>
1396
1397 <sect2 id="nat-adv-dns">
1398 <title>Enabling DNS proxy in NAT mode</title>
1399
1400 <para>The NAT engine by default offers the same DNS servers to the guest
1401 that are configured on the host. In some scenarios, it can be desirable
1402 to hide the DNS server IPs from the guest, for example when this
1403 information can change on the host due to expiring DHCP leases. In this
1404 case, you can tell the NAT engine to act as DNS proxy using the
1405 following command: <screen>VBoxManage modifyvm "VM name" --natdnsproxy1 on</screen></para>
1406 </sect2>
1407
1408 <sect2 id="nat_host_resolver_proxy">
1409 <title>Using the host's resolver as a DNS proxy in NAT mode</title>
1410
1411 <para>For resolving network names, the DHCP server of the NAT engine
1412 offers a list of registered DNS servers of the host. If for some reason
1413 you need to hide this DNS server list and use the host's resolver
1414 settings, thereby forcing the VirtualBox NAT engine to intercept DNS
1415 requests and forward them to host's resolver, use the following command:
1416 <screen>VBoxManage modifyvm "VM name" --natdnshostresolver1 on</screen>
1417 Note that this setting is similar to the DNS proxy mode, however whereas
1418 the proxy mode just forwards DNS requests to the appropriate servers,
1419 the resolver mode will interpret the DNS requests and use the host's DNS
1420 API to query the information and return it to the guest.</para>
1421
1422 <sect3 id="nat_host_resolver_name_intercepting">
1423 <title>User-defined host name resolving</title>
1424 <para>In some cases it might be useful to intercept the name resolving mechanism,
1425 providing a user-defined IP address on a particular DNS request. The intercepting
1426 mechanism allows the user to map not only a single host but domains and even more
1427 complex naming conventions if required.</para>
1428 <para>
1429 The following command sets a rule for mapping a name to a specified IP:</para>
1430 <screen>VBoxManage setextradata "VM name" \
1431 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1432 &lt;uniq name of interception rule&gt;/HostIP" &lt;IPv4&gt;
1433VBoxManage setextradata "VM name" \
1434 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1435 &lt;uniq name of interception rule&gt;/HostName" &lt;name of host&gt;</screen>
1436 <para>The following command sets a rule for mapping a pattern name to a specified IP:</para>
1437 <screen>VBoxManage setextradata "VM name" \
1438 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1439 &lt;uniq name of interception rule&gt;/HostIP" &lt;IPv4&gt;
1440VBoxManage setextradata "VM name" \
1441 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1442 &lt;uniq name of interception rule&gt;/HostNamePattern" &lt;hostpattern&gt;</screen>
1443 <para>The host pattern may include <computeroutput>"|", "?" and "*"</computeroutput>.</para>
1444 <para>This example demonstrates how to instruct the host-resolver mechanism to resolve
1445 all domain and probably some mirrors of www.blocked-site.info site with IP 127.0.0.1:</para>
1446 <screen>VBoxManage setextradata "VM name" \
1447 "VBoxInternal/Devices/e1000/0/LUN#0/Config/HostResolverMappings/ \
1448 all_blocked_site/HostIP" 127.0.0.1
1449VBoxManage setextradata "VM name" \
1450 "VBoxInternal/Devices/e1000/0/LUN#0/Config/HostResolverMappings/ \
1451 all_blocked_site/HostNamePattern" "*.blocked-site.*|*.fb.org"</screen>
1452 <note><para>The host resolver mechanism should be enabled to use user-defined
1453 mapping rules (please see
1454 <xref linkend="nat_host_resolver_proxy" /> for more details).</para></note>
1455 </sect3>
1456 </sect2>
1457
1458 <sect2 id="nat-adv-alias">
1459 <title>Configuring aliasing of the NAT engine</title>
1460
1461 <para>By default, the NAT core uses aliasing and uses random ports when
1462 generating an alias for a connection. This works well for the most
1463 protocols like SSH, FTP and so on. Though some protocols might need a
1464 more transparent behavior or may depend on the real port number the
1465 packet was sent from. It is possible to change the NAT mode via the
1466 VBoxManage frontend with the following commands: <screen>VBoxManage modifyvm "VM name" --nataliasmode1 proxyonly</screen>
1467 and <screen>VBoxManage modifyvm "Linux Guest" --nataliasmode1 sameports</screen>
1468 The first example disables aliasing and switches NAT into transparent
1469 mode, the second example enforces preserving of port values. These modes
1470 can be combined if necessary.</para>
1471 </sect2>
1472 </sect1>
1473
1474 <sect1 id="changedmi">
1475 <title>Configuring the BIOS DMI information</title>
1476
1477 <para>The DMI data VirtualBox provides to guests can be changed for a
1478 specific VM. Use the following commands to configure the DMI BIOS
1479 information. In case your VM is configured to use EFI firmware you need to
1480 replace <code>pcbios</code> by <code>efi</code> in the keys.</para>
1481
1482 <glosslist>
1483 <glossentry>
1484 <glossterm>DMI BIOS information</glossterm>
1485 <glossdef>
1486 <para>(type 0)</para>
1487 <screen>VBoxManage setextradata "VM name"
1488 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
1489VBoxManage setextradata "VM name"
1490 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
1491VBoxManage setextradata "VM name"
1492 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
1493VBoxManage setextradata "VM name"
1494 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
1495VBoxManage setextradata "VM name"
1496 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
1497VBoxManage setextradata "VM name"
1498 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
1499VBoxManage setextradata "VM name"
1500 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4</screen>
1501 </glossdef>
1502 </glossentry>
1503
1504 <glossentry>
1505 <glossterm>DMI system information</glossterm>
1506 <glossdef>
1507 <para>(type 1)</para>
1508 <screen>VBoxManage setextradata "VM name"
1509 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
1510VBoxManage setextradata "VM name"
1511 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
1512VBoxManage setextradata "VM name"
1513 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
1514VBoxManage setextradata "VM name"
1515 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
1516VBoxManage setextradata "VM name"
1517 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
1518VBoxManage setextradata "VM name"
1519 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
1520VBoxManage setextradata "VM name"
1521 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"
1522 "9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
1523 </glossdef>
1524 </glossentry>
1525
1526 <glossentry>
1527 <glossterm>DMI board information</glossterm>
1528 <glossdef>
1529 <para>(type 2)</para>
1530 <screen>VBoxManage setextradata "VM name"
1531 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor" "Board Vendor"
1532VBoxManage setextradata "VM name"
1533 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct" "Board Product"
1534VBoxManage setextradata "VM name"
1535 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion" "Board Version"
1536VBoxManage setextradata "VM name"
1537 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial" "Board Serial"
1538VBoxManage setextradata "VM name"
1539 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag" "Board Tag"
1540VBoxManage setextradata "VM name"
1541 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass" "Board Location"
1542VBoxManage setextradata "VM name"
1543 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType" 10</screen>
1544 </glossdef>
1545 </glossentry>
1546
1547 <glossentry>
1548 <glossterm>DMI system enclosure or chassis</glossterm>
1549 <glossdef>
1550 <para>(type 3)</para>
1551 <screen>VBoxManage setextradata "VM name"
1552 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor" "Chassis Vendor"
1553VBoxManage setextradata "VM name"
1554 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType" 3
1555VBoxManage setextradata "VM name"
1556 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion" "Chassis Version"
1557VBoxManage setextradata "VM name"
1558 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial" "Chassis Serial"
1559VBoxManage setextradata "VM name"
1560 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag" "Chassis Tag"</screen>
1561 </glossdef>
1562 </glossentry>
1563
1564 <glossentry>
1565 <glossterm>DMI processor information</glossterm>
1566 <glossdef>
1567 <para>(type 4)</para>
1568 <screen>VBoxManage setextradata "VM name"
1569 "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer" "GenuineIntel"
1570VBoxManage setextradata "VM name"
1571 "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion" "Pentium(R) III"</screen>
1572 </glossdef>
1573 </glossentry>
1574
1575 <glossentry>
1576 <glossterm>DMI OEM strings</glossterm>
1577 <glossdef>
1578 <para>(type 11)</para>
1579 <screen>VBoxManage setextradata "VM name"
1580 "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer" "vboxVer_1.2.3"
1581VBoxManage setextradata "VM name"
1582 "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev" "vboxRev_12345"</screen>
1583 </glossdef>
1584 </glossentry>
1585 </glosslist>
1586
1587 <para>If a DMI string is not set, the default value of VirtualBox is used.
1588 To set an empty string use
1589 <computeroutput>"&lt;EMPTY&gt;"</computeroutput>.</para>
1590
1591 <para>Note that in the above list, all quoted parameters (DmiBIOSVendor,
1592 DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be strings. If
1593 such a string is a valid number, the parameter is treated as number and
1594 the VM will most probably refuse to start with an
1595 <computeroutput>VERR_CFGM_NOT_STRING</computeroutput> error. In that case,
1596 use <computeroutput>"string:&lt;value&gt;"</computeroutput>, for instance
1597 <screen>VBoxManage setextradata "VM name"
1598 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen></para>
1599
1600 <para>Changing this information can be necessary to provide the DMI
1601 information of the host to the guest to prevent Windows from asking for a
1602 new product key. On Linux hosts the DMI BIOS information can be obtained
1603 with <screen>dmidecode -t0</screen>and the DMI system information can be
1604 obtained with <screen>dmidecode -t1</screen></para>
1605 </sect1>
1606
1607 <sect1 id="changeacpicust">
1608 <title>Configuring the custom ACPI table</title>
1609
1610 <para>VirtualBox can be configured to present an custom ACPI table to
1611 the guest. Use the following command to configure this:</para>
1612
1613 <screen>VBoxManage setextradata "VM name"
1614 "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/path/to/table.bin"</screen>
1615
1616 <para>Configuring a custom ACPI table can prevent Windows
1617 Vista and Windows 7 from asking for a new product key. On Linux hosts,
1618 one of the host tables can be read from
1619 <filename>/sys/firmware/acpi/tables/</filename>.</para>
1620 </sect1>
1621
1622 <sect1>
1623 <title>Fine-tuning timers and time synchronization</title>
1624
1625 <sect2 id="changetscmode">
1626 <title>Configuring the guest time stamp counter (TSC) to reflect guest
1627 execution</title>
1628
1629 <para>By default, VirtualBox keeps all sources of time visible to the
1630 guest synchronized to a single time source, the monotonic host time.
1631 This reflects the assumptions of many guest operating systems, which
1632 expect all time sources to reflect "wall clock" time. In special
1633 circumstances it may be useful however to make the TSC (time stamp
1634 counter) in the guest reflect the time actually spent executing the
1635 guest.</para>
1636
1637 <para>This special TSC handling mode can be enabled on a per-VM basis,
1638 and for best results must be used only in combination with hardware
1639 virtualization. To enable this mode use the following command:</para>
1640
1641 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
1642
1643 <para>To revert to the default TSC handling mode use:</para>
1644
1645 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
1646
1647 <para>Note that if you use the special TSC handling mode with a guest
1648 operating system which is very strict about the consistency of time
1649 sources you may get a warning or error message about the timing
1650 inconsistency. It may also cause clocks to become unreliable with some
1651 guest operating systems depending on how they use the TSC.</para>
1652 </sect2>
1653
1654 <sect2 id="warpguest">
1655 <title>Accelerate or slow down the guest clock</title>
1656
1657 <para>For certain purposes it can be useful to accelerate or to slow
1658 down the (virtual) guest clock. This can be achieved as follows:</para>
1659
1660 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
1661
1662 <para>The above example will double the speed of the guest clock
1663 while</para>
1664
1665 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
1666
1667 <para>will halve the speed of the guest clock. Note that changing the
1668 rate of the virtual clock can confuse the guest and can even lead to
1669 abnormal guest behavior. For instance, a higher clock rate means shorter
1670 timeouts for virtual devices with the result that a slightly increased
1671 response time of a virtual device due to an increased host load can
1672 cause guest failures. Note further that any time synchronization
1673 mechanism will frequently try to resynchronize the guest clock with the
1674 reference clock (which is the host clock if the VirtualBox Guest
1675 Additions are active). Therefore any time synchronization should be
1676 disabled if the rate of the guest clock is changed as described above
1677 (see <xref linkend="changetimesync" />).</para>
1678 </sect2>
1679
1680 <sect2 id="changetimesync">
1681 <title>Tuning the Guest Additions time synchronization
1682 parameters</title>
1683
1684 <para>The VirtualBox Guest Additions ensure that the guest's system time
1685 is synchronized with the host time. There are several parameters which
1686 can be tuned. The parameters can be set for a specific VM using the
1687 following command:</para>
1688
1689 <screen>VBoxManage guestproperty set "VM name" "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
1690
1691 <para>where <computeroutput>PARAMETER</computeroutput> is one of the
1692 following:</para>
1693
1694 <glosslist>
1695 <glossentry>
1696 <glossterm><computeroutput>--timesync-interval</computeroutput></glossterm>
1697 <glossdef>
1698 <para>Specifies the interval at which to synchronize the time
1699 with the host. The default is 10000 ms (10 seconds).</para>
1700 </glossdef>
1701 </glossentry>
1702
1703 <glossentry>
1704 <glossterm><computeroutput>--timesync-min-adjust</computeroutput></glossterm>
1705 <glossdef>
1706 <para>The minimum absolute drift value measured in milliseconds
1707 to make adjustments for. The default is 1000 ms on OS/2 and 100
1708 ms elsewhere.</para>
1709 </glossdef>
1710 </glossentry>
1711 <glossentry>
1712 <glossterm><computeroutput>--timesync-latency-factor</computeroutput></glossterm>
1713 <glossdef>
1714 <para>The factor to multiply the time query latency with to
1715 calculate the dynamic minimum adjust time. The default is 8
1716 times, that means in detail: Measure the time it takes to
1717 determine the host time (the guest has to contact the VM host
1718 service which may take some time), multiply this value by 8 and
1719 do an adjustment only if the time difference between host and
1720 guest is bigger than this value. Don't do any time adjustment
1721 otherwise.</para>
1722 </glossdef>
1723 </glossentry>
1724
1725 <glossentry>
1726 <glossterm><computeroutput>--timesync-max-latency</computeroutput></glossterm>
1727 <glossdef>
1728 <para>The max host timer query latency to accept. The default is
1729 250 ms.</para>
1730 </glossdef>
1731 </glossentry>
1732
1733 <glossentry>
1734 <glossterm><computeroutput>--timesync-set-threshold</computeroutput></glossterm>
1735 <glossdef>
1736 <para>The absolute drift threshold, given as milliseconds where
1737 to start setting the time instead of trying to smoothly adjust
1738 it. The default is 20 minutes.</para>
1739 </glossdef>
1740 </glossentry>
1741
1742 <glossentry>
1743 <glossterm><computeroutput>--timesync-set-start</computeroutput></glossterm>
1744 <glossdef>
1745 <para>Set the time when starting the time sync service.</para>
1746 </glossdef>
1747 </glossentry>
1748
1749 <glossentry>
1750 <glossterm><computeroutput>--timesync-set-on-restore
1751 0|1</computeroutput></glossterm>
1752 <glossdef>
1753 <para>Set the time after the VM was restored from a saved state
1754 when passing 1 as parameter (default). Disable by passing 0. In
1755 the latter case, the time will be adjusted smoothly which can
1756 take a long time.</para>
1757 </glossdef>
1758 </glossentry>
1759 </glosslist>
1760
1761 <para>All these parameters can be specified as command line parameters
1762 to VBoxService as well.</para>
1763 </sect2>
1764
1765 <sect2 id="disabletimesync">
1766
1767 <title>Disabling the Guest Additions time synchronization</title>
1768
1769 <para>Once installed and started, the VirtualBox Guest Additions will
1770 try to synchronize the guest time with the host time. This can be
1771 prevented by forbidding the guest service from reading the host
1772 clock:</para>
1773
1774 <screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1</screen>
1775
1776 </sect2>
1777
1778 </sect1>
1779
1780 <sect1 id="vboxbowsolaris11">
1781 <title>Installing the alternate bridged networking driver on Solaris 11
1782 hosts</title>
1783
1784 <para>Starting with VirtualBox 4.1, VirtualBox ships a new network filter
1785 driver that utilizes Solaris 11's Crossbow functionality. By default, this
1786 new driver is installed for Solaris 11 hosts (builds 159 and above) that
1787 has support for it.</para>
1788
1789 <para>To force installation of the older STREAMS based network filter
1790 driver, execute as root the following command before installing the
1791 VirtualBox package:</para>
1792
1793 <screen>touch /etc/vboxinst_vboxflt</screen>
1794
1795 <para>To force installation of the Crossbow based network filter driver,
1796 execute as root the following command before installing the VirtualBox
1797 package:</para>
1798
1799 <screen>touch /etc/vboxinst_vboxbow</screen>
1800
1801 <para>To check which driver is currently being used by VirtualBox,
1802 execute:</para>
1803
1804 <screen>modinfo | grep vbox</screen>
1805
1806 <para>If the output contains "vboxbow", it indicates VirtualBox is using
1807 the Crossbow network filter driver, while the name "vboxflt" indicates
1808 usage of the older STREAMS network filter.</para>
1809 </sect1>
1810
1811 <sect1 id="vboxbowvnictemplates">
1812 <title>VirtualBox VNIC templates for VLANs on Solaris 11 hosts</title>
1813
1814 <para>VirtualBox supports VNIC (Virtual Network Interface) templates for
1815 configuring VMs over VLANs.<footnote>
1816 <para>Support for Crossbow based bridged networking was introduced
1817 with VirtualBox 4.1 and requires Solaris 11 build 159 or above.</para>
1818 </footnote> A VirtualBox VNIC template is a VNIC whose name starts with
1819 "vboxvnic_template" (case-sensitive).</para>
1820
1821 <para>On Solaris 11 hosts<footnote><para>When Crossbow based bridged
1822 networking is used.</para></footnote>, a VNIC template may be used to
1823 specify the VLAN ID to use while bridging over a network link.</para>
1824
1825 <para>Here is an example of how to use a VNIC template to configure a VM
1826 over a VLAN. Create a VirtualBox VNIC template, by executing as root:</para>
1827
1828 <screen>dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0</screen>
1829
1830 <para>This will create a temporary VNIC template over interface "nge0"
1831 with the VLAN ID 23. To create VNIC templates that are persistent across
1832 host reboots, skip the <computeroutput>-t</computeroutput> parameter in the
1833 above command. You may check the current state of links using:</para>
1834
1835 <para><screen>$ dladm show-link
1836LINK CLASS MTU STATE BRIDGE OVER
1837nge0 phys 1500 up -- --
1838nge1 phys 1500 down -- --
1839vboxvnic_template0 vnic 1500 up -- nge0
1840
1841$ dladm show-vnic
1842LINK OVER SPEED MACADDRESS MACADDRTYPE VID
1843vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23</screen></para>
1844
1845 <para>Once the VNIC template is created, any VMs that need to be on VLAN
1846 23 over the interface "nge0" can be configured to bridge using this VNIC
1847 template.</para>
1848
1849 <para>VNIC templates makes managing VMs on VLANs simpler and efficient.
1850 The VLAN details are not stored as part of every VM's configuration but
1851 rather inherited from the VNIC template while starting the VM. The VNIC
1852 template itself can be modified anytime using <computeroutput>dladm</computeroutput>.</para>
1853
1854 <para>VNIC templates can be created with additional properties such as
1855 bandwidth limits, CPU fanout etc. Refer to your Solaris network
1856 documentation on how to accomplish this. These additional properties,
1857 if any, are also applied to VMs which bridge using the VNIC template.</para>
1858 </sect1>
1859
1860 <sect1 id="addhostonlysolaris">
1861 <title>Configuring multiple host-only network interfaces on Solaris
1862 hosts</title>
1863
1864 <para>By default VirtualBox provides you with one host-only network
1865 interface. Adding more host-only network interfaces on Solaris hosts
1866 requires manual configuration. Here's how to add another host-only
1867 network interface.</para>
1868
1869 <para>Begin by stopping all running VMs. Then, unplumb the existing
1870 "vboxnet0" interface by execute the following command as root:</para>
1871
1872 <screen>ifconfig vboxnet0 unplumb</screen>
1873
1874 <para>If you have several vboxnet interfaces, you will need to unplumb
1875 all of them. Once all vboxnet interfaces are unplumbed, remove the
1876 driver by executing the following command as root:</para>
1877
1878 <screen>rem_drv vboxnet</screen>
1879
1880 <para>Edit the file <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
1881 and add a line for the new interface we want to add as shown below:</para>
1882
1883 <screen>name="vboxnet" parent="pseudo" instance=1;
1884name="vboxnet" parent="pseudo" instance=2;</screen>
1885
1886 <para>Add as many of these lines as required with each line having a
1887 unique instance number.</para>
1888
1889 <para>Next, reload the vboxnet driver by executing the following command
1890 as root:</para>
1891
1892 <screen>add_drv vboxnet</screen>
1893
1894 <para>On Solaris 11.1 and newer hosts you may want to rename the default
1895 vanity interface name. To check what name has been assigned, execute:</para>
1896
1897 <screen>dladm show-phys
1898LINK MEDIA STATE SPEED DUPLEX DEVICE
1899net0 Ethernet up 100 full e1000g0
1900net2 Ethernet up 1000 full vboxnet1
1901net1 Ethernet up 1000 full vboxnet0</screen>
1902
1903 <para>In the above example, we can rename "net2" to "vboxnet1" before
1904 proceeding to plumb the interface. This can be done by executing as root:</para>
1905
1906 <screen>dladm rename-link net2 vboxnet1</screen>
1907
1908 <para>Now plumb all the interfaces using
1909 <computeroutput>ifconfig vboxnetX plumb</computeroutput> (where 'X' would
1910 be 1 in this case). Once the interface is plumbed, it may be configured
1911 like any other network interface. Refer to the
1912 <computeroutput>ifconfig</computeroutput> documentation for further details.</para>
1913
1914 <para>To make the newly added interfaces' settings persistent across
1915 reboots, you will need to edit the files
1916 <computeroutput>/etc/inet/netmasks</computeroutput>, and if you are using NWAM
1917 <computeroutput>/etc/nwam/llp</computeroutput> and add the appropriate
1918 entries to set the netmask and static IP for each of those interfaces. The
1919 VirtualBox installer only updates these configuration files for the one
1920 "vboxnet0" interface it creates by default.</para>
1921 </sect1>
1922
1923 <sect1 id="solariscodedumper">
1924 <title>Configuring the VirtualBox CoreDumper on Solaris hosts</title>
1925
1926 <para>VirtualBox is capable of producing its own core files for extensive
1927 debugging when things go wrong. Currently this is only available on
1928 Solaris hosts.</para>
1929
1930 <para>The VirtualBox CoreDumper can be enabled using the following
1931 command:</para>
1932
1933 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen></para>
1934
1935 <para>You can specify which directory to use for core dumps with this
1936 command:</para>
1937
1938 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir &lt;path-to-directory&gt;</screen>Make
1939 sure the directory you specify is on a volume with sufficient free space
1940 and that the VirtualBox process has sufficient permissions to write files
1941 to this directory. If you skip this command and don't specify any core
1942 dump directory, the current directory of the VirtualBox executable will be
1943 used (which would most likely fail when writing cores as they are
1944 protected with root permissions). It is recommended you explicitly set a
1945 core dump directory.</para>
1946
1947 <para>You must specify when the VirtualBox CoreDumper should be triggered.
1948 This is done using the following commands:</para>
1949
1950 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
1951VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>At
1952 least one of the above two commands will have to be provided if you have
1953 enabled the VirtualBox CoreDumper.</para>
1954
1955 <para>Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
1956 sets up the VM to override the host's core dumping mechanism and in the
1957 event of any crash only the VirtualBox CoreDumper would produce the core
1958 file.</para>
1959
1960 <para>Setting <computeroutput>CoreDumpLive</computeroutput> sets up the VM
1961 to produce cores whenever the VM process receives a
1962 <computeroutput>SIGUSR2</computeroutput> signal. After producing the core
1963 file, the VM will not be terminated and will continue to run. You can thus
1964 take cores of the VM process using:</para>
1965
1966 <para><screen>kill -s SIGUSR2 &lt;VM-process-id&gt;</screen></para>
1967
1968 <para>Core files produced by the VirtualBox CoreDumper are of the form
1969 <computeroutput>core.vb.&lt;ProcessName&gt;.&lt;ProcessID&gt;</computeroutput>,
1970 for example <computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.</para>
1971 </sect1>
1972
1973 <sect1 id="vboxandsolzvmm">
1974 <title>VirtualBox and Solaris kernel zones</title>
1975
1976 <para>Solaris kernel zones on x86-based systems make use of hardware-assisted
1977 virtualization features like VirtualBox does. However, for kernel zones and
1978 VirtualBox to share this hardware resource, they need to co-operate.</para>
1979
1980 <para>By default, due to performance reasons, VirtualBox acquires the
1981 hardware-assisted virtualization resource (VT-x/AMD-V) globally on the
1982 host machine and uses it until the last VirtualBox VM that requires it is
1983 powered off. This prevents other software from using VT-x/AMD-V during the
1984 time VirtualBox has taken control of it.</para>
1985
1986 <para>VirtualBox can be instructed to relinquish use of hardware-assisted
1987 virtualization features when not executing guest code, thereby allowing
1988 kernel zones to make use of them. To do this, shutdown all VirtualBox VMs
1989 and execute the following command:</para>
1990
1991 <screen>VBoxManage setproperty hwvirtexclusive off</screen>
1992
1993 <para>This command needs to be executed only once as the setting is stored
1994 as part of the global VirtualBox settings which will continue to persist
1995 across host-reboots and VirtualBox upgrades.</para>
1996 </sect1>
1997
1998 <sect1 id="guitweaks">
1999 <title>Locking down the VirtualBox GUI</title>
2000
2001 <sect2>
2002 <title>Customizing the VM manager</title>
2003
2004 <para>There are several advanced customization settings for locking down
2005 the VirtualBox manager, that is, removing some features that the user
2006 should not see.</para>
2007
2008 <para><screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen></para>
2009
2010 <para>where <computeroutput>OPTION</computeroutput> is one of the
2011 following keywords:<glosslist>
2012 <glossentry>
2013 <glossterm><computeroutput>noSelector</computeroutput></glossterm>
2014 <glossdef>
2015 <para>Don't allow to start the VirtualBox manager. Trying to do so
2016 will show a window containing a proper error message.</para>
2017 </glossdef>
2018 </glossentry>
2019
2020 <glossentry>
2021 <glossterm><computeroutput>noMenuBar</computeroutput></glossterm>
2022 <glossdef>
2023 <para>VM windows will not contain a menu bar.</para>
2024 </glossdef>
2025 </glossentry>
2026
2027 <glossentry>
2028 <glossterm><computeroutput>noStatusBar</computeroutput></glossterm>
2029 <glossdef>
2030 <para>VM windows will not contain a status bar.</para>
2031 </glossdef>
2032 </glossentry>
2033 </glosslist></para>
2034
2035 <para>To disable any of these VM manager customizations do
2036 <screen>VBoxManage setextradata global GUI/Customizations</screen></para>
2037
2038 </sect2>
2039 <sect2>
2040
2041 <title>VM selector customization</title>
2042 <para>The following per-machine VM extradata settings can be used to change the
2043 behavior of the VM selector window in respect of certain VMs:</para>
2044 <screen>VBoxManage setextradata "VM name" SETTING true</screen>
2045 <para>where <computeroutput>SETTING</computeroutput> can be:</para>
2046 <glosslist>
2047 <glossentry>
2048 <glossterm><computeroutput>GUI/HideDetails</computeroutput></glossterm>
2049 <glossdef>
2050 <para>Don't show the VM configuration of a certain VM. The details
2051 window will remain just empty if this VM is selected.</para>
2052 </glossdef>
2053 </glossentry>
2054 <glossentry>
2055 <glossterm><computeroutput>GUI/PreventReconfiguration</computeroutput></glossterm>
2056 <glossdef>
2057 <para>Don't allow the user to open the settings dialog for a certain VM.</para>
2058 </glossdef>
2059 </glossentry>
2060 <glossentry>
2061 <glossterm><computeroutput>GUI/PreventSnapshotOperations</computeroutput></glossterm>
2062 <glossdef>
2063 <para>Prevent snapshot operations for a VM from the GUI, either at runtime or when
2064 the VM is powered off.</para>
2065 </glossdef>
2066 </glossentry>
2067 <glossentry>
2068 <glossterm><computeroutput>GUI/HideFromManager</computeroutput></glossterm>
2069 <glossdef>
2070 <para>Hide a certain VM in the VM selector window.</para>
2071 </glossdef>
2072 </glossentry>
2073 <glossentry>
2074 <glossterm><computeroutput>GUI/PreventApplicationUpdate</computeroutput></glossterm>
2075 <glossdef>
2076 <para>Disable the automatic update check and hide the corresponding menu item.</para>
2077 </glossdef>
2078 </glossentry>
2079 </glosslist>
2080 <para>Please note that these settings wouldn't prevent the user from
2081 reconfiguring the VM by <computeroutput>VBoxManage modifyvm</computeroutput>.</para>
2082
2083 </sect2>
2084
2085 <sect2>
2086 <title>Configure VM selector menu entries</title>
2087 <para>You can disable (i.e. black-list) certain entries in the global settings
2088 page of the VM selector:</para>
2089 <screen>VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages OPTION[,OPTION...]</screen>
2090 <para>where <computeroutput>OPTION</computeroutput> is one of the
2091 following keywords:</para><glosslist>
2092 <glossentry>
2093 <glossterm><computeroutput>General</computeroutput></glossterm>
2094 <glossdef>
2095 <para>Don't show the <emphasis>General</emphasis> settings pane.</para>
2096 </glossdef>
2097 </glossentry>
2098
2099 <glossentry>
2100 <glossterm><computeroutput>Input</computeroutput></glossterm>
2101 <glossdef>
2102 <para>Don't show the <emphasis>Input</emphasis> settings pane.</para>
2103 </glossdef>
2104 </glossentry>
2105
2106 <glossentry>
2107 <glossterm><computeroutput>Update</computeroutput></glossterm>
2108 <glossdef>
2109 <para>Don't show the <emphasis>Update</emphasis> settings pane.</para>
2110 </glossdef>
2111 </glossentry>
2112
2113 <glossentry>
2114 <glossterm><computeroutput>Language</computeroutput></glossterm>
2115 <glossdef>
2116 <para>Don't show the <emphasis>Language</emphasis> settings pane.</para>
2117 </glossdef>
2118 </glossentry>
2119
2120 <glossentry>
2121 <glossterm><computeroutput>Display</computeroutput></glossterm>
2122 <glossdef>
2123 <para>Don't show the <emphasis>Display</emphasis> settings pane.</para>
2124 </glossdef>
2125 </glossentry>
2126
2127 <glossentry>
2128 <glossterm><computeroutput>Network</computeroutput></glossterm>
2129 <glossdef>
2130 <para>Don't show the <emphasis>Network</emphasis> settings pane.</para>
2131 </glossdef>
2132 </glossentry>
2133
2134 <glossentry>
2135 <glossterm><computeroutput>Extensions</computeroutput></glossterm>
2136 <glossdef>
2137 <para>Don't show the <emphasis>Extensions</emphasis> settings pane.</para>
2138 </glossdef>
2139 </glossentry>
2140
2141 <glossentry>
2142 <glossterm><computeroutput>Proxy</computeroutput></glossterm>
2143 <glossdef>
2144 <para>Don't show the <emphasis>Proxy</emphasis> settings pane.</para>
2145 </glossdef>
2146 </glossentry>
2147
2148 </glosslist>
2149
2150 <para>This is a global setting. Any combination of the above is allowed.
2151 To restore the default behavior, use</para>
2152 <screen>VBoxManage setextradata global GUI/RestrictedGlobalSettingsPages</screen>
2153
2154 </sect2>
2155
2156 <sect2>
2157 <title>Configure VM window menu entries</title>
2158 <para>You can disable (i.e. black-list) certain menu actions in the VM window:</para>
2159 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus OPTION[,OPTION...]</screen>
2160
2161 <para>where <computeroutput>OPTION</computeroutput> is one of the
2162 following keywords:</para><glosslist>
2163 <glossentry>
2164 <glossterm><computeroutput>All</computeroutput></glossterm>
2165 <glossdef>
2166 <para>Don't show any menu in the VM window.</para>
2167 </glossdef>
2168 </glossentry>
2169
2170 <glossentry>
2171 <glossterm><computeroutput>Machine</computeroutput></glossterm>
2172 <glossdef>
2173 <para>Don't show the <emphasis>Machine</emphasis> menu in the VM window.</para>
2174 </glossdef>
2175 </glossentry>
2176
2177 <glossentry>
2178 <glossterm><computeroutput>View</computeroutput></glossterm>
2179 <glossdef>
2180 <para>Don't show the <emphasis>View</emphasis> menu in the VM window.</para>
2181 </glossdef>
2182 </glossentry>
2183
2184 <glossentry>
2185 <glossterm><computeroutput>Devices</computeroutput></glossterm>
2186 <glossdef>
2187 <para>Don't show the <emphasis>Devices</emphasis> menu in the VM window.</para>
2188 </glossdef>
2189 </glossentry>
2190
2191 <glossentry>
2192 <glossterm><computeroutput>Help</computeroutput></glossterm>
2193 <glossdef>
2194 <para>Don't show the <emphasis>Help</emphasis> menu in the VM window.</para>
2195 </glossdef>
2196 </glossentry>
2197
2198 <glossentry>
2199 <glossterm><computeroutput>Debug</computeroutput></glossterm>
2200 <glossdef>
2201 <para>Don't show the <emphasis>Debug</emphasis> menu in the VM window. The debug
2202 menu is only visible if the GUI was started with special command line parameters
2203 or environment variable settings.</para>
2204 </glossdef>
2205 </glossentry>
2206
2207 </glosslist>
2208
2209 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2210 the default behavior, use</para>
2211 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus</screen>
2212
2213 <para>You can also disable (i.e. blacklist) certain menu actions of certain
2214 menus. Use the following command to disable certain actions of the
2215 <emphasis>Application</emphasis> menu (only available on Mac OS X hosts):</para>
2216 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
2217
2218 <para>where <computeroutput>OPTION</computeroutput> is one of the
2219 following keywords:</para><glosslist>
2220 <glossentry>
2221 <glossterm><computeroutput>All</computeroutput></glossterm>
2222 <glossdef>
2223 <para>Don't show any menu item in this menu.</para>
2224 </glossdef>
2225 </glossentry>
2226 <glossentry>
2227 <glossterm><computeroutput>About</computeroutput></glossterm>
2228 <glossdef>
2229 <para>Don't show the <emphasis>About</emphasis> menu item in this menu.</para>
2230 </glossdef>
2231 </glossentry>
2232 </glosslist>
2233
2234 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2235 the default behavior, use</para>
2236 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeMenus</screen>
2237
2238 <para>Use the following command to disable certain actions of the <emphasis>Machine</emphasis>
2239 menu:</para>
2240
2241 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions OPTION[,OPTION...]</screen>
2242
2243 <para>where <computeroutput>OPTION</computeroutput> is one of the
2244 following keywords:</para><glosslist>
2245 <glossentry>
2246 <glossterm><computeroutput>All</computeroutput></glossterm>
2247 <glossdef>
2248 <para>Don't show any menu item in this menu.</para>
2249 </glossdef>
2250 </glossentry>
2251 <glossentry>
2252 <glossterm><computeroutput>SettingsDialog</computeroutput></glossterm>
2253 <glossdef>
2254 <para>Don't show the <emphasis>Settings</emphasis> menu item in this menu.</para>
2255 </glossdef>
2256 </glossentry>
2257 <glossentry>
2258 <glossterm><computeroutput>TakeSnapshot</computeroutput></glossterm>
2259 <glossdef>
2260 <para>Don't show the <emphasis>Take Snapshot</emphasis> menu item in this menu.</para>
2261 </glossdef>
2262 </glossentry>
2263 <glossentry>
2264 <glossterm><computeroutput>TakeScreenshot</computeroutput></glossterm>
2265 <glossdef>
2266 <para>Don't show the <emphasis>Take Screenshot</emphasis> menu item in this menu.</para>
2267 </glossdef>
2268 </glossentry>
2269 <glossentry>
2270 <glossterm><computeroutput>InformationDialog</computeroutput></glossterm>
2271 <glossdef>
2272 <para>Don't show the <emphasis>Session Information</emphasis> menu item in this menu.</para>
2273 </glossdef>
2274 </glossentry>
2275 <glossentry>
2276 <glossterm><computeroutput>MouseIntegration</computeroutput></glossterm>
2277 <glossdef>
2278 <para>Don't show the <emphasis>Disable Mouse Integration</emphasis> menu item in this menu.</para>
2279 </glossdef>
2280 </glossentry>
2281 <glossentry>
2282 <glossterm><computeroutput>TypeCAD</computeroutput></glossterm>
2283 <glossdef>
2284 <para>Don't show the <emphasis>Insert Ctrl+Alt+Del</emphasis> menu item in this menu.</para>
2285 </glossdef>
2286 </glossentry>
2287 <glossentry>
2288 <glossterm><computeroutput>TypeCABS</computeroutput></glossterm>
2289 <glossdef>
2290 <para>Don't show the <emphasis>Insert Ctrl+Alt+Backspace</emphasis> menu item in
2291 this menu (available on X11 hosts only).</para>
2292 </glossdef>
2293 </glossentry>
2294 <glossentry>
2295 <glossterm><computeroutput>Pause</computeroutput></glossterm>
2296 <glossdef>
2297 <para>Don't show the <emphasis>Pause</emphasis> menu item in this menu.</para>
2298 </glossdef>
2299 </glossentry>
2300 <glossentry>
2301 <glossterm><computeroutput>Reset</computeroutput></glossterm>
2302 <glossdef>
2303 <para>Don't show the <emphasis>Reset</emphasis> menu item in this menu.</para>
2304 </glossdef>
2305 </glossentry>
2306 <glossentry>
2307 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
2308 <glossdef>
2309 <para>Don't show the <emphasis>Save the machine state</emphasis> menu item in this menu.</para>
2310 </glossdef>
2311 </glossentry>
2312 <glossentry>
2313 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
2314 <glossdef>
2315 <para>Don't show the <emphasis>ACPI Shutdown</emphasis> menu item in this menu.</para>
2316 </glossdef>
2317 </glossentry>
2318 <glossentry>
2319 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2320 <glossdef>
2321 <para>Don't show the <emphasis>Power Off the machine</emphasis> menu item in this menu.</para>
2322 </glossdef>
2323 </glossentry>
2324 </glosslist>
2325
2326 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2327 the default behavior, use</para>
2328 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeApplicationMenuActions</screen>
2329
2330 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2331 menu:</para>
2332
2333 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeViewMenuActions OPTION[,OPTION...]</screen>
2334
2335 <para>where <computeroutput>OPTION</computeroutput> is one of the
2336 following keywords:</para><glosslist>
2337 <glossentry>
2338 <glossterm><computeroutput>All</computeroutput></glossterm>
2339 <glossdef>
2340 <para>Don't show any menu item in this menu.</para>
2341 </glossdef>
2342 </glossentry>
2343 <glossentry>
2344 <glossterm><computeroutput>Fullscreen</computeroutput></glossterm>
2345 <glossdef>
2346 <para>Don't show the <emphasis>Switch to Fullscreen</emphasis> menu item in this menu.</para>
2347 </glossdef>
2348 </glossentry>
2349 <glossentry>
2350 <glossterm><computeroutput>Seamless</computeroutput></glossterm>
2351 <glossdef>
2352 <para>Don't show the <emphasis>Switch to Seamless Mode</emphasis> menu item in this menu.</para>
2353 </glossdef>
2354 </glossentry>
2355 <glossentry>
2356 <glossterm><computeroutput>Scale</computeroutput></glossterm>
2357 <glossdef>
2358 <para>Don't show the <emphasis>Switch to Scaled Mode</emphasis> menu item in this menu.</para>
2359 </glossdef>
2360 </glossentry>
2361 <glossentry>
2362 <glossterm><computeroutput>GuestAutoresize</computeroutput></glossterm>
2363 <glossdef>
2364 <para>Don't show the <emphasis>Auto-resize Guest Display</emphasis> menu item in this menu.</para>
2365 </glossdef>
2366 </glossentry>
2367 <glossentry>
2368 <glossterm><computeroutput>AdjustWindow</computeroutput></glossterm>
2369 <glossdef>
2370 <para>Don't show the <emphasis>Adjust Window Size</emphasis> menu item in this menu.</para>
2371 </glossdef>
2372 </glossentry>
2373 <glossentry>
2374 <glossterm><computeroutput>Multiscreen</computeroutput></glossterm>
2375 <glossdef>
2376 <para>Don't show the <emphasis>Multiscreen</emphasis> menu item in this menu (only visible in full screen / seamless mode).</para>
2377 </glossdef>
2378 </glossentry>
2379 </glosslist>
2380
2381 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2382 the default behavior, use</para>
2383 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeViewMenuActions</screen>
2384
2385 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2386 menu:</para>
2387
2388 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDevicesMenuActions OPTION[,OPTION...]</screen>
2389
2390 <para>where <computeroutput>OPTION</computeroutput> is one of the
2391 following keywords to disable actions in the <emphasis>Devices</emphasis> menu:</para><glosslist>
2392 <glossentry>
2393 <glossterm><computeroutput>All</computeroutput></glossterm>
2394 <glossdef>
2395 <para>Don't show any menu item in this menu.</para>
2396 </glossdef>
2397 </glossentry>
2398 <glossentry>
2399 <glossterm><computeroutput>OpticalDevices</computeroutput></glossterm>
2400 <glossdef>
2401 <para>Don't show the <emphasis>CD/DVD Devices</emphasis> menu item in this menu.</para>
2402 </glossdef>
2403 </glossentry>
2404 <glossentry>
2405 <glossterm><computeroutput>FloppyDevices</computeroutput></glossterm>
2406 <glossdef>
2407 <para>Don't show the <emphasis>FLoppy Devices</emphasis> menu item in this menu.</para>
2408 </glossdef>
2409 </glossentry>
2410 <glossentry>
2411 <glossterm><computeroutput>USBDevices</computeroutput></glossterm>
2412 <glossdef>
2413 <para>Don't show the <emphasis>USB Devices</emphasis> menu item in this menu.</para>
2414 </glossdef>
2415 </glossentry>
2416 <glossentry>
2417 <glossterm><computeroutput>SharedClipboard</computeroutput></glossterm>
2418 <glossdef>
2419 <para>Don't show the <emphasis>Shared Clipboard</emphasis> menu item in this menu.</para>
2420 </glossdef>
2421 </glossentry>
2422 <glossentry>
2423 <glossterm><computeroutput>DragAndDrop</computeroutput></glossterm>
2424 <glossdef>
2425 <para>Don't show the <emphasis>Drag and Drop</emphasis> menu item in this menu.</para>
2426 </glossdef>
2427 </glossentry>
2428 <glossentry>
2429 <glossterm><computeroutput>NetworkSettings</computeroutput></glossterm>
2430 <glossdef>
2431 <para>Don't show the <emphasis>Network Settings...</emphasis> menu item in this menu.</para>
2432 </glossdef>
2433 </glossentry>
2434 <glossentry>
2435 <glossterm><computeroutput>SharedFoldersSettings</computeroutput></glossterm>
2436 <glossdef>
2437 <para>Don't show the <emphasis>Shared Folders Settings...</emphasis> menu item in this menu.</para>
2438 </glossdef>
2439 </glossentry>
2440 <glossentry>
2441 <glossterm><computeroutput>VRDEServer</computeroutput></glossterm>
2442 <glossdef>
2443 <para>Don't show the <emphasis>Remove Display</emphasis> menu item in this menu.</para>
2444 </glossdef>
2445 </glossentry>
2446 <glossentry>
2447 <glossterm><computeroutput>InstallGuestTools</computeroutput></glossterm>
2448 <glossdef>
2449 <para>Don't show the <emphasis>Insert Guest Additions CD imnage...</emphasis> menu item in this menu.</para>
2450 </glossdef>
2451 </glossentry>
2452 </glosslist>
2453
2454 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2455 the default behavior, use</para>
2456 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDevicesMenuActions</screen>
2457
2458 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2459 menu:</para>
2460
2461 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDebuggerMenuActions OPTION[,OPTION...]</screen>
2462
2463 <para>where <computeroutput>OPTION</computeroutput> is one of the
2464 following keywords to disable actions in the <emphasis>Debug</emphasis> menu (normally completely disabled):</para><glosslist>
2465 <glossentry>
2466 <glossterm><computeroutput>All</computeroutput></glossterm>
2467 <glossdef>
2468 <para>Don't show any menu item in this menu.</para>
2469 </glossdef>
2470 </glossentry>
2471 <glossentry>
2472 <glossterm><computeroutput>Statistics</computeroutput></glossterm>
2473 <glossdef>
2474 <para>Don't show the <emphasis>Statistics...</emphasis> menu item in this menu.</para>
2475 </glossdef>
2476 </glossentry>
2477 <glossentry>
2478 <glossterm><computeroutput>CommandLine</computeroutput></glossterm>
2479 <glossdef>
2480 <para>Don't show the <emphasis>Command Line...</emphasis> menu item in this menu.</para>
2481 </glossdef>
2482 </glossentry>
2483 <glossentry>
2484 <glossterm><computeroutput>Logging</computeroutput></glossterm>
2485 <glossdef>
2486 <para>Don't show the <emphasis>Logging...</emphasis> menu item in this menu.</para>
2487 </glossdef>
2488 </glossentry>
2489 <glossentry>
2490 <glossterm><computeroutput>LogDialog</computeroutput></glossterm>
2491 <glossdef>
2492 <para>Don't show the <emphasis>Show Log...</emphasis> menu item in this menu.</para>
2493 </glossdef>
2494 </glossentry>
2495 </glosslist>
2496
2497 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2498 the default behavior, use</para>
2499 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeDebuggerMenuActions</screen>
2500
2501 <para>Use the following command to disable certain actions of the <emphasis>View</emphasis>
2502 menu:</para>
2503
2504 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeHelpMenuActions OPTION[,OPTION...]</screen>
2505
2506 <para>where <computeroutput>OPTION</computeroutput> is one of the
2507 following keywords to disable actions in the <emphasis>Help</emphasis> menu (normally completely disabled):</para><glosslist>
2508 <glossentry>
2509 <glossterm><computeroutput>All</computeroutput></glossterm>
2510 <glossdef>
2511 <para>Don't show any menu item in this menu.</para>
2512 </glossdef>
2513 </glossentry>
2514 <glossentry>
2515 <glossterm><computeroutput>Contents</computeroutput></glossterm>
2516 <glossdef>
2517 <para>Don't show the <emphasis>Contents...</emphasis> menu item in this menu.</para>
2518 </glossdef>
2519 </glossentry>
2520 <glossentry>
2521 <glossterm><computeroutput>WebSite</computeroutput></glossterm>
2522 <glossdef>
2523 <para>Don't show the <emphasis>VirtualBox Web Site...</emphasis> menu item in this menu.</para>
2524 </glossdef>
2525 </glossentry>
2526 <glossentry>
2527 <glossterm><computeroutput>ResetWarnings</computeroutput></glossterm>
2528 <glossdef>
2529 <para>Don't show the <emphasis>Reset All Warnings</emphasis> menu item in this menu.</para>
2530 </glossdef>
2531 </glossentry>
2532 <glossentry>
2533 <glossterm><computeroutput>NetworkAccessManager</computeroutput></glossterm>
2534 <glossdef>
2535 <para>Don't show the <emphasis>Network Operations Manager</emphasis> menu item in this menu.</para>
2536 </glossdef>
2537 </glossentry>
2538 <glossentry>
2539 <glossterm><computeroutput>About</computeroutput></glossterm>
2540 <glossdef>
2541 <para>Don't show the <emphasis>About</emphasis> menu item in this menu (only on non Mac OS X hosts).</para>
2542 </glossdef>
2543 </glossentry>
2544 <glossentry>
2545 <glossterm><computeroutput>Contents</computeroutput></glossterm>
2546 <glossdef>
2547 <para>Don't show the <emphasis>Contents...</emphasis> menu item in this menu.</para>
2548 </glossdef>
2549 </glossentry>
2550 <glossentry>
2551 <glossterm><computeroutput>Contents</computeroutput></glossterm>
2552 <glossdef>
2553 <para>Don't show the <emphasis>Contents...</emphasis> menu item in this menu.</para>
2554 </glossdef>
2555 </glossentry>
2556 </glosslist>
2557
2558 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2559 the default behavior, use</para>
2560 <screen>VBoxManage setextradata "VM name" GUI/RestrictedRuntimeHelpMenuActions</screen>
2561
2562 </sect2>
2563
2564 <sect2>
2565
2566 <title>Configure VM window status bar entries</title>
2567
2568 <para>You can disable (i.e. black-list) certain status bar items:</para>
2569 <screen>VBoxManage setextradata "VM name" GUI/RestrictedStatusBarIndicators OPTION[,OPTION...]</screen>
2570
2571 <para>where <computeroutput>OPTION</computeroutput> is one of the
2572 following keywords:</para><glosslist>
2573 <glossentry>
2574 <glossterm><computeroutput>HardDisks</computeroutput></glossterm>
2575 <glossdef>
2576 <para>Don't show the hard disk icon in the VM window status bar. By default
2577 the hard disk icon is only shown if the VM configuration contains one or
2578 more hard disks.</para>
2579 </glossdef>
2580 </glossentry>
2581
2582 <glossentry>
2583 <glossterm><computeroutput>OpticalDisks</computeroutput></glossterm>
2584 <glossdef>
2585 <para>Don't show the CD icon in the VM window status bar. By default the
2586 CD icon is only shown if the VM configuration contains one or more CD
2587 drives.</para>
2588 </glossdef>
2589 </glossentry>
2590
2591 <glossentry>
2592 <glossterm><computeroutput>FloppyDisks</computeroutput></glossterm>
2593 <glossdef>
2594 <para>Don't show the floppy icon in the VM window status bar. By default the
2595 floppy icon is only shown if the VM configuration contains one or more
2596 floppy drives.</para>
2597 </glossdef>
2598 </glossentry>
2599
2600 <glossentry>
2601 <glossterm><computeroutput>Network</computeroutput></glossterm>
2602 <glossdef>
2603 <para>Don't show the network icon in the VM window status bar. By default
2604 the network icon is only shown if the VM configuration contains one or more
2605 active network adapters.</para>
2606 </glossdef>
2607 </glossentry>
2608
2609 <glossentry>
2610 <glossterm><computeroutput>USB</computeroutput></glossterm>
2611 <glossdef>
2612 <para>Don't show the USB icon in the status bar. </para>
2613 </glossdef>
2614 </glossentry>
2615
2616 <glossentry>
2617 <glossterm><computeroutput>SharedFolders</computeroutput></glossterm>
2618 <glossdef>
2619 <para>Don't show the shared folders icon in the status bar.</para>
2620 </glossdef>
2621 </glossentry>
2622
2623 <glossentry>
2624 <glossterm><computeroutput>VideoCapture</computeroutput></glossterm>
2625 <glossdef>
2626 <para>Don't show the video capture icon in the status bar.</para>
2627 </glossdef>
2628 </glossentry>
2629
2630 <glossentry>
2631 <glossterm><computeroutput>Features</computeroutput></glossterm>
2632 <glossdef>
2633 <para>Don't show the CPU features icon in the status bar.</para>
2634 </glossdef>
2635 </glossentry>
2636
2637 <glossentry>
2638 <glossterm><computeroutput>Mouse</computeroutput></glossterm>
2639 <glossdef>
2640 <para>Don't show the mouse icon in the status bar.</para>
2641 </glossdef>
2642 </glossentry>
2643
2644 <glossentry>
2645 <glossterm><computeroutput>Keyboard</computeroutput></glossterm>
2646 <glossdef>
2647 <para>Don't show the keyboard icon in the status bar.</para>
2648 </glossdef>
2649 </glossentry>
2650
2651 </glosslist>
2652
2653 <para>This is a per-VM setting. Any combination of the above is allowed. If all options
2654 are specified, no icons are displayed in the status bar of the VM window. To restore
2655 the default behavior, use</para>
2656
2657 <screen>VBoxManage setextradata "VM name" GUI/RestrictedStatusBarIndicators</screen>
2658
2659 </sect2>
2660
2661 <sect2>
2662 <title>Configure VM window visual modes</title>
2663
2664 <para>You can disable (i.e. black-list) certain VM visual modes:</para>
2665 <screen>VBoxManage setextradata "VM name" GUI/RestrictedVisualStates OPTION[,OPTION...]</screen>
2666
2667 <para>where <computeroutput>OPTION</computeroutput> is one of the
2668 following keywords:</para><glosslist>
2669 <glossentry>
2670 <glossterm><computeroutput>Fullscreen</computeroutput></glossterm>
2671 <glossdef>
2672 <para>Don't allow to switch the VM into full screen mode.</para>
2673 </glossdef>
2674 </glossentry>
2675
2676 <glossentry>
2677 <glossterm><computeroutput>Seamless</computeroutput></glossterm>
2678 <glossdef>
2679 <para>Don't allow to switch the VM into seamless mode.</para>
2680 </glossdef>
2681 </glossentry>
2682
2683 <glossentry>
2684 <glossterm><computeroutput>Scale</computeroutput></glossterm>
2685 <glossdef>
2686 <para>Don't allow to switch the VM into scale mode.</para>
2687 </glossdef>
2688 </glossentry>
2689
2690 </glosslist>
2691
2692 <para>This is a per-VM setting. Any combination of the above is allowed. To restore
2693 the default behavior, use</para>
2694
2695 <screen>VBoxManage setextradata "VM name" GUI/RestrictedVisualStates</screen>
2696
2697 </sect2>
2698
2699 <sect2>
2700 <title>Host Key customization</title>
2701
2702 <para>To disable all host key combinations, open the preferences and
2703 change the host key to <emphasis>None</emphasis>. This might be useful
2704 when using VirtualBox in a kiosk mode.</para>
2705
2706 <para>To redefine or disable certain host key actions, use the following command:</para>
2707
2708 <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=F,...."</screen>
2709
2710 <para>The following list shows the possible host key actions together with their default
2711 host key shortcut. Setting an action to <emphasis>None</emphasis> will disable
2712 that host key action.</para>
2713 <table>
2714 <title>Host Key customization</title>
2715 <tgroup cols="3">
2716 <thead>
2717 <row>
2718 <entry><emphasis role="bold">Action</emphasis></entry>
2719 <entry><emphasis role="bold">Default Key</emphasis></entry>
2720 <entry><emphasis role="bold">Action</emphasis></entry>
2721 </row>
2722 </thead>
2723 <tbody>
2724 <row>
2725 <entry><computeroutput>TakeSnapshot</computeroutput></entry>
2726 <entry>T</entry>
2727 <entry>take a snapshot</entry>
2728 </row>
2729 <row>
2730 <entry><computeroutput>TakeScreenshot</computeroutput></entry>
2731 <entry>E</entry>
2732 <entry>take a screenshot</entry>
2733 </row>
2734 <row>
2735 <entry><computeroutput>MouseIntegration</computeroutput></entry>
2736 <entry>I</entry>
2737 <entry>toggle mouse integration</entry>
2738 </row>
2739 <row>
2740 <entry><computeroutput>TypeCAD</computeroutput></entry>
2741 <entry>Del</entry>
2742 <entry>inject Ctrl+Alt+Del</entry>
2743 </row>
2744 <row>
2745 <entry><computeroutput>TypeCABS</computeroutput></entry>
2746 <entry>Backspace</entry>
2747 <entry>inject Ctrl+Alt+Backspace</entry>
2748 </row>
2749 <row>
2750 <entry><computeroutput>Pause</computeroutput></entry>
2751 <entry>P</entry>
2752 <entry>Pause the VM</entry>
2753 </row>
2754 <row>
2755 <entry><computeroutput>Reset</computeroutput></entry>
2756 <entry>R</entry>
2757 <entry>(hard) reset the guest</entry>
2758 </row>
2759 <row>
2760 <entry><computeroutput>SaveState</computeroutput></entry>
2761 <entry></entry>
2762 <entry>save the VM state and terminate the VM</entry>
2763 </row>
2764 <row>
2765 <entry><computeroutput>Shutdown</computeroutput></entry>
2766 <entry>H</entry>
2767 <entry>press the (virtual) ACPI power button</entry>
2768 </row>
2769 <row>
2770 <entry><computeroutput>PowerOff</computeroutput></entry>
2771 <entry></entry>
2772 <entry>power the VM off (without saving the state!)</entry>
2773 </row>
2774 <row>
2775 <entry><computeroutput>Close</computeroutput></entry>
2776 <entry>Q</entry>
2777 <entry>show the VM close dialog</entry>
2778 </row>
2779 <row>
2780 <entry><computeroutput>FullscreenMode</computeroutput></entry>
2781 <entry>F</entry>
2782 <entry>switch the VM into full screen</entry>
2783 </row>
2784 <row>
2785 <entry><computeroutput>SeamlessMode</computeroutput></entry>
2786 <entry>L</entry>
2787 <entry>switch the VM into seamless mode</entry>
2788 </row>
2789 <row>
2790 <entry><computeroutput>ScaleMode</computeroutput></entry>
2791 <entry>C</entry>
2792 <entry>switch the VM into scale mode</entry>
2793 </row>
2794 <row>
2795 <entry><computeroutput>GuestAutoResize</computeroutput></entry>
2796 <entry>G</entry>
2797 <entry>automatically resize the guest window</entry>
2798 </row>
2799 <row>
2800 <entry><computeroutput>WindowAdjust</computeroutput></entry>
2801 <entry>A</entry>
2802 <entry>immediately resize the guest window</entry>
2803 </row>
2804 <row>
2805 <entry><computeroutput>PopupMenu</computeroutput></entry>
2806 <entry>Home</entry>
2807 <entry>show popup menu in full screen / seaml. mode</entry>
2808 </row>
2809 <row>
2810 <entry><computeroutput>SettingsDialog</computeroutput></entry>
2811 <entry>S</entry>
2812 <entry>open the VM settings dialog</entry>
2813 </row>
2814 <row>
2815 <entry><computeroutput>InformationDialog</computeroutput></entry>
2816 <entry>N</entry>
2817 <entry>show the VM information window</entry>
2818 </row>
2819 <row>
2820 <entry><computeroutput>NetworkAdaptersDialog</computeroutput></entry>
2821 <entry></entry>
2822 <entry>show the VM network adapters dialog</entry>
2823 </row>
2824 <row>
2825 <entry><computeroutput>SharedFoldersDialog</computeroutput></entry>
2826 <entry></entry>
2827 <entry>show the VM shared folders dialog</entry>
2828 </row>
2829 <row>
2830 <entry><computeroutput>InstallGuestAdditions</computeroutput></entry>
2831 <entry>D</entry>
2832 <entry>mount the ISO containing the Guest Additions</entry>
2833 </row>
2834 </tbody>
2835 </tgroup>
2836 </table>
2837
2838 <para>To disable the full screen mode as well as the seamless mode, use the following command:
2839 <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
2840 </para>
2841
2842 </sect2>
2843
2844 <sect2>
2845 <title>Action when terminating the VM</title>
2846
2847 <para>You can disallow (i.e. black-list) certain actions when terminating a VM.
2848 To disallow specific actions, type:</para>
2849
2850 <para><screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen></para>
2851
2852 <para>where <computeroutput>OPTION</computeroutput> is one of the
2853 following keywords:</para><glosslist>
2854 <glossentry>
2855 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
2856 <glossdef>
2857 <para>Don't allow the user to save the VM state when terminating
2858 the VM.</para>
2859 </glossdef>
2860 </glossentry>
2861
2862 <glossentry>
2863 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
2864 <glossdef>
2865 <para>Don't allow the user to shutdown the VM by sending the ACPI
2866 power-off event to the guest.</para>
2867 </glossdef>
2868 </glossentry>
2869
2870 <glossentry>
2871 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2872 <glossdef>
2873 <para>Don't allow the user to power off the VM.</para>
2874 </glossdef>
2875 </glossentry>
2876
2877 <glossentry>
2878 <glossterm><computeroutput>PowerOffRestoringSnapshot</computeroutput></glossterm>
2879 <glossdef>
2880 <para>Don't allow the user to return to the last snapshot when
2881 powering off the VM.</para>
2882 </glossdef>
2883 </glossentry>
2884
2885 <glossentry>
2886 <glossterm><computeroutput>Detach</computeroutput></glossterm>
2887 <glossdef>
2888 <para>Don't allow the user to detach from the VM process if the
2889 VM was started in separate mode.</para>
2890 </glossdef>
2891 </glossentry>
2892
2893 </glosslist>
2894
2895 <para>This is a per-VM setting. Any combination of the above is allowed. If all
2896 options are specified, the VM cannot be shut down at all.</para>
2897 </sect2>
2898
2899 <sect2>
2900 <title>Default action when terminating the VM</title>
2901
2902 <para>You can define a specific action for terminating a VM. In contrast to
2903 the setting decribed in the previous section, this setting allows only
2904 one action when the user terminates the VM. No exit menu is shown.</para>
2905
2906 <para><screen>VBoxManage setextradata "VM name" GUI/DefaultCloseAction ACTION</screen></para>
2907
2908 <para>where <computeroutput>ACTION</computeroutput> is one of the
2909 following keywords:</para><glosslist>
2910 <glossentry>
2911 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
2912 <glossdef>
2913 <para>Save the VM state before terminating the VM process.</para>
2914 </glossdef>
2915 </glossentry>
2916
2917 <glossentry>
2918 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
2919 <glossdef>
2920 <para>The VM is shut down by sending the ACPI power-off event to the guest.</para>
2921 </glossdef>
2922 </glossentry>
2923
2924 <glossentry>
2925 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2926 <glossdef>
2927 <para>The VM is powered off.</para>
2928 </glossdef>
2929 </glossentry>
2930
2931 <glossentry>
2932 <glossterm><computeroutput>PowerOffRestoringSnapshot</computeroutput></glossterm>
2933 <glossdef>
2934 <para>The VM is powered off and the saved state returns to the last snapshot.</para>
2935 </glossdef>
2936 </glossentry>
2937
2938 <glossentry>
2939 <glossterm><computeroutput>Detach</computeroutput></glossterm>
2940 <glossdef>
2941 <para>Terminate the frontend but leave the VM process running.</para>
2942 </glossdef>
2943 </glossentry>
2944
2945 </glosslist>
2946
2947 <para>This is a per-VM setting. Any combination of the above is allowed. If all
2948 options are specified, the VM cannot be shut down at all.</para>
2949 </sect2>
2950
2951 <sect2>
2952 <title>Action for handling a Guru Meditation</title>
2953
2954 <para>A VM runs into a Guru Meditation if there is a problem which
2955 cannot be fixed by other means than terminating the process. The
2956 default is to show a message window which instructs the user to
2957 open a bug report.</para>
2958 <para>This behavior can be configured:</para>
2959
2960 <para><screen>VBoxManage setextradata "VM name" GUI/GuruMeditationHandler MODE</screen></para>
2961
2962 <para>where <computeroutput>MODE</computeroutput> is one of the
2963 following keywords:</para><glosslist>
2964 <glossentry>
2965 <glossterm><computeroutput>Default</computeroutput></glossterm>
2966 <glossdef>
2967 <para>A message window is shown. After the user confirmed, the
2968 VM is terminated.</para>
2969 </glossdef>
2970 </glossentry>
2971
2972 <glossentry>
2973 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2974 <glossdef>
2975 <para>The VM is immediately powered-off without showing any message
2976 window. The VM logfile will show information about what happened.</para>
2977 </glossdef>
2978 </glossentry>
2979
2980 <glossentry>
2981 <glossterm><computeroutput>Ignore</computeroutput></glossterm>
2982 <glossdef>
2983 <para>The VM is left in stuck mode. Execution is stopped but no
2984 message window is shown. The VM has to be powered off manually.</para>
2985 </glossdef>
2986 </glossentry>
2987 </glosslist>
2988
2989 <para>This is a per-VM setting.</para>
2990 </sect2>
2991
2992 <sect2>
2993 <title>Configuring automatic mouse capturing</title>
2994
2995 <para>
2996 By default, the mouse is captured if the user clicks on the guest window
2997 and the guest expects relative mouse coordinates at this time. This
2998 happens if the pointing device is configured as PS/2 mouse and the guest did
2999 not (yet) start the VirtualBox Guest Additions (for instance, the guest is
3000 booting or no Guest Additions installed at all) or if the pointing device
3001 is configured as USB tablet but the guest has no USB driver loaded yet.
3002 Once the Guest Additions become active or the USB guest driver is started,
3003 the mouse capture is automatically released.
3004 </para>
3005 <para>
3006 The default behavior is sometimes not desired. Therefore it can be configured:
3007 </para>
3008 <para><screen>VBoxManage setextradata "VM name" GUI/MouseCapturePolicy MODE</screen></para>
3009
3010 <para>where <computeroutput>MODE</computeroutput> is one of the
3011 following keywords:</para><glosslist>
3012 <glossentry>
3013 <glossterm><computeroutput>Default</computeroutput></glossterm>
3014 <glossdef>
3015 <para>The default behavior as described above.</para>
3016 </glossdef>
3017 </glossentry>
3018 <glossentry>
3019 <glossterm><computeroutput>HostComboOnly</computeroutput></glossterm>
3020 <glossdef>
3021 <para>The mouse is only captured if the Host Key is toggled.</para>
3022 </glossdef>
3023 </glossentry>
3024 <glossentry>
3025 <glossterm><computeroutput>Disabled</computeroutput></glossterm>
3026 <glossdef>
3027 <para>The mouse is never captured, also not by toggling the Host Key</para>
3028 </glossdef>
3029 </glossentry>
3030 </glosslist>
3031
3032 <para>This is a per-VM setting.</para>
3033
3034 </sect2>
3035
3036 <sect2 id="mouse-capture">
3037 <title>Configuring automatic mouse capturing</title>
3038
3039 <para>
3040 By default, the mouse is captured if the user clicks on the guest window
3041 and the guest expects relative mouse coordinates at this time. This
3042 happens if the pointing device is configured as PS/2 mouse and the guest did
3043 not (yet) start the VirtualBox Guest Additions (for instance, the guest is
3044 booting or no Guest Additions installed at all) or if the pointing device
3045 is configured as USB tablet but the guest has no USB driver loaded yet.
3046 Once the Guest Additions become active or the USB guest driver is started,
3047 the mouse capture is automatically released.
3048 </para>
3049 <para>
3050 The default behavior is sometimes not desired. Therefore it can be configured:
3051 </para>
3052 <para><screen>VBoxManage setextradata "VM name" GUI/MouseCapturePolicy MODE</screen></para>
3053
3054 <para>where <computeroutput>MODE</computeroutput> is one of the
3055 following keywords:</para><glosslist>
3056 <glossentry>
3057 <glossterm><computeroutput>Default</computeroutput></glossterm>
3058 <glossdef>
3059 <para>The default behavior as described above.</para>
3060 </glossdef>
3061 </glossentry>
3062 <glossentry>
3063 <glossterm><computeroutput>HostComboOnly</computeroutput></glossterm>
3064 <glossdef>
3065 <para>The mouse is only captured if the Host Key is toggled.</para>
3066 </glossdef>
3067 </glossentry>
3068 <glossentry>
3069 <glossterm><computeroutput>Disabled</computeroutput></glossterm>
3070 <glossdef>
3071 <para>The mouse is never captured, also not by toggling the Host Key</para>
3072 </glossdef>
3073 </glossentry>
3074 </glosslist>
3075
3076 <para>This is a per-VM setting.</para>
3077
3078 </sect2>
3079
3080 <sect2 id="legacy-fullscreen-mode">
3081 <title>Requesting legacy full-screen mode</title>
3082
3083 <para>
3084 As of version 4.3.16, VirtualBox uses special window manager facilities to switch
3085 a multi-screen machine to full-screen on a multi-monitor host system. However,
3086 not all window managers provide these facilities correctly, so VirtualBox can be
3087 told to use the old method of switching to full-screen mode instead using the command:
3088 </para>
3089 <para><screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode true</screen></para>
3090
3091 <para>
3092 You can go back to the new method using the command:
3093 </para>
3094 <para><screen>VBoxManage setextradata global GUI/Fullscreen/LegacyMode</screen></para>
3095
3096 <para>This is a global setting.</para>
3097
3098 </sect2>
3099
3100 </sect1>
3101
3102 <sect1 id="vboxwebsrv-daemon">
3103 <title>Starting the VirtualBox web service automatically</title>
3104
3105 <para>The VirtualBox web service
3106 (<computeroutput>vboxwebsrv</computeroutput>) is used for controlling
3107 VirtualBox remotely. It is documented in detail in the VirtualBox Software
3108 Development Kit (SDK); please see <xref linkend="VirtualBoxAPI" />. As the
3109 client base using this interface is growing, we added start scripts for
3110 the various operation systems we support. The following sections describe
3111 how to use them. The VirtualBox web service is never started automatically
3112 as a result of a standard installation.</para>
3113
3114 <sect2 id="vboxwebsrv-linux">
3115 <title>Linux: starting the webservice via <computeroutput>init</computeroutput></title>
3116
3117 <para>On Linux, the web service can be automatically started during
3118 host boot by adding appropriate parameters to the file
3119 <computeroutput>/etc/default/virtualbox</computeroutput>.
3120 There is one mandatory parameter, <computeroutput>VBOXWEB_USER</computeroutput>,
3121 which must be set to the user which will later start the VMs. The
3122 parameters in the table below all start with <computeroutput>VBOXWEB_</computeroutput>
3123 (<computeroutput>VBOXWEB_HOST</computeroutput>,
3124 <computeroutput>VBOXWEB_PORT</computeroutput> etc.):
3125 <table>
3126 <title>Web service configuration parameters</title>
3127 <tgroup cols="3">
3128 <thead>
3129 <row>
3130 <entry><emphasis role="bold">Parameter</emphasis></entry>
3131 <entry><emphasis role="bold">Description</emphasis></entry>
3132 <entry><emphasis role="bold">Default</emphasis></entry>
3133 </row>
3134 </thead>
3135 <tbody>
3136 <row>
3137 <entry><computeroutput>USER</computeroutput></entry>
3138 <entry>The user as which the web service runs</entry>
3139 <entry></entry>
3140 </row>
3141 <row>
3142 <entry><computeroutput>HOST</computeroutput></entry>
3143 <entry>The host to bind the web service to</entry>
3144 <entry>localhost</entry>
3145 </row>
3146 <row>
3147 <entry><computeroutput>PORT</computeroutput></entry>
3148 <entry>The port to bind the web service to</entry>
3149 <entry>18083</entry>
3150 </row>
3151 <row>
3152 <entry><computeroutput>SSL_KEYFILE</computeroutput></entry>
3153 <entry>Server key and certificate file, PEM format</entry>
3154 <entry></entry>
3155 </row>
3156 <row>
3157 <entry><computeroutput>SSL_PASSWORDFILE</computeroutput></entry>
3158 <entry>File name for password to server key</entry>
3159 <entry></entry>
3160 </row>
3161 <row>
3162 <entry><computeroutput>SSL_CACERT</computeroutput></entry>
3163 <entry>CA certificate file, PEM format</entry>
3164 <entry></entry>
3165 </row>
3166 <row>
3167 <entry><computeroutput>SSL_CAPATH</computeroutput></entry>
3168 <entry>CA certificate path</entry>
3169 <entry></entry>
3170 </row>
3171 <row>
3172 <entry><computeroutput>SSL_DHFILE</computeroutput></entry>
3173 <entry>DH file name or DH key length in bits</entry>
3174 <entry></entry>
3175 </row>
3176 <row>
3177 <entry><computeroutput>SSL_RANDFILE</computeroutput></entry>
3178 <entry>File containing seed for random number generator</entry>
3179 <entry></entry>
3180 </row>
3181 <row>
3182 <entry><computeroutput>TIMEOUT</computeroutput></entry>
3183 <entry>Session timeout in seconds; 0 disables timeouts</entry>
3184 <entry>300</entry>
3185 </row>
3186 <row>
3187 <entry><computeroutput>CHECK_INTERVAL</computeroutput></entry>
3188 <entry>Frequency of timeout checks in seconds</entry>
3189 <entry>5</entry>
3190 </row>
3191 <row>
3192 <entry><computeroutput>THREADS</computeroutput></entry>
3193 <entry>Maximum number of worker threads to run in parallel</entry>
3194 <entry>100</entry>
3195 </row>
3196 <row>
3197 <entry><computeroutput>KEEPALIVE</computeroutput></entry>
3198 <entry>Maximum number of requests before a socket will be closed</entry>
3199 <entry>100</entry>
3200 </row>
3201 <row>
3202 <entry><computeroutput>ROTATE</computeroutput></entry>
3203 <entry>Number of log files; 0 disables log rotation</entry>
3204 <entry>10</entry>
3205 </row>
3206 <row>
3207 <entry><computeroutput>LOGSIZE</computeroutput></entry>
3208 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
3209 <entry>1MB</entry>
3210 </row>
3211 <row>
3212 <entry><computeroutput>LOGINTERVAL</computeroutput></entry>
3213 <entry>Maximum time interval in seconds to trigger log rotation</entry>
3214 <entry>1 day</entry>
3215 </row>
3216 </tbody>
3217 </tgroup>
3218 </table>
3219 </para>
3220
3221 <para>Setting the parameter <computeroutput>SSL_KEYFILE</computeroutput>
3222 enables the SSL/TLS support. Using encryption is strongly encouraged, as
3223 otherwise everything (including passwords) is transferred in clear
3224 text.</para>
3225 </sect2>
3226
3227 <sect2 id="vboxwebsrv-solaris">
3228 <title>Solaris: starting the web service via SMF</title>
3229
3230 <para>On Solaris hosts, the VirtualBox web service daemon is
3231 integrated into the SMF framework. You can change the parameters, but
3232 don't have to if the defaults below already match your needs:<screen>svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
3233svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
3234svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root</screen></para>
3235
3236 <para>The table in the previous section showing the parameter names and
3237 defaults also applies to Solaris. The parameter names must be changed
3238 to lowercase and a prefix of <computeroutput>config/</computeroutput>
3239 has to be added, e.g. <computeroutput>config/user</computeroutput> or
3240 <computeroutput>config/ssl_keyfile</computeroutput>. If you made any
3241 change, don't forget to run the following command to put the changes into
3242 effect immediately:<screen>svcadm refresh svc:/application/virtualbox/webservice:default</screen></para>
3243
3244 <para>If you forget the above command then the previous settings will
3245 be used when enabling the service. Check the current property settings
3246 with:<screen>svcprop -p config svc:/application/virtualbox/webservice:default</screen></para>
3247
3248 <para>When everything is configured correctly you can start the
3249 VirtualBox web service with the following command:<screen>svcadm enable svc:/application/virtualbox/webservice:default</screen></para>
3250
3251 <para>For more information about SMF, please refer to the Solaris
3252 documentation.</para>
3253 </sect2>
3254
3255 <sect2 id="vboxwebsrv-osx">
3256 <title>Mac OS X: starting the webservice via launchd</title>
3257
3258 <para>On Mac OS X, launchd is used to start the VirtualBox webservice. An
3259 example configuration file can be found in
3260 <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
3261 It can be enabled by changing the
3262 <computeroutput>Disabled</computeroutput> key from
3263 <computeroutput>true</computeroutput> to
3264 <computeroutput>false</computeroutput>. To manually start the
3265 service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
3266 For additional information on how launchd services could be
3267 configured see <literal><ulink
3268 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>
3269 </sect2>
3270 </sect1>
3271
3272 <sect1 id="vboxwatchdog">
3273 <title>VirtualBox Watchdog</title>
3274 <para>Starting with VirtualBox 4.2 the memory ballooning service formerly
3275 known as <computeroutput>VBoxBalloonCtrl</computeroutput> was renamed to
3276 VBoxWatchdog, which now incorporates several host services that are meant
3277 to be run in a server environment.</para>
3278
3279 <para>These services are: <itemizedlist>
3280 <listitem>
3281 <para>Memory ballooning control, which automatically takes care of
3282 a VM's configured memory balloon (see <xref linkend="guestadd-balloon" />
3283 for an introduction to memory ballooning). This especially is useful
3284 for server environments where VMs may dynamically require more or
3285 less memory during runtime.</para>
3286
3287 <para>The service periodically checks a VM's current memory balloon
3288 and its free guest RAM and automatically adjusts the current memory
3289 balloon by inflating or deflating it accordingly. This handling only
3290 applies to running VMs having recent Guest Additions installed.</para>
3291 </listitem>
3292 <listitem>
3293 <para>Host isolation detection, which provides a way to detect whether
3294 the host cannot reach the specific VirtualBox server instance anymore
3295 and take appropriate actions, such as shutting down, saving the
3296 current state or even powering down certain VMs.</para>
3297 </listitem>
3298 </itemizedlist></para>
3299
3300 <para>
3301 All configuration values can be either specified via command line or global
3302 extradata, whereas command line values always have a higher priority when set.
3303 Some of the configuration values also be specified on a per-VM basis. So
3304 the overall lookup order is: command line, per-VM basis extradata (if available),
3305 global extradata.
3306 </para>
3307
3308 <sect2 id="vboxwatchdog-ballonctrl">
3309 <title>Memory ballooning control</title>
3310 <para>The memory ballooning control inflates and deflates the memory balloon
3311 of VMs based on the VMs free memory and the desired maximum balloon size.</para>
3312
3313 <para>To set up the memory ballooning control the maximum ballooning size a
3314 VM can reach needs to be set. This can be specified via command line with
3315 <screen>--balloon-max &lt;Size in MB&gt;</screen>, on a per-VM basis extradata value with
3316 <screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
3317 or using a global extradata value with
3318 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
3319 <note><para>If no maximum ballooning size is specified by at least one of
3320 the parameters above, no ballooning will be performed at all.</para></note>
3321 </para>
3322
3323 <para>Setting the ballooning increment in MB can be either done via
3324 command line with
3325 <screen>--balloon-inc &lt;Size in MB&gt;</screen> or using a global
3326 extradata value with
3327 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
3328 Default ballooning increment is 256 MB if not specified.</para>
3329
3330 <para>Same goes with the ballooning decrement: Via command line with
3331 <screen>--balloon-dec &lt;Size in MB&gt;</screen> or using a global
3332 extradata value with
3333 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
3334 Default ballooning decrement is 128 MB if not specified.</para>
3335
3336 <para>To define the lower limit in MB a balloon can be the command line with
3337 <screen>--balloon-lower-limit &lt;Size in MB&gt;</screen> can be used or using a global
3338 extradata value with
3339 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
3340 is available. Default lower limit is 128 if not specified.</para>
3341 </sect2>
3342
3343 <sect2 id="vboxwatchdog-hostisln">
3344 <title>Host isolation detection</title>
3345 <para>To detect whether a host is being isolated, that is, the host cannot
3346 reach the VirtualBox server instance anymore, the host needs to set an
3347 alternating value to a global extradata value within a time period. If
3348 this value is not set within that time period a timeout occurred and the
3349 so-called host isolation response will be performed to the VMs handled.
3350 Which VMs are handled can be controlled by defining VM groups and assigning
3351 VMs to those groups. By default no groups are set, meaning that all VMs
3352 on the server will be handled when no host response is received within
3353 30 seconds.</para>
3354
3355 <para>To set the groups handled by the host isolation detection via
3356 command line:
3357 <screen>--apimon-groups=&lt;string[,stringN]&gt;</screen> or using a global
3358 extradata value with
3359 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
3360 </para>
3361
3362 <para>To set the host isolation timeout via command line:
3363 <screen>--apimon-isln-timeout=&lt;ms&gt;</screen> or using a global
3364 extradata value with
3365 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
3366 </para>
3367
3368 <para>To set the actual host isolation response via command line:
3369 <screen>--apimon-isln-response=&lt;cmd&gt;</screen> or using a global
3370 extradata value with
3371 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
3372 The following response commands are available:
3373 <itemizedlist>
3374 <listitem>
3375 <para><computeroutput>none</computeroutput>, which does nothing.</para>
3376 </listitem>
3377 <listitem>
3378 <para><computeroutput>pause</computeroutput>, which pauses the
3379 execution of a VM.</para>
3380 </listitem>
3381 <listitem>
3382 <para><computeroutput>poweroff</computeroutput>, which shuts down
3383 the VM by pressing the virtual power button. The VM will not have
3384 the chance of saving any data or veto the shutdown process.</para>
3385 </listitem>
3386 <listitem>
3387 <para><computeroutput>save</computeroutput>, which saves the current
3388 machine state and powers off the VM afterwards. If saving the machine
3389 state fails the VM will be paused.</para>
3390 </listitem>
3391 <listitem>
3392 <para><computeroutput>shutdown</computeroutput>, which shuts down
3393 the VM in a gentle way by sending an <computeroutput>ACPI</computeroutput>
3394 shutdown event to the VM's operating system. The OS then has the
3395 chance of doing a clean shutdown.</para>
3396 </listitem>
3397 </itemizedlist>
3398 </para>
3399 </sect2>
3400
3401 <sect2 id="vboxwatchdog-moreinfo">
3402 <title>More information</title>
3403 <para>For more advanced options and parameters like verbose logging check
3404 the built-in command line help accessible with
3405 <computeroutput>--help</computeroutput>.</para>
3406 </sect2>
3407
3408 <sect2 id="vboxwatchdog-linux">
3409 <title>Linux: starting the watchdog service via <computeroutput>init</computeroutput></title>
3410
3411 <para>On Linux, the watchdog service can be automatically started during
3412 host boot by adding appropriate parameters to the file
3413 <computeroutput>/etc/default/virtualbox</computeroutput>.
3414 There is one mandatory parameter, <computeroutput>VBOXWATCHDOG_USER</computeroutput>,
3415 which must be set to the user which will later start the VMs. For backward
3416 compatibility you can also specify <computeroutput>VBOXBALLOONCTRL_USER</computeroutput>The
3417 parameters in the table below all start with <computeroutput>VBOXWATCHDOG_</computeroutput>
3418 (<computeroutput>VBOXWATCHDOG_BALLOON_INTERVAL</computeroutput>,
3419 <computeroutput>VBOXWATCHDOG_LOGSIZE</computeroutput> etc., and for
3420 previously existing parameters the
3421 <computeroutput>VBOXBALLOONCTRL_INTERVAL</computeroutput> etc. parameters
3422 can still be used):
3423 <table>
3424 <title>VirtualBox watchdog configuration parameters</title>
3425 <tgroup cols="3">
3426 <thead>
3427 <row>
3428 <entry><emphasis role="bold">Parameter</emphasis></entry>
3429 <entry><emphasis role="bold">Description</emphasis></entry>
3430 <entry><emphasis role="bold">Default</emphasis></entry>
3431 </row>
3432 </thead>
3433 <tbody>
3434 <row>
3435 <entry><computeroutput>USER</computeroutput></entry>
3436 <entry>The user as which the watchdog service runs</entry>
3437 <entry></entry>
3438 </row>
3439 <row>
3440 <entry><computeroutput>ROTATE</computeroutput></entry>
3441 <entry>Number of log files; 0 disables log rotation</entry>
3442 <entry>10</entry>
3443 </row>
3444 <row>
3445 <entry><computeroutput>LOGSIZE</computeroutput></entry>
3446 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
3447 <entry>1MB</entry>
3448 </row>
3449 <row>
3450 <entry><computeroutput>LOGINTERVAL</computeroutput></entry>
3451 <entry>Maximum time interval in seconds to trigger log rotation</entry>
3452 <entry>1 day</entry>
3453 </row>
3454 <row>
3455 <entry><computeroutput>BALLOON_INTERVAL</computeroutput></entry>
3456 <entry>Interval for checking the balloon size (msec)</entry>
3457 <entry>30000</entry>
3458 </row>
3459 <row>
3460 <entry><computeroutput>BALLOON_INCREMENT</computeroutput></entry>
3461 <entry>Balloon size increment (MByte)</entry>
3462 <entry>256</entry>
3463 </row>
3464 <row>
3465 <entry><computeroutput>BALLOON_DECREMENT</computeroutput></entry>
3466 <entry>Balloon size decrement (MByte)</entry>
3467 <entry>128</entry>
3468 </row>
3469 <row>
3470 <entry><computeroutput>BALLOON_LOWERLIMIT</computeroutput></entry>
3471 <entry>Balloon size lower limit (MByte)</entry>
3472 <entry>64</entry>
3473 </row>
3474 <row>
3475 <entry><computeroutput>BALLOON_SAFETYMARGIN</computeroutput></entry>
3476 <entry>Free memory required for decreasing the balloon size (MByte)</entry>
3477 <entry>1024</entry>
3478 </row>
3479 </tbody>
3480 </tgroup>
3481 </table>
3482 </para>
3483 </sect2>
3484
3485 <sect2 id="vboxwatchdog-solaris">
3486 <title>Solaris: starting the watchdog service via SMF</title>
3487
3488 <para>On Solaris hosts, the VirtualBox watchdog service daemon is
3489 integrated into the SMF framework. You can change the parameters, but
3490 don't have to if the defaults already match your needs:<screen>svccfg -s svc:/application/virtualbox/balloonctrl:default setprop config/balloon_interval=10000
3491svccfg -s svc:/application/virtualbox/balloonctrl:default setprop config/balloon_safetymargin=134217728</screen></para>
3492
3493 <para>The table in the previous section showing the parameter names and
3494 defaults also applies to Solaris. The parameter names must be changed
3495 to lowercase and a prefix of <computeroutput>config/</computeroutput>
3496 has to be added, e.g. <computeroutput>config/user</computeroutput> or
3497 <computeroutput>config/balloon_safetymargin</computeroutput>. If you made any
3498 change, don't forget to run the following command to put the changes into
3499 effect immediately:<screen>svcadm refresh svc:/application/virtualbox/balloonctrl:default</screen></para>
3500
3501 <para>If you forget the above command then the previous settings will
3502 be used when enabling the service. Check the current property settings
3503 with:<screen>svcprop -p config svc:/application/virtualbox/balloonctrl:default</screen></para>
3504
3505 <para>When everything is configured correctly you can start the
3506 VirtualBox watchdog service with the following command:<screen>svcadm enable svc:/application/virtualbox/balloonctrl:default</screen></para>
3507
3508 <para>For more information about SMF, please refer to the Solaris
3509 documentation.</para>
3510 </sect2>
3511
3512 </sect1>
3513
3514 <sect1 id="otherextpacks">
3515 <title>Other extension packs</title>
3516
3517 <para>Starting with VirtualBox 4.2.0 there is another extension pack,
3518 <code>VNC</code>, which is open source and replaces the previous
3519 integration of the VNC remote access protocol. This is experimental code,
3520 and will be initially available in the VirtualBox source code package only.
3521 It is to a large portion code contributed by users, and is not supported
3522 in any way by Oracle.</para>
3523
3524 <para>The keyboard handling is severely limited, and only the US keyboard
3525 layout works. Other keyboard layouts will have at least some keys which
3526 produce the wrong results (often quite surprising effects), and for layouts
3527 which have significant differences to the US keyboard layout it is most
3528 likely unusable.</para>
3529
3530 <para>It is possible to install both the Oracle VM VirtualBox Extension
3531 Pack and VNC, but only one VRDE module can be active at any time. The
3532 following command switches to the VNC VRDE module in
3533 VNC:<screen>VBoxManage setproperty vrdeextpack VNC</screen></para>
3534
3535 <para>Configuring the remote access works very similarly to VRDP (see
3536 <xref linkend="vrde" />), with some limitations: VNC does not
3537 support specifying several port numbers, and the authentication is done
3538 differently. VNC can only deal with password authentication, and there
3539 is no option to use password hashes. This leaves no other choice than
3540 having a clear-text password in the VM configuration, which can be set with
3541 the following command:<screen>VBoxManage modifyvm "VM name" --vrdeproperty VNCPassword=secret</screen></para>
3542
3543 <para>The user is responsible for keeping this password secret, and it
3544 should be removed when a VM configuration is passed to another person,
3545 for whatever purpose. Some VNC servers claim to have "encrypted" passwords
3546 in the configuration. This is not true encryption, it is only concealing
3547 the passwords, which is exactly as secure as clear-text passwords.</para>
3548
3549 <para>The following command switches back to VRDP (if
3550 installed):<screen>VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"</screen></para>
3551 </sect1>
3552
3553 <sect1 id="autostart">
3554 <title>Starting virtual machines during system boot</title>
3555
3556 <para>Starting with VirtualBox 4.2.0 it is possible to start VMs automatically during
3557 system boot on Linux, Solaris and Mac OS X for all users. </para>
3558
3559 <sect2 id="autostart-linux">
3560 <title>Linux: starting the autostart service via <computeroutput>init</computeroutput></title>
3561
3562 <para>On Linux, the autostart service is activated by setting two variables in
3563 <computeroutput>/etc/default/virtualbox</computeroutput>.
3564 The first one is <computeroutput>VBOXAUTOSTART_DB</computeroutput> which
3565 contains an absolute path to the autostart database directory.
3566 The directory should have write access for every user who should be able to
3567 start virtual machines automatically. Furthermore the directory should have the
3568 sticky bit set.
3569 The second variable is <computeroutput>VBOXAUTOSTART_CONFIG</computeroutput>
3570 which points the service to the autostart configuration file which is used
3571 during boot to determine whether to allow individual users to start a VM
3572 automatically and configure startup delays.
3573 The configuration file can be placed in <computeroutput>/etc/vbox</computeroutput>
3574 and contains several options. One is <computeroutput>default_policy</computeroutput>
3575 which controls whether the autostart service allows or denies to start a VM
3576 for users which are not in the exception list.
3577 The exception list starts with <computeroutput>exception_list</computeroutput>
3578 and contains a comma separated list with usernames. Furthermore a separate
3579 startup delay can be configured for every user to avoid overloading the host.
3580 A sample configuration is given below:</para>
3581
3582 <para><screen>
3583# Default policy is to deny starting a VM, the other option is "allow".
3584default_policy = deny
3585
3586# Bob is allowed to start virtual machines but starting them
3587# will be delayed for 10 seconds
3588bob = {
3589 allow = true
3590 startup_delay = 10
3591}
3592
3593# Alice is not allowed to start virtual machines, useful to exclude certain users
3594# if the default policy is set to allow.
3595alice = {
3596 allow = false
3597}
3598 </screen></para>
3599
3600 <para>Every user who wants to enable autostart for individual machines
3601 has to set the path to the autostart database directory with
3602 <screen>VBoxManage setproperty autostartdbpath &lt;Autostart directory&gt;</screen>
3603 </para>
3604 </sect2>
3605
3606 <sect2 id="autostart-solaris">
3607 <title>Solaris: starting the autostart service via SMF</title>
3608
3609 <para>On Solaris hosts, the VirtualBox autostart daemon is
3610 integrated into the SMF framework. To enable it you have to point the service
3611 to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />):
3612 <screen>svccfg -s svc:/application/virtualbox/autostart:default setprop config/config=/etc/vbox/autostart.cfg</screen>
3613 </para>
3614
3615 <para>When everything is configured correctly you can start the
3616 VirtualBox autostart service with the following command:<screen>svcadm enable svc:/application/virtualbox/autostart:default</screen></para>
3617
3618 <para>For more information about SMF, please refer to the Solaris
3619 documentation.</para>
3620 </sect2>
3621
3622 <sect2 id="autostart-osx">
3623 <title>Mac OS X: starting the autostart service via launchd</title>
3624
3625 <para>On Mac OS X, launchd is used to start the VirtualBox autostart service. An
3626 example configuration file can be found in
3627 <computeroutput>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</computeroutput>.
3628 To enable the service copy the file to <computeroutput>/Library/LaunchDaemons</computeroutput> and change the
3629 <computeroutput>Disabled</computeroutput> key from
3630 <computeroutput>true</computeroutput> to
3631 <computeroutput>false</computeroutput>. Furthermore replace the second parameter
3632 to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />).
3633 To manually start the service use the following command:
3634 <screen>launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
3635 For additional information on how launchd services could be
3636 configured see <literal><ulink
3637 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>
3638 </sect2>
3639 </sect1>
3640
3641 <sect1 id="vboxexpertstoragemgmt">
3642 <title>VirtualBox expert storage management</title>
3643
3644 <para>In case the snapshot model of VirtualBox is not sufficient
3645 it is possible to enable a special mode which makes it possible to
3646 reconfigure storage attachments while the VM is paused.
3647 The user has to make sure that the disk data stays consistent to the guest
3648 because unlike with hotplugging the guest is not informed about detached
3649 or newly attached media.</para>
3650
3651 <para>The expert storage management mode can be enabled per VM executing:</para>
3652
3653 <screen>VBoxManage setextradata "VM name" "VBoxInternal2/SilentReconfigureWhilePaused" 1</screen>
3654
3655 <para>Storage attachments can be reconfigured while the VM is paused afterwards using:</para>
3656 <screen>VBoxManage storageattach ...</screen>
3657 </sect1>
3658
3659 <sect1 id="hostpowertweaks">
3660 <title>Handling of host power management events</title>
3661
3662 <para>Some host power management events are handled by VirtualBox. The
3663 actual behavior depends on the platform:</para>
3664
3665 <para>
3666 <glosslist>
3667 <glossentry>
3668 <glossterm>Host Suspends</glossterm>
3669 <glossdef>
3670 <para>
3671 This event is generated when the host is about to suspend, that is,
3672 the host saves the state to some non-volatile storage and powers off.
3673 </para>
3674 <para>
3675 This event is currently only handled on Windows hosts and Mac OS X hosts.
3676 When this event is generated, VirtualBox will pause all running VMs.
3677 </para>
3678 </glossdef>
3679 </glossentry>
3680 <glossentry>
3681 <glossterm>Host Resumes</glossterm>
3682 <glossdef>
3683 <para>
3684 This event is generated when the host woke up from the suspended
3685 state.
3686 </para>
3687 <para>
3688 This event is currently only handled on Windows hosts and Mac OS X hosts.
3689 When this event is generated, VirtualBox will resume all VMs which
3690 are where paused before.
3691 </para>
3692 </glossdef>
3693 </glossentry>
3694 <glossentry>
3695 <glossterm>Battery Low</glossterm>
3696 <glossdef>
3697 <para>
3698 The battery level reached a critical level (usually less than 5
3699 percent charged).
3700 </para>
3701 <para>
3702 This event is currently only handled on Windows hosts and Mac OS X hosts.
3703 When this event is generated, VirtualBox will save the state and
3704 terminate all VMs in preparation of a potential host powerdown.
3705 </para>
3706 <para>The behavior can be configured. By executing the following command,
3707 no VM is saved:</para>
3708 <screen>VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
3709 <para>This is a global setting as well as a per-VM setting. The per-VM
3710 value has higher precedence than the global value. The following command
3711 will save the state of all VMs but will not save the state of VM "foo":</para>
3712 <screen>VBoxManage setextradata global "VBoxInternal2/SavestateOnBatteryLow" 1
3713VBoxManage setextradata "foo" "VBoxInternal2/SavestateOnBatteryLow" 0</screen>
3714 <para>The first line is actually not required as by default the savestate
3715 action is performed.</para>
3716 </glossdef>
3717 </glossentry>
3718 </glosslist>
3719 </para>
3720
3721 </sect1>
3722
3723 <sect1 id="sse412passthrough">
3724 <title>Experimental support for passing through SSE4.1 / SSE4.2 instructions</title>
3725 <para>
3726 To provide SSE 4.1 / SSE 4.2 support to guests, the host CPU has to
3727 implement these instruction sets. Starting with VirtualBox 4.3.8 it is
3728 possible to enable these instructions for certain guests using the
3729 following commands:</para><screen>VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.1 1
3730VBoxManage setextradata "VM name" VBoxInternal/CPUM/SSE4.2 1</screen>
3731 <para>
3732 These are a per-VM settings and they are turned off by default.
3733 </para>
3734 </sect1>
3735
3736 <sect1 id="hidledssync">
3737 <title>Support for keyboard indicators synchronization</title>
3738
3739 <para>
3740 This feature makes the host keyboard lights match those of the virtual machine's virtual
3741 keyboard when the machine window is selected. It is currently implemented for Mac OS X and
3742 Windows hosts and available as of releases 4.2.24 and 4.3.8. The feature can be enabled using
3743 the following command:
3744 </para>
3745
3746 <screen>VBoxManage setextradata "VM name" GUI/HidLedsSync "1"</screen>
3747
3748 <para>
3749 In order to disable it, use the same command but change "1" to "0", or use the VBoxManage
3750 command to remove the extra data. This is a per-VM setting and it is disabled by default.
3751 </para>
3752
3753 </sect1>
3754
3755 <sect1 id="usbtrafficcapturing">
3756 <title>Capturing USB traffic for selected devices</title>
3757
3758 <para>
3759 Starting with VirtualBox 5.0 it is possible to capture USB traffic for
3760 single USB devices or on the root hub level which captures the traffic of
3761 all USB devices attached to the root hub. VirtualBox stores the traffic
3762 in a format which is compatible with Wireshark. To capture the traffic
3763 of a specific USB device it must be attached to the VM with VBoxManage
3764 using the following command:
3765 </para>
3766
3767 <screen>VBoxManage controlvm "VM name" usbattach "device uuid|address" --capturefile "filename"</screen>
3768
3769 <para>
3770 In order to enable capturing on the root hub use the following command
3771 while the VM is not running:
3772 </para>
3773
3774 <screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/usb-ehci/0/LUN#0/Config/CaptureFilename "filename"</screen>
3775
3776 <para>The command above enables capturing on the root hub attached to the EHCI controller.
3777 To enable it for the OHCI or XHCI controller replace <computeroutput>usb-ehci</computeroutput>
3778 with <computeroutput>usb-ohci</computeroutput> or <computeroutput>usb-xhci</computeroutput> respectively.</para>
3779
3780 </sect1>
3781
3782 <sect1 id="heartbeatservice">
3783 <title>Configuring the heartbeat service</title>
3784 <para>
3785 VirtualBox ships a simple heartbeat service. Once the Guest Additions are
3786 active, the guest sends frequent heartbeat pings to the host. If the guest
3787 stops sending the heartbeat pings without properly terminating the service,
3788 the VM process will log this event in the VBox.log file. In the future it
3789 might be possible to configure dedicated actions but for now there is only a
3790 warning in the log file.</para>
3791
3792 <para>
3793 There are two parameters to configure. The <emphasis>heartbeat interval</emphasis>
3794 defines the time between two heartbeat pings. The default value is 2 seconds, that
3795 is, the heartbeat service of the VirtualBox Guest Additions will send a heartbeat
3796 ping every two seconds. The value in nanoseconds can be configured like this:
3797 </para>
3798 <screen>VBoxManage controlvm "VM name" VBoxInternal/Devices/VMMDev/0/Config/HeartbeatInterval 2000000000</screen>
3799 <para>
3800 The <emphasis>heartbeat timeout</emphasis> defines the time the host waits
3801 starting from the last heartbeat ping before it defines the guest as unresponsive.
3802 The default value is 2 times the heartbeat interval (4 seconds) and can be configured
3803 as following (in nanoseconds):
3804 </para>
3805
3806 <screen>VBoxManage controlvm "VM name" VBoxInternal/Devices/VMMDev/0/Config/HeartbeatTimeout 4000000000</screen>
3807
3808 <para>
3809 If the heartbeat timeout expires, there will be a log message like
3810 <emphasis>VMMDev: HeartBeatCheckTimer: Guest seems to be unresponsive. Last heartbeat
3811 received 5 seconds ago.</emphasis>
3812 If another heartbeat ping arrives after this warning, there will be a log
3813 message like
3814 <emphasis>VMMDev: GuestHeartBeat: Guest is alive.</emphasis>
3815 </para>
3816
3817 </sect1>
3818
3819 <sect1 id="diskencryption">
3820 <title>Encryption of disk images</title>
3821
3822 <para>
3823 Starting with VirtualBox 5.0, it is possible to encrypt the data stored in
3824 hard disk images transparently for the guest. It does not depend on a specific
3825 image format to be used. Images which have the data encrypted are not portable
3826 between VirtualBox and other virtualization software.
3827 </para>
3828
3829 <para>
3830 VirtualBox uses the AES algorithm in XTS mode and supports 128 or 256 bit
3831 data encryption keys (DEK).
3832 The DEK is stored encrypted in the medium properties and is decrypted during
3833 VM startup by entering a password which was chosen when the image was encrypted.
3834 </para>
3835
3836 <para>
3837 Since the DEK is stored as part of the VM configuration file, it is
3838 important that it is kept safe. Losing the DEK means that the data stored
3839 in the disk images is lost irrecoverably. Having complete and up to
3840 date backups of all data related to the VM is the responsibility of the
3841 user.
3842 </para>
3843
3844 <sect2 id="diskencryption-limitations">
3845 <title>Limitations</title>
3846
3847 <para>
3848 There are some limitations the user needs to be aware of when using this
3849 feature:
3850 </para>
3851
3852 <itemizedlist>
3853
3854 <listitem>
3855 <para>This feature is part of the Oracle VM VirtualBox Extension
3856 Pack, which needs to be installed. Otherwise disk encryption
3857 is unavailable.</para>
3858 </listitem>
3859
3860 <listitem>
3861 <para>Since encryption works only on the stored user data,
3862 it is currently not possible to check for metadata integrity of the disk image.
3863 Attackers might destroy data by removing or changing blocks of data
3864 in the image or change metadata items such as the disk size.
3865 </para>
3866 </listitem>
3867
3868 <listitem>
3869 <para>Exporting appliances which contain encrypted disk images is not
3870 possible because the OVF specification doesn't support this.
3871 All images are therefore decrypted during export.</para>
3872 </listitem>
3873
3874 <listitem>
3875 <para>The DEK is kept in memory while the VM is running to be able to
3876 decrypt data read and encrypt data written by the guest. While this should
3877 be obvious the user needs to be aware of this because an attacker might be able
3878 to extract the key on a compromised host and decrypt the data.</para>
3879 </listitem>
3880
3881 <listitem>
3882 <para>When encrypting or decrypting the images, the password is
3883 passed in clear text via the VirtualBox API. This needs to be kept
3884 in mind, especially when using third party API clients which make
3885 use of the webservice where the password might be transmitted
3886 over the network. The use of HTTPS is mandatory in such a case.
3887 </para>
3888 </listitem>
3889
3890 <listitem>
3891 <para>Encrypting images with differencing images is only possible if
3892 there are no snapshots or a linear chain of snapshots. This
3893 limitation may be addressed in a future VirtualBox version.</para>
3894 </listitem>
3895
3896 </itemizedlist>
3897
3898 </sect2>
3899
3900 <sect2 id="diskencryption-encryption">
3901 <title>Encrypting disk images</title>
3902
3903 <para>
3904 Encrypting disk images can be done either using the GUI or VBoxManage.
3905 While the GUI is easier to use, it works on a per VM basis and encrypts
3906 all disk images attached to the specific VM.
3907 With VBoxManage one can encrypt individual images (including all differencing
3908 images). To encrypt an unencrypted medium with VBoxManage, use:
3909 </para>
3910
3911 <screen>VBoxManage encryptmedium "uuid|filename" --newpassword "file|-" --cipher "cipher id" --newpasswordid "id"</screen>
3912
3913 <para>
3914 To supply the encryption password point VBoxManage to the file where the
3915 password is stored or specify <computeroutput>-</computeroutput> to let VBoxManage
3916 ask you for the password on the command line.
3917 </para>
3918 <para>
3919 The cipher parameter specifies the cipher to use for encryption and can be either
3920 <computeroutput>AES-XTS128-PLAIN64</computeroutput> or <computeroutput>AES-XTS256-PLAIN64</computeroutput>.
3921 The specified password identifier can be freely chosen by the user and is
3922 used for correct identification when supplying multiple passwords during
3923 VM startup.
3924 </para>
3925 <para>
3926 If the user uses the same password when encrypting multiple images and also the
3927 same password identifier, the user needs to supply the password only once during
3928 VM startup.
3929 </para>
3930 </sect2>
3931
3932 <sect2 id="diskencryption-startvm">
3933 <title>Starting a VM with encrypted images</title>
3934
3935 <para>
3936 When a VM is started using the GUI, a dialog will open where the user
3937 needs to enter all passwords for all encrypted images attached to the VM.
3938 If another frontend like VBoxHeadless is used, the VM will be paused as soon
3939 as the guest tries to access an encrypted disk.
3940 The user needs to provide the passwords through VBoxManage using the following
3941 command:
3942 </para>
3943
3944 <screen>VBoxManage controlvm "uuid|vmname" addencpassword "id" "password" [--removeonsuspend "yes|no"]</screen>
3945
3946 <para>
3947 The <computeroutput>id</computeroutput> parameter must be the same as the password identifier
3948 supplied when encrypting the images. <computeroutput>password</computeroutput> is the password
3949 used when encrypting the images. The user can optionally specify
3950 <computeroutput>--removeonsuspend "yes|no"</computeroutput> to specify whether
3951 to remove the password from VM memory when the VM is suspended. Before the VM can be
3952 resumed, the user needs to supply the passwords again. This is useful when
3953 a VM is suspended by a host suspend event and the user doesn't want
3954 the password to remain in memory.
3955 </para>
3956 </sect2>
3957
3958 <sect2 id="diskencryption-decryption">
3959 <title>Decrypting encrypted images</title>
3960
3961 <para>
3962 In some circumstances it might be required to decrypt previously encrypted
3963 images. This can be done in the GUI for a complete VM or using VBoxManage
3964 with the following command:
3965 </para>
3966
3967 <screen>VBoxManage encryptmedium "uuid|filename" --oldpassword "file|-"</screen>
3968
3969 <para>
3970 The only required parameter is the password the image was encrypted with.
3971 The options are the same as for encrypting images.
3972 </para>
3973 </sect2>
3974 </sect1>
3975
3976 <sect1 id="gimdebug">
3977 <title>Paravirtualized debugging</title>
3978
3979 <para>In this section we cover debugging of guest operating systems using interfaces
3980 supported by paravirtualization providers.</para>
3981
3982 <note>
3983 <para>Paravirtualized debugging significantly alter guest operating system behaviour
3984 and should only be used by expert users for debugging and diagnostics.</para>
3985 </note>
3986
3987 <para>These debug options are specified as a string of key-value pairs. An empty
3988 string disables paravirtualized debugging.</para>
3989
3990 <sect2 id="gimdebughyperv">
3991 <title>Hyper-V debug options</title>
3992
3993 <para>All of the options listed below are optional, and thus the default value
3994 specified will be used when the corresponding key-value pair is not
3995 specified.</para>
3996
3997 <itemizedlist>
3998 <listitem>
3999 <para>Key: <emphasis role="bold"><computeroutput>enabled</computeroutput></emphasis></para>
4000 <para>Value: <computeroutput>0</computeroutput> or <computeroutput>1</computeroutput></para>
4001 <para>Default: <computeroutput>0</computeroutput></para>
4002 <para>Specify <computeroutput>1</computeroutput> to enable the Hyper-V debug
4003 interface. If this key-value pair is not specified or the value is not
4004 <computeroutput>1</computeroutput>, the Hyper-V debug interface is disabled
4005 regardless of other key-value pairs being present.</para>
4006 </listitem>
4007 <listitem>
4008 <para>Key: <emphasis role="bold"><computeroutput>address</computeroutput></emphasis></para>
4009 <para>Value: IPv4 address</para>
4010 <para>Default: 127.0.0.1</para>
4011 <para>Specify the IPv4 address where the remote debugger is connected.</para>
4012 </listitem>
4013 <listitem>
4014 <para>Key: <emphasis role="bold"><computeroutput>port</computeroutput></emphasis></para>
4015 <para>Value: UDP port number</para>
4016 <para>Default: 50000</para>
4017 <para>Specify the UDP port number where the remote debugger is connected.</para>
4018 </listitem>
4019 <listitem>
4020 <para>Key: <emphasis role="bold"><computeroutput>vendorid</computeroutput></emphasis></para>
4021 <para>Value: Hyper-V vendor signature reported via CPUID to the guest</para>
4022 <para>Default: When debugging is enabled: <computeroutput>Microsoft Hv</computeroutput>,
4023 otherwise: <computeroutput>VBoxVBoxVBox</computeroutput></para>
4024 <para>Specify the Hyper-V vendor signature which is exposed to the guest via CPUID.
4025 For debugging Microsoft Windows guests, it is required the hypervisor reports
4026 the Microsoft vendor.</para>
4027 </listitem>
4028 <listitem>
4029 <para>Key: <emphasis role="bold"><computeroutput>hypercallinterface</computeroutput>
4030 </emphasis></para>
4031 <para>Value: <computeroutput>0</computeroutput> or <computeroutput>1</computeroutput></para>
4032 <para>Default: <computeroutput>0</computeroutput></para>
4033 <para>Specify whether hypercalls should be suggested for initiating debug data
4034 transfers between host and guest rather than MSRs when requested by the guest.</para>
4035 </listitem>
4036 <listitem>
4037 <para>Key: <emphasis role="bold"><computeroutput>vsinterface</computeroutput>
4038 </emphasis></para>
4039 <para>Value: <computeroutput>0</computeroutput> or <computeroutput>1</computeroutput></para>
4040 <para>Default: When debugging is enabled, <computeroutput>1</computeroutput>,
4041 otherwise <computeroutput>0</computeroutput></para>
4042 <para>Specify whether to expose the "VS#1" (virtualization service) interface to the
4043 guest. This interface is required for debugging Microsoft Windows 10 32-bit guests, but
4044 is optional for other Windows versions.</para>
4045 </listitem>
4046 </itemizedlist>
4047
4048 <sect3 id="gimdebughyperv-windows-setup">
4049 <title>Setting up Windows guests for debugging with the Hyper-V paravirtualization provider</title>
4050
4051 <para>Windows supports debugging over a serial cable, USB, IEEE 1394 Firewire, and Ethernet
4052 (only Windows 8 and later). USB and IEEE 1394 are not applicable for virtual machines, and
4053 Ethernet requires Windows 8 or later. While serial connection is universally usable, it is
4054 slow.</para>
4055
4056 <para>Debugging using the Hyper-V debug transport, supported on Windows Vista and later,
4057 offers significant benefits. It provides excellent performance due to direct host-to-guest
4058 transfers, it is easy to set up and requires minimal support from the hypervisor. It can be
4059 used with the debugger running on the same host as the VM or with the debugger and VM on
4060 separate machines connected over a network.</para>
4061
4062 <sect4><title>Prerequisites</title>
4063 <itemizedlist>
4064 <listitem>
4065 <para>A VM configured for Hyper-V paravirtualization running a Windows Vista or newer
4066 Windows guest. You may check the effective paravirtualization provider for your VM from
4067 the output of the following VBoxManage command:</para>
4068 <para><screen>VBoxManage showvminfo "VM name"</screen></para>
4069 </listitem>
4070
4071 <listitem>
4072 <para>A sufficiently up-to-date version of the Microsoft WinDbg debugger required
4073 to debug the version of Windows in your VM.</para>
4074 </listitem>
4075
4076 <listitem>
4077 <para>While Windows 8 and newer Windows guests ship with Hyper-V debug support,
4078 Windows 7 and Vista do not. To use Hyper-V debugging with a Windows 7 or Vista
4079 guest, copy the file
4080 <computeroutput>kdvm.dll</computeroutput> from a Windows 8.0 installation<footnote>
4081 <para>Only Windows 8.0 ships <computeroutput>kdvm.dll</computeroutput>. Windows 8.1
4082 and newer Windows versions do not.</para></footnote>. This file is
4083 typically located in <computeroutput>C:\Windows\System32</computeroutput>. Copy it
4084 to the same location in your Windows 7/Vista guest. Make sure you copy the 32-bit or
4085 64-bit version of the DLL which matches your guest OS.</para>
4086 </listitem>
4087 </itemizedlist>
4088 </sect4>
4089
4090 <sect4><title>VM and guest configuration</title>
4091 <orderedlist>
4092 <listitem>
4093 <para>Power off the VM.</para>
4094 </listitem>
4095
4096 <listitem>
4097 <para>Enable the debug options by executing the following VBoxManage command:</para>
4098 <para><screen>VBoxManage modifyvm "VM name" --paravirtdebug "enabled=1"</screen></para>
4099 <para>The above command assumes your debugger will connect to your host machine
4100 on UDP port 50000. However, if you need to run the debugger on a remote machine
4101 you may specify the remote address and port here, e.g. using:</para>
4102 <para>
4103 <screen>VBoxManage modifyvm "VM name" --paravirtdebug "enabled=1,address=192.168.32.1,port=55000"</screen>
4104 </para>
4105 </listitem>
4106
4107 <listitem>
4108 <para>Start the VM.</para>
4109 </listitem>
4110
4111 <listitem>
4112 <para>In the guest, start an elevated command prompt and execute the
4113 following commands:</para>
4114 <itemizedlist>
4115 <listitem><para>For a Windows 8 or newer Windows guest:</para>
4116 <para>
4117 <screen>bcdedit /dbgsettings net hostip:5.5.5.5 port:50000 key:1.2.3.4</screen>
4118 </para>
4119 </listitem>
4120 <listitem><para>For a Windows 7 or Vista guest:</para>
4121 <para>
4122 <screen>bcdedit /set loadoptions host_ip=5.5.5.5,host_port=50000,encryption_key=1.2.3.4</screen>
4123 <screen>bcdedit /set dbgtransport kdvm.dll</screen>
4124 </para>
4125 <para>The IP address and port in the <computeroutput>bcdedit</computeroutput> command
4126 are ignored when using the Hyper-V debug transport. Any valid IP and a port number greater
4127 than 49151 and lower than 65536 can be entered.</para>
4128
4129 <para>The encryption key in the <computeroutput>bcdedit</computeroutput> command is
4130 relevant and must be valid. The key "1.2.3.4" used in the above example is valid
4131 and may be used if security is not a concern. If you do not specify any encryption key,
4132 <computeroutput>bcdedit</computeroutput> will generate one for you and you will need to copy
4133 this key to later enter in Microsoft WinDbg on the remote end. This encryption key is used
4134 to encrypt the debug data exchanged between Windows and the debugger.</para>
4135 </listitem>
4136 <listitem>
4137 <para>Execute one or more of the following commands to enable debugging for
4138 the appropriate phase or component of your Windows guest: </para>
4139 <para>
4140 <screen>bcdedit /set debug on</screen>
4141 <screen>bcdedit /set bootdebug on</screen>
4142 <screen>bcdedit /set {bootmgr} bootdebug on</screen>
4143 </para>
4144 <para>Please note that the <computeroutput>bootdebug</computeroutput> options are only
4145 effective on Windows 8 or newer when using the Hyper-V debug transport. Refer to Microsoft
4146 Windows documentation for detailed explanation of <computeroutput>bcdedit</computeroutput>
4147 options.</para>
4148 </listitem>
4149 </itemizedlist>
4150 </listitem>
4151
4152 <listitem>
4153 <para>Start Microsoft WinDbg on your host machine or remote host.</para>
4154
4155 <para>From the "File" menu, select "Kernel debug". Under the "NET" tab, specify the UDP port
4156 number you used in the <computeroutput>paravirtdebug</computeroutput> options. If you didn't
4157 specify any, leave it as 50000. Ensure that the UDP port is not blocked by a firewall or other
4158 security software.</para>
4159
4160 <para>In the "Key" field, enter <computeroutput>1.2.3.4</computeroutput> or the encryption
4161 key from the <computeroutput>bcdedit</computeroutput> command in your Windows guest.</para>
4162
4163 <para>Now press "OK" to start listening for connections. Microsoft WinDbg typically shows
4164 a "Waiting to reconnect" message during this phase.</para>
4165
4166 <para>Alternatively, launch WinDbg from the command line to directly start a debug session:
4167 <screen>windbg.exe -k net:port=50000,key=1.2.3.4</screen>
4168 Please refer to the WinDbg documentation for complete command line syntax.
4169 </para>
4170
4171 </listitem>
4172
4173 <listitem>
4174 <para>Reboot your Windows guest and it should then connect as a debuggee with Microsoft
4175 WinDbg.</para>
4176 </listitem>
4177 </orderedlist>
4178 </sect4>
4179 </sect3>
4180 </sect2>
4181
4182 </sect1>
4183
4184</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