VirtualBox

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

Last change on this file since 44443 was 44336, checked in by vboxsync, 12 years ago

Frontends/VBoxBalloonCtrl: add logic to prevent deflating the balloon if there is not sufficient host memory free, add docs

File size: 127.4 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>
128 <title id="autologon">Automated guest logons</title>
129
130 <para>VirtualBox provides Guest Addition modules for Windows, Linux and
131 Solaris to enable automated logons on the guest.</para>
132
133 <para>When a guest operating system is running in a virtual machine, it
134 might be desirable to perform coordinated and automated logons using
135 credentials from a master logon system. (With "credentials", we are
136 referring to logon information consisting of user name, password and
137 domain name, where each value might be empty.)</para>
138
139 <sect2 id="autologon_win">
140 <title>Automated Windows guest logons</title>
141
142 <para>Since Windows NT, Windows has provided a modular system logon
143 subsystem ("Winlogon") which can be customized and extended by means of
144 so-called GINA modules (Graphical Identification and Authentication).
145 With Windows Vista and Windows 7, the GINA modules were replaced with a
146 new mechanism called "credential providers". The VirtualBox Guest
147 Additions for Windows come with both, a GINA and a credential provider
148 module, and therefore enable any Windows guest to perform automated
149 logons.</para>
150
151 <para>To activate the VirtualBox GINA or credential provider module,
152 install the Guest Additions with using the command line switch
153 <computeroutput>/with_autologon</computeroutput>. All the following
154 manual steps required for installing these modules will be then done by
155 the installer.</para>
156
157 <para>To manually install the VirtualBox GINA module, extract the Guest
158 Additions (see <xref linkend="windows-guest-file-extraction" />) and
159 copy the file <computeroutput>VBoxGINA.dll</computeroutput> to the
160 Windows <computeroutput>SYSTEM32</computeroutput> directory. Then, in
161 the registry, create the following key: <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL</screen>
162 with a value of <computeroutput>VBoxGINA.dll</computeroutput>.</para>
163
164 <note>
165 <para>The VirtualBox GINA module is implemented as a wrapper around
166 the standard Windows GINA module
167 (<computeroutput>MSGINA.DLL</computeroutput>). As a result, it will
168 most likely not work correctly with 3rd party GINA modules.</para>
169 </note>
170
171 <para>To manually install the VirtualBox credential provider module,
172 extract the Guest Additions (see <xref
173 linkend="windows-guest-file-extraction" />) and copy the file
174 <computeroutput>VBoxCredProv.dll</computeroutput> to the Windows
175 <computeroutput>SYSTEM32</computeroutput> directory. Then, in the
176 registry, create the following keys:<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
177 Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
178
179HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
180
181HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32</screen></para>
182
183 <para>with all default values (the key named
184 <computeroutput>(Default)</computeroutput> in each key) set to
185 <computeroutput>VBoxCredProv</computeroutput>. After that a new string
186 named <screen>HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel</screen>
187 with a value of <computeroutput>Apartment</computeroutput> has to be
188 created.</para>
189
190 <para>To set credentials, use the following command on a
191 <emphasis>running</emphasis> VM:</para>
192
193 <screen>VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST"</screen>
194
195 <para>While the VM is running, the credentials can be queried by the
196 VirtualBox logon modules (GINA or credential provider) using the
197 VirtualBox Guest Additions device driver. When Windows is in "logged
198 out" mode, the logon modules will constantly poll for credentials and if
199 they are present, a logon will be attempted. After retrieving the
200 credentials, the logon modules will erase them so that the above command
201 will have to be repeated for subsequent logons.</para>
202
203 <para>For security reasons, credentials are not stored in any persistent
204 manner and will be lost when the VM is reset. Also, the credentials are
205 "write-only", i.e. there is no way to retrieve the credentials from the
206 host side. Credentials can be reset from the host side by setting empty
207 values.</para>
208
209 <para>Depending on the particular variant of the Windows guest, the
210 following restrictions apply: <orderedlist>
211 <listitem>
212 <para>For <emphasis role="bold">Windows XP guests,</emphasis> the
213 logon subsystem needs to be configured to use the classic logon
214 dialog as the VirtualBox GINA module does not support the XP-style
215 welcome dialog.</para>
216 </listitem>
217
218 <listitem>
219 <para>For <emphasis role="bold">Windows Vista, Windows 7
220 and Windows 8 guests,</emphasis> the logon subsystem does not support
221 the so-called Secure Attention Sequence
222 (<computeroutput>CTRL+ALT+DEL</computeroutput>). As a result, the
223 guest's group policy settings need to be changed to not use the
224 Secure Attention Sequence. Also, the user name given is only
225 compared to the true user name, not the user friendly name. This
226 means that when you rename a user, you still have to supply the
227 original user name (internally, Windows never renames user
228 accounts).</para>
229 </listitem>
230
231 <listitem>
232 <para>Auto-logon handling of the built-in Windows Remote Desktop
233 Service (formerly known as Terminal Services) is disabled by
234 default. To enable it, create the registry key <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox Guest Additions\AutoLogon</screen>
235 with a <computeroutput>DWORD</computeroutput> value of
236 <computeroutput>1</computeroutput>.</para>
237 </listitem>
238 </orderedlist></para>
239
240 <para>The following command forces VirtualBox to keep the credentials
241 after they were read by the guest and on VM reset: <screen>VBoxManage setextradata "Windows XP" VBoxInternal/Devices/VMMDev/0/Config/KeepCredentials 1</screen>Note
242 that this is a potential security risk as a malicious application
243 running on the guest could request this information using the proper
244 interface.</para>
245 </sect2>
246
247 <sect2 id="autologon_unix">
248 <title>Automated Linux/Unix guest logons</title>
249
250 <para>Starting with version 3.2, VirtualBox provides a custom PAM module
251 (Pluggable Authentication Module) which can be used to perform automated
252 guest logons on platforms which support this framework. Virtually all
253 modern Linux/Unix distributions rely on PAM.</para>
254
255 <para>For automated logons on Ubuntu (or Ubuntu-derived) distributions
256 using LightDM as the display manager, please see
257 <xref linkend="autologon_unix_lightdm" />.</para>
258
259 <para>The <computeroutput>pam_vbox.so</computeroutput> module itself
260 <emphasis role="bold">does not</emphasis> do an actual verification of
261 the credentials passed to the guest OS; instead it relies on other
262 modules such as <computeroutput>pam_unix.so</computeroutput> or
263 <computeroutput>pam_unix2.so</computeroutput> down in the PAM stack to
264 do the actual validation using the credentials retrieved by
265 <computeroutput>pam_vbox.so</computeroutput>. Therefore
266 <computeroutput>pam_vbox.so</computeroutput> has to be on top of the
267 authentication PAM service list.</para>
268
269 <note>
270 <para>The <computeroutput>pam_vbox.so</computeroutput> only supports
271 the <computeroutput>auth</computeroutput> primitive. Other primitives
272 such as <computeroutput>account</computeroutput>,
273 <computeroutput>session</computeroutput> or
274 <computeroutput>password</computeroutput> are not supported.</para>
275 </note>
276
277 <para>The <computeroutput>pam_vbox.so</computeroutput> module is shipped
278 as part of the Guest Additions but it is not installed and/or activated
279 on the guest OS by default. In order to install it, it has to be copied
280 from
281 <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions/</computeroutput>
282 to the security modules directory, usually
283 <computeroutput>/lib/security/</computeroutput> on 32-bit guest Linuxes
284 or <computeroutput>/lib64/security/</computeroutput> on 64-bit ones.
285 Please refer to your guest OS documentation for the correct PAM module
286 directory.</para>
287
288 <para>For example, to use <computeroutput>pam_vbox.so</computeroutput>
289 with a Ubuntu Linux guest OS and GDM (the GNOME Desktop Manager) to
290 logon users automatically with the credentials passed by the host, the
291 guest OS has to be configured like the following:</para>
292
293 <orderedlist>
294 <listitem>
295 <para>The <computeroutput>pam_vbox.so</computeroutput> module has to
296 be copied to the security modules directory, in this case it is
297 <computeroutput>/lib/security</computeroutput>.</para>
298 </listitem>
299
300 <listitem>
301 <para>Edit the PAM configuration file for GDM found at
302 <computeroutput>/etc/pam.d/gdm</computeroutput>, adding the line
303 <computeroutput>auth requisite pam_vbox.so</computeroutput> at the
304 top. Additionaly, in most Linux distributions there is a file called
305 <computeroutput>/etc/pam.d/common-auth</computeroutput>. This file
306 is included in many other services (like the GDM file mentioned
307 above). There you also have to add the line <computeroutput>auth
308 requisite pam_vbox.so</computeroutput>.</para>
309 </listitem>
310
311 <listitem>
312 <para>If authentication against the shadow database using
313 <computeroutput>pam_unix.so</computeroutput> or
314 <computeroutput>pam_unix2.so</computeroutput> is desired, the
315 argument <computeroutput>try_first_pass</computeroutput> for
316 <computeroutput>pam_unix.so</computeroutput> or
317 <computeroutput>use_first_pass</computeroutput> for
318 <computeroutput>pam_unix2.so</computeroutput> is needed in order to
319 pass the credentials from the VirtualBox module to the shadow
320 database authentication module. For Ubuntu, this needs to be added
321 to <computeroutput>/etc/pam.d/common-auth</computeroutput>, to the
322 end of the line referencing
323 <computeroutput>pam_unix.so</computeroutput>. This argument tells
324 the PAM module to use credentials already present in the stack, i.e.
325 the ones provided by the VirtualBox PAM module.</para>
326 </listitem>
327 </orderedlist>
328
329 <para><warning>
330 <para>An incorrectly configured PAM stack can effectively prevent
331 you from logging into your guest system!</para>
332 </warning></para>
333
334 <para>To make deployment easier, you can pass the argument
335 <computeroutput>debug</computeroutput> right after the
336 <computeroutput>pam_vbox.so</computeroutput> statement. Debug log output
337 will then be recorded using syslog.</para>
338
339 <para><note>
340 <para>By default, pam_vbox will not wait for credentials to arrive
341 from the host, in other words: When a login prompt is shown (for
342 example by GDM/KDM or the text console) and pam_vbox does not yet
343 have credentials it does not wait until they arrive. Instead the
344 next module in the PAM stack (depending on the PAM configuration)
345 will have the chance for authentication.</para>
346 </note></para>
347
348 <para>Starting with VirtualBox 4.1.4 pam_vbox supports various guest
349 property parameters which all reside in
350 <computeroutput>/VirtualBox/GuestAdd/PAM/</computeroutput>. These
351 parameters allow pam_vbox to wait for credentials to be provided by the
352 host and optionally can show a message while waiting for those. The
353 following guest properties can be set:</para>
354
355 <orderedlist>
356 <listitem>
357 <para><computeroutput>CredsWait</computeroutput>: Set to "1" if
358 pam_vbox should start waiting until credentials arrive from the
359 host. Until then no other authentication methods such as manually
360 logging in will be available. If this property is empty or get
361 deleted no waiting for credentials will be performed and pam_vbox
362 will act like before (see paragraph above). This property must be
363 set read-only for the guest
364 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
365 </listitem>
366
367 <listitem>
368 <para><computeroutput>CredsWaitAbort</computeroutput>: Aborts waiting
369 for credentials when set to any value. Can be set from host and the
370 guest.</para>
371 </listitem>
372
373 <listitem>
374 <para><computeroutput>CredsWaitTimeout</computeroutput>: Timeout (in
375 seconds) to let pam_vbox wait for credentials to arrive. When no
376 credentials arrive within this timeout, authentication of pam_vbox
377 will be set to failed and the next PAM module in chain will be
378 asked. If this property is not specified, set to "0" or an invalid
379 value, an infinite timeout will be used. This property must be set
380 read-only for the guest
381 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
382 </listitem>
383 </orderedlist>
384
385 <para>To customize pam_vbox further there are the following guest
386 properties:</para>
387
388 <orderedlist>
389 <listitem>
390 <para><computeroutput>CredsMsgWaiting</computeroutput>: Custom
391 message showed while pam_vbox is waiting for credentials from the
392 host. This property must be set read-only for the guest
393 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
394 </listitem>
395
396 <listitem>
397 <para><computeroutput>CredsMsgWaitTimeout</computeroutput>: Custom
398 message showed when waiting for credentials by pam_vbox timed out,
399 e.g. did not arrive within time. This property must be set read-only
400 for the guest (<computeroutput>RDONLYGUEST</computeroutput>).</para>
401 </listitem>
402 </orderedlist>
403
404 <para><note>
405 <para>If a pam_vbox guest property does not have set the right flags
406 (<computeroutput>RDONLYGUEST</computeroutput>) this property will be
407 ignored then and - depending on the property - a default value will
408 be set. This can result in pam_vbox not waiting for credentials.
409 Consult the appropriate syslog file for more information and use the
410 <computeroutput>debug</computeroutput> option.</para>
411 </note></para>
412
413 <sect3 id="autologon_unix_lightdm">
414 <title>VirtualBox Greeter for Ubuntu / LightDM</title>
415
416 <para>Starting with version 4.2.6, 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:<screen>
432 # ./VBoxLinuxAdditions.run -- --with-autologon</screen></para>
433
434 <para>For manual or postponed installation, the
435 <computeroutput>vbox-greeter.desktop</computeroutput>
436 file has to be copied from
437 <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/shared/VBoxGuestAdditions/</computeroutput>
438 to the <computeroutput>xgreeters</computeroutput> directory, usually
439 <computeroutput>/usr/share/xgreeters/</computeroutput>.
440 Please refer to your guest OS documentation for the correct LightDM
441 greeter directory.</para>
442
443 <para>The vbox-greeter module itself already was installed by the
444 VirtualBox Guest Additions installer and resides in
445 <computeroutput>/usr/sbin/</computeroutput>. To enable vbox-greeter as
446 the standard greeter module, the file
447 <computeroutput>/etc/lightdm/lightdm.conf</computeroutput> needs to be
448 edited:</para>
449
450 <para><screen>
451 [SeatDefaults]
452 greeter-session=vbox-greeter</screen></para>
453
454 <note><para>The LightDM server needs to be fully restarted in order to
455 get vbox-greeter used as the default greeter. As root, do a
456 <computeroutput>service lightdm --full-restart</computeroutput> on
457 Ubuntu, or simply restart the guest.</para></note>
458
459 <note><para>vbox-greeter is independent of the graphical session chosen
460 by the user (like Gnome, KDE, Unity etc). However it requires FLTK 1.3
461 for representing its user interface.</para></note>
462
463 <para>In addition to the guest property values of the
464 pam_vbox module listed above, vbox-greeter has the following guest
465 properties for further customizing its user interface, residing all in
466 <computeroutput>/VirtualBox/GuestAdd/Greeter/</computeroutput>:</para>
467
468 <orderedlist>
469 <listitem>
470 <para><computeroutput>HideRestart</computeroutput>: Set to "1" if
471 vbox-greeter should hide the button to restart the guest. This
472 property must be set read-only for the guest
473 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
474 </listitem>
475
476 <listitem>
477 <para><computeroutput>HideShutdown</computeroutput>: Set to "1" if
478 vbox-greeter should hide the button to shutdown the guest. This
479 property must be set read-only for the guest
480 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
481 </listitem>
482
483 <listitem>
484 <para><computeroutput>BannerPath</computeroutput>: Path to a .PNG
485 file for using it as a banner on the top. The image size must be
486 460 x 90 pixels, any bit depth. This property must be
487 set read-only for the guest
488 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
489 </listitem>
490
491 <listitem>
492 <para><computeroutput>UseTheming</computeroutput>: Set to "1" for
493 turning on the following theming options. This property must be
494 set read-only for the guest
495 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
496 </listitem>
497
498 <listitem>
499 <para><computeroutput>Theme/BackgroundColor</computeroutput>:
500 Hexadecimal RRGGBB color for the background. This property must be
501 set read-only for the guest
502 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
503 </listitem>
504
505 <listitem>
506 <para><computeroutput>Theme/LogonDialog/HeaderColor</computeroutput>:
507 Hexadecimal RRGGBB foreground color for the header text. This
508 property must be set read-only for the guest
509 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
510 </listitem>
511
512 <listitem>
513 <para><computeroutput>Theme/LogonDialog/BackgroundColor</computeroutput>:
514 Hexadecimal RRGGBB color for the logon dialog background. This
515 property must be set read-only for the guest
516 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
517 </listitem>
518
519 <listitem>
520 <para><computeroutput>Theme/LogonDialog/ButtonColor</computeroutput>:
521 Hexadecimal RRGGBB background color for the logon dialog button. This
522 property must be set read-only for the guest
523 (<computeroutput>RDONLYGUEST</computeroutput>).</para>
524 </listitem>
525 </orderedlist>
526
527 <note><para>The same restrictions for the guest properties above apply
528 as for the ones specified in the pam_vbox section.</para></note>
529 </sect3>
530 </sect2>
531 </sect1>
532
533 <sect1>
534 <title>Advanced configuration for Windows guests</title>
535
536 <sect2 id="sysprep">
537 <title>Automated Windows system preparation</title>
538
539 <para>Beginning with Windows NT 4.0, Microsoft offers a "system
540 preparation" tool (in short: Sysprep) to prepare a Windows system for
541 deployment or redistribution. Whereas Windows 2000 and XP ship with
542 Sysprep on the installation medium, the tool also is available for
543 download on the Microsoft web site. In a standard installation of
544 Windows Vista and 7, Sysprep is already included. Sysprep mainly
545 consists of an executable called
546 <computeroutput>sysprep.exe</computeroutput> which is invoked by the
547 user to put the Windows installation into preparation mode.</para>
548
549 <para>Starting with VirtualBox 3.2.2, the Guest Additions offer a way to
550 launch a system preparation on the guest operating system in an
551 automated way, controlled from the host system. To achieve that, see
552 <xref linkend="guestadd-guestcontrol" /> for using the feature with the
553 special identifier <computeroutput>sysprep</computeroutput> as the
554 program to execute, along with the user name
555 <computeroutput>sysprep</computeroutput> and password
556 <computeroutput>sysprep</computeroutput> for the credentials. Sysprep
557 then gets launched with the required system rights.</para>
558
559 <note>
560 <para>Specifying the location of "sysprep.exe" is <emphasis
561 role="bold">not possible</emphasis> -- instead the following paths are
562 used (based on the operating system): <itemizedlist>
563 <listitem>
564 <para><computeroutput>C:\sysprep\sysprep.exe</computeroutput>
565 for Windows NT 4.0, 2000 and XP</para>
566 </listitem>
567
568 <listitem>
569 <para><computeroutput>%WINDIR%\System32\Sysprep\sysprep.exe</computeroutput>
570 for Windows Vista, 2008 Server and 7</para>
571 </listitem>
572 </itemizedlist> The Guest Additions will automatically use the
573 appropriate path to execute the system preparation tool.</para>
574 </note>
575 </sect2>
576 </sect1>
577
578 <sect1>
579 <title>Advanced configuration for Linux and Solaris guests</title>
580
581 <sect2>
582 <title>Manual setup of selected guest services on Linux</title>
583
584 <para>The VirtualBox Guest Additions contain several different drivers.
585 If for any reason you do not wish to set them all up, you can install
586 the Guest Additions using the following command:</para>
587
588 <screen> sh ./VBoxLinuxAdditions.run no_setup</screen>
589
590 <para>After this, you will need to at least compile the kernel modules
591 by running the command <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen>
592 as root (you will need to replace <emphasis>lib</emphasis> by
593 <emphasis>lib64</emphasis> on some 64bit guests), and on older guests
594 without the udev service you will need to add the
595 <emphasis>vboxadd</emphasis> service to the default runlevel to ensure
596 that the modules get loaded.</para>
597
598 <para>To setup the time synchronization service, run the command
599 <screen> /usr/lib/VBoxGuestAdditions/vboxadd-service setup</screen> and
600 add the service vboxadd-service to the default runlevel. To set up the
601 X11 and OpenGL part of the Guest Additions, run the command <screen> /usr/lib/VBoxGuestAdditions/vboxadd-x11 setup</screen>
602 (you do not need to enable any services for this).</para>
603
604 <para>To recompile the guest kernel modules, use this command: <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen>
605 After compilation you should reboot your guest to ensure that the new
606 modules are actually used.</para>
607 </sect2>
608
609 <sect2 id="guestxorgsetup">
610 <title>Guest graphics and mouse driver setup in depth</title>
611
612 <para>This section assumes that you are familiar with configuring the
613 X.Org server using xorg.conf and optionally the newer mechanisms using
614 hal or udev and xorg.conf.d. If not you can learn about them by studying
615 the documentation which comes with X.Org.</para>
616
617 <para>The VirtualBox Guest Additions come with drivers for X.Org
618 versions <itemizedlist>
619 <listitem>
620 X11R6.8/X11R6.9 and XFree86 version 4.3 (vboxvideo_drv_68.o and vboxmouse_drv_68.o)
621 </listitem>
622
623 <listitem>
624 X11R7.0 (vboxvideo_drv_70.so and vboxmouse_drv_70.so)
625 </listitem>
626
627 <listitem>
628 X11R7.1 (vboxvideo_drv_71.so and vboxmouse_drv_71.so)
629 </listitem>
630
631 <listitem>
632 X.Org Server versions 1.3 and later (vboxvideo_drv_13.so and vboxmouse_drv_13.so and so on).
633 </listitem>
634 </itemizedlist> By default these drivers can be found in the
635 directory</para>
636
637 <para><computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions</computeroutput></para>
638
639 <para>and the correct versions for the X server are symbolically linked
640 into the X.Org driver directories.</para>
641
642 <para>For graphics integration to work correctly, the X server must load
643 the vboxvideo driver (many recent X server versions look for it
644 automatically if they see that they are running in VirtualBox) and for
645 an optimal user experience the guest kernel drivers must be loaded and
646 the Guest Additions tool VBoxClient must be running as a client in the X
647 session. For mouse integration to work correctly, the guest kernel
648 drivers must be loaded and in addition, in X servers from X.Org X11R6.8
649 to X11R7.1 and in XFree86 version 4.3 the right vboxmouse driver must be
650 loaded and associated with /dev/mouse or /dev/psaux; in X.Org server 1.3
651 or later a driver for a PS/2 mouse must be loaded and the right
652 vboxmouse driver must be associated with /dev/vboxguest.</para>
653
654 <para>The VirtualBox guest graphics driver can use any graphics
655 configuration for which the virtual resolution fits into the virtual
656 video memory allocated to the virtual machine (minus a small amount used
657 by the guest driver) as described in <xref
658 linkend="settings-display" />. The driver will offer a range of standard
659 modes at least up to the default guest resolution for all active guest
660 monitors. In X.Org Server 1.3 and later the default mode can be changed
661 by setting the output property VBOX_MODE to
662 "&lt;width&gt;x&lt;height&gt;" for any guest monitor. When VBoxClient
663 and the kernel drivers are active this is done automatically when the
664 host requests a mode change. The driver for older versions can only
665 receive new modes by querying the host for requests at regular
666 intervals.</para>
667
668 <para>With pre-1.3 X Servers you can also add your own modes to the X
669 server configuration file. You simply need to add them to the "Modes"
670 list in the "Display" subsection of the "Screen" section. For example,
671 the section shown here has a custom 2048x800 resolution mode
672 added:</para>
673
674 <screen>Section "Screen"
675 Identifier "Default Screen"
676 Device "VirtualBox graphics card"
677 Monitor "Generic Monitor"
678 DefaultDepth 24
679 SubSection "Display"
680 Depth 24
681 Modes "2048x800" "800x600" "640x480"
682 EndSubSection
683EndSection</screen>
684 </sect2>
685 </sect1>
686
687 <sect1 id="cpuhotplug">
688 <title>CPU hot-plugging</title>
689
690 <para>With virtual machines running modern server operating systems,
691 VirtualBox supports CPU hot-plugging.<footnote>
692 <para>Support for CPU hot-plugging was introduced with VirtualBox
693 3.2.</para>
694 </footnote> Whereas on a physical computer this would mean that a CPU
695 can be added or removed while the machine is running, VirtualBox supports
696 adding and removing virtual CPUs while a virtual machine is
697 running.</para>
698
699 <para>CPU hot-plugging works only with guest operating systems that
700 support it. So far this applies only to Linux and Windows Server 2008 x64
701 Data Center Edition. Windows supports only hot-add while Linux supports
702 hot-add and hot-remove but to use this feature with more than 8 CPUs a
703 64bit Linux guest is required.</para>
704
705 <para>At this time, CPU hot-plugging requires using the VBoxManage
706 command-line interface. First, hot-plugging needs to be enabled for a
707 virtual machine:<screen>VBoxManage modifyvm "VM name" --cpuhotplug on</screen></para>
708
709 <para>After that, the --cpus option specifies the maximum number of CPUs
710 that the virtual machine can have:<screen>VBoxManage modifyvm "VM name" --cpus 8</screen>When
711 the VM is off, you can then add and remove virtual CPUs with the modifyvm
712 --plugcpu and --unplugcpu subcommands, which take the number of the
713 virtual CPU as a parameter, like this:<screen>VBoxManage modifyvm "VM name" --plugcpu 3
714VBoxManage modifyvm "VM name" --unplugcpu 3</screen>Note that CPU 0 can never
715 be removed.</para>
716
717 <para>While the VM is running, CPUs can be added with the
718 <computeroutput>controlvm plugcpu/unplugcpu</computeroutput> commands
719 instead:<screen>VBoxManage controlvm "VM name" plugcpu 3
720VBoxManage controlvm "VM name" unplugcpu 3</screen></para>
721
722 <para>See <xref linkend="vboxmanage-modifyvm" /> and <xref
723 linkend="vboxmanage-controlvm" /> for details.</para>
724
725 <para>With Linux guests, the following applies: To prevent ejection while
726 the CPU is still used it has to be ejected from within the guest before.
727 The Linux Guest Additions contain a service which receives hot-remove
728 events and ejects the CPU. Also, after a CPU is added to the VM it is not
729 automatically used by Linux. The Linux Guest Additions service will take
730 care of that if installed. If not a CPU can be started with the following
731 command:<screen>echo 1 &gt; /sys/devices/system/cpu/cpu&lt;id&gt;/online</screen></para>
732 </sect1>
733
734 <sect1 id="pcipassthrough">
735 <title>PCI passthrough</title>
736
737 <para>When running on Linux hosts, with a recent enough kernel (at least
738 version <computeroutput>2.6.31</computeroutput>) experimental host PCI
739 devices passthrough is available.<footnote>
740 <para>Experimental support for PCI passthrough was introduced with
741 VirtualBox 4.1.</para>
742 </footnote></para>
743
744 <note>
745 <para>The PCI passthrough module is shipped as a VirtualBox extension
746 package, which must be installed separately. See <xref
747 linkend="intro-installing" /> for more information.</para>
748 </note>
749
750 <para>Essentially this feature allows to directly use physical PCI devices
751 on the host by the guest even if host doesn't have drivers for this
752 particular device. Both, regular PCI and some PCI Express cards, are
753 supported. AGP and certain PCI Express cards are not supported at the
754 moment if they rely on GART (Graphics Address Remapping Table) unit
755 programming for texture management as it does rather nontrivial operations
756 with pages remapping interfering with IOMMU. This limitation may be lifted
757 in future releases.</para>
758
759 <para>To be fully functional, PCI passthrough support in VirtualBox
760 depends upon an IOMMU hardware unit which is not yet too widely available.
761 If the device uses bus mastering (i.e. it performs DMA to the OS memory on
762 its own), then an IOMMU is required, otherwise such DMA transactions may
763 write to the wrong physical memory address as the device DMA engine is
764 programmed using a device-specific protocol to perform memory
765 transactions. The IOMMU functions as translation unit mapping physical
766 memory access requests from the device using knowledge of the guest
767 physical address to host physical addresses translation rules.</para>
768
769 <para>Intel's solution for IOMMU is marketed as "Intel Virtualization
770 Technology for Directed I/O" (VT-d), and AMD's one is called AMD-Vi. So
771 please check if your motherboard datasheet has appropriate technology.
772 Even if your hardware doesn't have a IOMMU, certain PCI cards may work
773 (such as serial PCI adapters), but the guest will show a warning on boot
774 and the VM execution will terminate if the guest driver will attempt to
775 enable card bus mastering.</para>
776
777 <para>It is very common that the BIOS or the host OS disables the IOMMU by
778 default. So before any attempt to use it please make sure that
779 <orderedlist>
780 <listitem>
781 <para>Your motherboard has an IOMMU unit.</para>
782 </listitem>
783
784 <listitem>
785 <para>Your CPU supports the IOMMU.</para>
786 </listitem>
787
788 <listitem>
789 <para>The IOMMU is enabled in the BIOS.</para>
790 </listitem>
791
792 <listitem>
793 <para>The VM must run with VT-x/AMD-V and nested paging
794 enabled.</para>
795 </listitem>
796
797 <listitem>
798 <para>Your Linux kernel was compiled with IOMMU support (including
799 DMA remapping, see <computeroutput>CONFIG_DMAR</computeroutput>
800 kernel compilation option). The PCI stub driver
801 (<computeroutput>CONFIG_PCI_STUB</computeroutput>) is required as
802 well.</para>
803 </listitem>
804
805 <listitem>
806 <para>Your Linux kernel recognizes and uses the IOMMU unit
807 (<computeroutput>intel_iommu=on</computeroutput> boot option could
808 be needed). Search for DMAR and PCI-DMA in kernel boot log.</para>
809 </listitem>
810 </orderedlist></para>
811
812 <para>Once you made sure that the host kernel supports the IOMMU, the next
813 step is to select the PCI card and attach it to the guest. To figure out
814 the list of available PCI devices, use the
815 <computeroutput>lspci</computeroutput> command. The output will look like
816 this <screen>
817 01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450]
818 01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
819 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
820 03:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
821 03:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
822 06:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8500 GT] (rev a1)
823 </screen> The first column is a PCI address (in format
824 <computeroutput>bus:device.function</computeroutput>). This address could
825 be used to identify the device for further operations. For example, to
826 attach a PCI network controller on the system listed above to the second
827 PCI bus in the guest, as device 5, function 0, use the following command:
828 <screen>VBoxManage modifyvm "VM name" --pciattach 02:00.0@01:05.0</screen>
829 To detach same device, use <screen>VBoxManage modifyvm "VM name" --pcidetach 02:00.0</screen>
830 Please note that both host and guest could freely assign a different PCI
831 address to the card attached during runtime, so those addresses only apply
832 to the address of the card at the moment of attachment (host), and during
833 BIOS PCI init (guest).</para>
834
835 <para>If the virtual machine has a PCI device attached, certain
836 limitations apply: <orderedlist>
837 <listitem>
838 Only PCI cards with non-shared interrupts (such as using MSI on host) are supported at the moment.
839 </listitem>
840
841 <listitem>
842 No guest state can be reliably saved/restored (as the internal state of the PCI card could not be retrieved).
843 </listitem>
844
845 <listitem>
846 Teleportation (live migration) doesn't work (for the same reason).
847 </listitem>
848
849 <listitem>
850 No lazy physical memory allocation. The host will preallocate the whole RAM required for the VM on startup (as we cannot catch physical hardware accesses to the physical memory).
851 </listitem>
852 </orderedlist></para>
853 </sect1>
854
855 <sect1>
856 <title>Advanced display configuration</title>
857
858 <sect2>
859 <title>Custom VESA resolutions</title>
860
861 <para>Apart from the standard VESA resolutions, the VirtualBox VESA BIOS
862 allows you to add up to 16 custom video modes which will be reported to
863 the guest operating system. When using Windows guests with the
864 VirtualBox Guest Additions, a custom graphics driver will be used
865 instead of the fallback VESA solution so this information does not
866 apply.</para>
867
868 <para>Additional video modes can be configured for each VM using the
869 extra data facility. The extra data key is called
870 <literal>CustomVideoMode&lt;x&gt;</literal> with <literal>x</literal>
871 being a number from 1 to 16. Please note that modes will be read from 1
872 until either the following number is not defined or 16 is reached. The
873 following example adds a video mode that corresponds to the native
874 display resolution of many notebook computers:</para>
875
876 <screen>VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</screen>
877
878 <para>The VESA mode IDs for custom video modes start at
879 <literal>0x160</literal>. In order to use the above defined custom video
880 mode, the following command line has be supplied to Linux:</para>
881
882 <screen>vga = 0x200 | 0x160
883vga = 864</screen>
884
885 <para>For guest operating systems with VirtualBox Guest Additions, a
886 custom video mode can be set using the video mode hint feature.</para>
887 </sect2>
888
889 <sect2>
890 <title>Configuring the maximum resolution of guests when using the
891 graphical frontend</title>
892
893 <para>When guest systems with the Guest Additions installed are started
894 using the graphical frontend (the normal VirtualBox application), they
895 will not be allowed to use screen resolutions greater than the host's
896 screen size unless the user manually resizes them by dragging the
897 window, switching to full screen or seamless mode or sending a video mode
898 hint using VBoxManage. This behavior is what most users will want, but
899 if you have different needs, it is possible to change it by issuing one
900 of the following commands from the command line:</para>
901
902 <screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
903
904 <para>will remove all limits on guest resolutions.</para>
905
906 <screen>VBoxManage setextradata global GUI/MaxGuestResolution &gt;width,height&lt;</screen>
907
908 <para>manually specifies a maximum resolution.</para>
909
910 <screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
911
912 <para>restores the default settings. Note that these settings apply
913 globally to all guest systems, not just to a single machine.</para>
914 </sect2>
915 </sect1>
916
917 <sect1>
918 <title>Advanced storage configuration</title>
919
920 <sect2 id="rawdisk">
921 <title>Using a raw host hard disk from a guest</title>
922
923 <para>Starting with version 1.4, as an alternative to using virtual disk
924 images (as described in detail in <xref linkend="storage" />),
925 VirtualBox can also present either entire physical hard disks or
926 selected partitions thereof as virtual disks to virtual machines.</para>
927
928 <para>With VirtualBox, this type of access is called "raw hard disk
929 access"; it allows a guest operating system to access its virtual hard
930 disk without going through the host OS file system. The actual
931 performance difference for image files vs. raw disk varies greatly
932 depending on the overhead of the host file system, whether dynamically
933 growing images are used, and on host OS caching strategies. The caching
934 indirectly also affects other aspects such as failure behavior, i.e.
935 whether the virtual disk contains all data written before a host OS
936 crash. Consult your host OS documentation for details on this.</para>
937
938 <para><warning>
939 <para>Raw hard disk access is for expert users only. Incorrect use
940 or use of an outdated configuration can lead to <emphasis
941 role="bold">total loss of data </emphasis>on the physical disk. Most
942 importantly, <emphasis>do not</emphasis> attempt to boot the
943 partition with the currently running host operating system in a
944 guest. This will lead to severe data corruption.</para>
945 </warning></para>
946
947 <para>Raw hard disk access -- both for entire disks and individual
948 partitions -- is implemented as part of the VMDK image format support.
949 As a result, you will need to create a special VMDK image file which
950 defines where the data will be stored. After creating such a special
951 VMDK image, you can use it like a regular virtual disk image. For
952 example, you can use the VirtualBox Manager (<xref linkend="vdis" />)
953 or <computeroutput>VBoxManage</computeroutput> to assign the image to a
954 virtual machine.</para>
955
956 <sect3>
957 <title>Access to entire physical hard disk</title>
958
959 <para>While this variant is the simplest to set up, you must be aware
960 that this will give a guest operating system direct and full access to
961 an <emphasis>entire physical disk</emphasis>. If your
962 <emphasis>host</emphasis> operating system is also booted from this
963 disk, please take special care to not access the partition from the
964 guest at all. On the positive side, the physical disk can be
965 repartitioned in arbitrary ways without having to recreate the image
966 file that gives access to the raw disk.</para>
967
968 <para>To create an image that represents an entire physical hard disk
969 (which will not contain any actual data, as this will all be stored on
970 the physical disk), on a Linux host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
971 -rawdisk /dev/sda</screen>This creates the image
972 <code>/path/to/file.vmdk</code> (must be absolute), and all data will
973 be read and written from <code>/dev/sda</code>.</para>
974
975 <para>On a Windows host, instead of the above device specification,
976 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
977 of the above device specification use e.g. <code>/dev/disk1</code>.
978 Note that on OS X you can only get access to an entire disk if no
979 volume is mounted from it.</para>
980
981 <para>Creating the image requires read/write access for the given
982 device. Read/write access is also later needed when using the image
983 from a virtual machine. On some host platforms (e.g. Windows Vista
984 and later), raw disk access may be restricted and not permitted by
985 the host OS in some situations.</para>
986
987 <para>Just like with regular disk images, this does not automatically
988 attach the newly created image to a virtual machine. This can be done
989 with e.g. <screen>VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
990 --port 0 --device 0 --type hdd --medium /path/to/file.vmdk</screen>When
991 this is done the selected virtual machine will boot from the specified
992 physical disk.</para>
993 </sect3>
994
995 <sect3>
996 <title>Access to individual physical hard disk partitions</title>
997
998 <para>This "raw partition support" is quite similar to the "full hard
999 disk" access described above. However, in this case, any partitioning
1000 information will be stored inside the VMDK image, so you can e.g.
1001 install a different boot loader in the virtual hard disk without
1002 affecting the host's partitioning information. While the guest will be
1003 able to <emphasis>see</emphasis> all partitions that exist on the
1004 physical disk, access will be filtered in that reading from partitions
1005 for which no access is allowed the partitions will only yield zeroes,
1006 and all writes to them are ignored.</para>
1007
1008 <para>To create a special image for raw partition support (which will
1009 contain a small amount of data, as already mentioned), on a Linux
1010 host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1011 -rawdisk /dev/sda -partitions 1,5</screen></para>
1012
1013 <para>As you can see, the command is identical to the one for "full
1014 hard disk" access, except for the additional
1015 <computeroutput>-partitions</computeroutput> parameter. This example
1016 would create the image <code>/path/to/file.vmdk</code> (which, again,
1017 must be absolute), and partitions 1 and 5 of <code>/dev/sda</code>
1018 would be made accessible to the guest.</para>
1019
1020 <para>VirtualBox uses the same partition numbering as your Linux host.
1021 As a result, the numbers given in the above example would refer to the
1022 first primary partition and the first logical drive in the extended
1023 partition, respectively.</para>
1024
1025 <para>On a Windows host, instead of the above device specification,
1026 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
1027 of the above device specification use e.g. <code>/dev/disk1</code>.
1028 Note that on OS X you can only use partitions which are not mounted
1029 (eject the respective volume first). Partition numbers are the same on
1030 Linux, Windows and Mac OS X hosts.</para>
1031
1032 <para>The numbers for the list of partitions can be taken from the
1033 output of<screen>VBoxManage internalcommands listpartitions -rawdisk /dev/sda</screen>The
1034 output lists the partition types and sizes to give the user enough
1035 information to identify the partitions necessary for the guest.</para>
1036
1037 <para>Images which give access to individual partitions are specific
1038 to a particular host disk setup. You cannot transfer these images to
1039 another host; also, whenever the host partitioning changes, the image
1040 <emphasis>must be recreated</emphasis>.</para>
1041
1042 <para>Creating the image requires read/write access for the given
1043 device. Read/write access is also later needed when using the image
1044 from a virtual machine. If this is not feasible, there is a special
1045 variant for raw partition access (currently only available on Linux
1046 hosts) that avoids having to give the current user access to the
1047 entire disk. To set up such an image, use<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1048 -rawdisk /dev/sda -partitions 1,5 -relative</screen>When used from a
1049 virtual machine, the image will then refer not to the entire disk, but
1050 only to the individual partitions (in the example
1051 <code>/dev/sda1</code> and <code>/dev/sda5</code>). As a consequence,
1052 read/write access is only required for the affected partitions, not
1053 for the entire disk. During creation however, read-only access to the
1054 entire disk is required to obtain the partitioning information.</para>
1055
1056 <para>In some configurations it may be necessary to change the MBR
1057 code of the created image, e.g. to replace the Linux boot loader that
1058 is used on the host by another boot loader. This allows e.g. the guest
1059 to boot directly to Windows, while the host boots Linux from the
1060 "same" disk. For this purpose the
1061 <computeroutput>-mbr</computeroutput> parameter is provided. It
1062 specifies a file name from which to take the MBR code. The partition
1063 table is not modified at all, so a MBR file from a system with totally
1064 different partitioning can be used. An example of this is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1065 -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr</screen>The modified
1066 MBR will be stored inside the image, not on the host disk.</para>
1067
1068 <para>The created image can be attached to a storage controller in a
1069 VM configuration as usual.</para>
1070 </sect3>
1071 </sect2>
1072
1073 <sect2 id="changevpd">
1074 <title>Configuring the hard disk vendor product data (VPD)</title>
1075
1076 <para>VirtualBox reports vendor product data for its virtual hard disks
1077 which consist of hard disk serial number, firmware revision and model
1078 number. These can be changed using the following commands:</para>
1079
1080 <screen>VBoxManage setextradata "VM name"
1081 "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
1082VBoxManage setextradata "VM name"
1083 "VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
1084VBoxManage setextradata "VM name"
1085 "VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
1086
1087 <para>The serial number is a 20 byte alphanumeric string, the firmware
1088 revision an 8 byte alphanumeric string and the model number a 40 byte
1089 alphanumeric string. Instead of "Port0" (referring to the first port),
1090 specify the desired SATA hard disk port.</para>
1091
1092 <para>The above commands apply to virtual machines with an AHCI (SATA)
1093 controller. The commands for virtual machines with an IDE controller
1094 are:</para>
1095
1096 <screen>VBoxManage setextradata "VM name"
1097 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
1098VBoxManage setextradata "VM name"
1099 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision" "firmware"
1100VBoxManage setextradata "VM name"
1101 "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber" "model"</screen>
1102
1103 <para>For hard disks it's also possible to mark the
1104 drive as having a non-rotational medium with:</para>
1105
1106 <screen>VBoxManage setextradata "VM name"
1107 "VBoxInternal/Devices/ahci/0/Config/Port0/NonRotational" "1"</screen>
1108
1109 <para>Additional three parameters are needed for CD/DVD drives to report
1110 the vendor product data:</para>
1111
1112 <screen>VBoxManage setextradata "VM name"
1113 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
1114VBoxManage setextradata "VM name"
1115 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
1116VBoxManage setextradata "VM name"
1117 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
1118
1119 <para>The vendor id is an 8 byte alphanumeric string, the product id an
1120 16 byte alphanumeric string and the revision a 4 byte alphanumeric
1121 string. Instead of "Port0" (referring to the first port), specify the
1122 desired SATA hard disk port.</para>
1123 </sect2>
1124
1125 <sect2>
1126 <title id="iscsi-intnet">Access iSCSI targets via Internal
1127 Networking</title>
1128
1129 <para>As an experimental feature, VirtualBox allows for accessing an
1130 iSCSI target running in a virtual machine which is configured for using
1131 Internal Networking mode. Please see <xref linkend="storage-iscsi" />;
1132 <xref linkend="network_internal" />; and <xref
1133 linkend="vboxmanage-storageattach" /> for additional information.</para>
1134
1135 <para>The IP stack accessing Internal Networking must be configured in
1136 the virtual machine which accesses the iSCSI target. A free static IP
1137 and a MAC address not used by other virtual machines must be chosen. In
1138 the example below, adapt the name of the virtual machine, the MAC
1139 address, the IP configuration and the Internal Networking name
1140 ("MyIntNet") according to your needs. The following eigth commands must
1141 first be issued:<screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Trusted 1
1142VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f
1143VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1
1144VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0
1145VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet
1146VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet
1147VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/TrunkType 2
1148VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1</screen></para>
1149
1150 <para>Finally the iSCSI disk must be attached with the
1151 <computeroutput>--intnet</computeroutput> option to tell the iSCSI
1152 initiator to use internal networking:<screen>VBoxManage storageattach ... --medium iscsi
1153 --server 10.0.9.30 --target iqn.2008-12.com.sun:sampletarget --intnet</screen></para>
1154
1155 <para>Compared to a "regular" iSCSI setup, IP address of the target
1156 <emphasis>must</emphasis> be specified as a numeric IP address, as there
1157 is no DNS resolver for internal networking.</para>
1158
1159 <para>The virtual machine with the iSCSI target should be started before
1160 the VM using it is powered on. If a virtual machine using an iSCSI disk
1161 is started without having the iSCSI target powered up, it can take up to
1162 200 seconds to detect this situation. The VM will fail to power
1163 up.</para>
1164 </sect2>
1165 </sect1>
1166
1167 <sect1>
1168 <title>Launching more than 128 VMs on Linux hosts</title>
1169
1170 <para>Linux hosts have a fixed number of IPC semaphores IDs per process
1171 preventing users from starting substantially many VMs. The exact number
1172 may vary with each Linux distribution. While trying to launch more VMs you
1173 would be shown a "Cannot create IPC semaphore" error. In order to run more
1174 VMs, you will need to increase the semaphore ID limit of the VBoxSVC
1175 process. Find the current semaphore limits imposed by the kernel by
1176 executing as root:<screen>#/sbin/sysctl kernel.sem
1177kernel.sem = 250 32000 32 128</screen></para>
1178
1179 <para>The "kernel.sem" parameter bundles together 4 values, the one we are
1180 interested in is called "SEMMNI", the maximum number of semaphore IDs
1181 which is 128 in the above example. Increase this semaphore ID limit by
1182 executing as root:<screen>echo "kernel.sem = 250 32000 32 2048" &gt;&gt; /etc/sysctl.conf
1183/sbin/sysctl -p</screen></para>
1184
1185 <para>The above commands will add the new limits to the configuration file, thus
1186 making the effect persistent across reboots, and will activate the new
1187 limits into the currently running kernel.</para>
1188 </sect1>
1189
1190 <sect1>
1191 <title>Launching more than 120 VMs on Solaris hosts</title>
1192
1193 <para>Solaris hosts have a fixed number of IPC semaphores IDs per process
1194 preventing users from starting more than 120 VMs. While trying to launch
1195 more VMs you would be shown a "Cannot create IPC semaphore" error. In
1196 order to run more VMs, you will need to increase the semaphore ID limit of
1197 the VBoxSVC process.</para>
1198
1199 <sect2>
1200 <title>Temporary solution while VirtualBox is running</title>
1201
1202 <para>Execute as root the <computeroutput>prctl</computeroutput> command
1203 as shown below for the currently running VBoxSVC process. The process ID
1204 of VBoxSVC can be obtained using the <computeroutput>ps</computeroutput>
1205 command.</para>
1206
1207 <screen>prctl -r -n project.max-sem-ids -v 2048 &lt;pid-of-VBoxSVC&gt;</screen>
1208
1209 <para>This will immediately increase the semaphore limit of the
1210 currently running VBoxSVC process and allow you to launch more VMs.
1211 However, this change is not persistent and will be lost when VBoxSVC
1212 terminates.</para>
1213 </sect2>
1214
1215 <sect2>
1216 <title>Persistent solution, requires user to re-login</title>
1217
1218 <para>If the user running VirtualBox is root, execute the following
1219 command:</para>
1220
1221 <screen>prctl -n project.max-sem-ids -v 2048 -r -i project user.root</screen>
1222
1223 <para>From this point, starting new processes will have the increased
1224 limit of 2048. You may then re-login or close all VMs and restart
1225 VBoxSVC. You can check the current VBoxSVC semaphore ID limit using the
1226 following command:</para>
1227
1228 <screen>prctl -n project.max-sem-ids -i process &lt;pid-of-VBoxSVC&gt;</screen>
1229
1230 <para>If the user running VirtualBox is not root, you must add the
1231 property to the user's default project. Create the default project and
1232 set the limit by executing as root:</para>
1233
1234 <screen>projadd -U &lt;username&gt; user.&lt;username&gt;
1235projmod -s -K "project.max-sem-ids=(priv,2048,deny)" user.&lt;username&gt;</screen>
1236
1237 <para>Substitute "&lt;username&gt;" with the name of the user running
1238 VirtualBox. Then re-login as this user to be able to run more than 120
1239 VMs.</para>
1240 </sect2>
1241 </sect1>
1242
1243 <sect1>
1244 <title>Legacy commands for using serial ports</title>
1245
1246 <para>Starting with version 1.4, VirtualBox provided support for virtual
1247 serial ports, which, at the time, was rather complicated to set up with a
1248 sequence of <computeroutput>VBoxManage setextradata</computeroutput>
1249 statements. Since version 1.5, that way of setting up serial ports is no
1250 longer necessary and <emphasis>deprecated.</emphasis> To set up virtual
1251 serial ports, use the methods now described in <xref
1252 linkend="serialports" />.<note>
1253 <para>For backwards compatibility, the old
1254 <computeroutput>setextradata</computeroutput> statements, whose
1255 description is retained below from the old version of the manual, take
1256 <emphasis>precedence</emphasis> over the new way of configuring serial
1257 ports. As a result, if configuring serial ports the new way doesn't
1258 work, make sure the VM in question does not have old configuration
1259 data such as below still active.</para>
1260 </note></para>
1261
1262 <para>The old sequence of configuring a serial port used the following 6
1263 commands:</para>
1264
1265 <screen>VBoxManage setextradata "VM name"
1266 "VBoxInternal/Devices/serial/0/Config/IRQ" 4
1267VBoxManage setextradata "VM name"
1268 "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
1269VBoxManage setextradata "VM name"
1270 "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
1271VBoxManage setextradata "VM name"
1272 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
1273VBoxManage setextradata "VM name"
1274 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
1275VBoxManage setextradata "VM name"
1276 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1</screen>
1277
1278 <para>This sets up a serial port in the guest with the default settings
1279 for COM1 (IRQ 4, I/O address 0x3f8) and the
1280 <computeroutput>Location</computeroutput> setting assumes that this
1281 configuration is used on a Windows host, because the Windows named pipe
1282 syntax is used. Keep in mind that on Windows hosts a named pipe must
1283 always start with <computeroutput>\\.\pipe\</computeroutput>. On Linux the
1284 same configuration settings apply, except that the path name for the
1285 <computeroutput>Location</computeroutput> can be chosen more freely. Local
1286 domain sockets can be placed anywhere, provided the user running
1287 VirtualBox has the permission to create a new file in the directory. The
1288 final command above defines that VirtualBox acts as a server, i.e. it
1289 creates the named pipe itself instead of connecting to an already existing
1290 one.</para>
1291 </sect1>
1292
1293 <sect1 id="changenat">
1294 <title>Fine-tuning the VirtualBox NAT engine</title>
1295
1296 <sect2>
1297 <title>Configuring the address of a NAT network interface</title>
1298
1299 <para>In NAT mode, the guest network interface is assigned to the IPv4
1300 range <computeroutput>10.0.x.0/24</computeroutput> by default where
1301 <computeroutput>x</computeroutput> corresponds to the instance of the
1302 NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
1303 is only one NAT instance active. In that case the guest is assigned to
1304 the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
1305 set to <computeroutput>10.0.2.2</computeroutput> and the name server can
1306 be found at <computeroutput>10.0.2.3</computeroutput>.</para>
1307
1308 <para>If, for any reason, the NAT network needs to be changed, this can
1309 be achieved with the following command:</para>
1310
1311 <screen>VBoxManage modifyvm "VM name" --natnet1 "192.168/16"</screen>
1312
1313 <para>This command would reserve the network addresses from
1314 <computeroutput>192.168.0.0</computeroutput> to
1315 <computeroutput>192.168.254.254</computeroutput> for the first NAT
1316 network instance of "VM name". The guest IP would be assigned to
1317 <computeroutput>192.168.0.15</computeroutput> and the default gateway
1318 could be found at <computeroutput>192.168.0.2</computeroutput>.</para>
1319 </sect2>
1320
1321 <sect2 id="nat-adv-tftp">
1322 <title>Configuring the boot server (next server) of a NAT network
1323 interface</title>
1324
1325 <para>For network booting in NAT mode, by default VirtualBox uses a
1326 built-in TFTP server at the IP address 10.0.2.3. This default behavior
1327 should work fine for typical remote-booting scenarios. However, it is
1328 possible to change the boot server IP and the location of the boot image
1329 with the following commands: <screen>VBoxManage modifyvm "VM name" --nattftpserver1 10.0.2.2
1330VBoxManage modifyvm "VM name" --nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen></para>
1331 </sect2>
1332
1333 <sect2 id="nat-adv-settings">
1334 <title>Tuning TCP/IP buffers for NAT</title>
1335
1336 <para>The VirtualBox NAT stack performance is often determined by its
1337 interaction with the host's TCP/IP stack and the size of several buffers
1338 (<computeroutput>SO_RCVBUF</computeroutput> and
1339 <computeroutput>SO_SNDBUF</computeroutput>). For certain setups users
1340 might want to adjust the buffer size for a better performance. This can
1341 by achieved using the following commands (values are in kilobytes and
1342 can range from 8 to 1024): <screen>VBoxManage modifyvm "VM name" --natsettings1 16000,128,128,0,0</screen>
1343 This example illustrates tuning the NAT settings. The first parameter is
1344 the MTU, then the size of the socket's send buffer and the size of the
1345 socket's receive buffer, the initial size of the TCP send window, and
1346 lastly the initial size of the TCP receive window. Note that specifying
1347 zero means fallback to the default value.</para>
1348
1349 <para>Each of these buffers has a default size of 64KB and default MTU
1350 is 1500.</para>
1351 </sect2>
1352
1353 <sect2>
1354 <title>Binding NAT sockets to a specific interface</title>
1355
1356 <para>By default, VirtualBox's NAT engine will route TCP/IP packets
1357 through the default interface assigned by the host's TCP/IP stack. (The
1358 technical reason for this is that the NAT engine uses sockets for
1359 communication.) If, for some reason, you want to change this behavior,
1360 you can tell the NAT engine to bind to a particular IP address instead.
1361 Use the following command: <screen>VBoxManage modifyvm "VM name" --natbindip1 "10.45.0.2"</screen></para>
1362
1363 <para>After this, all outgoing traffic will be sent through the
1364 interface with the IP address 10.45.0.2. Please make sure that this
1365 interface is up and running prior to this assignment.</para>
1366 </sect2>
1367
1368 <sect2 id="nat-adv-dns">
1369 <title>Enabling DNS proxy in NAT mode</title>
1370
1371 <para>The NAT engine by default offers the same DNS servers to the guest
1372 that are configured on the host. In some scenarios, it can be desirable
1373 to hide the DNS server IPs from the guest, for example when this
1374 information can change on the host due to expiring DHCP leases. In this
1375 case, you can tell the NAT engine to act as DNS proxy using the
1376 following command: <screen>VBoxManage modifyvm "VM name" --natdnsproxy1 on</screen></para>
1377 </sect2>
1378
1379 <sect2 id="nat_host_resolver_proxy">
1380 <title>Using the host's resolver as a DNS proxy in NAT mode</title>
1381
1382 <para>For resolving network names, the DHCP server of the NAT engine
1383 offers a list of registered DNS servers of the host. If for some reason
1384 you need to hide this DNS server list and use the host's resolver
1385 settings, thereby forcing the VirtualBox NAT engine to intercept DNS
1386 requests and forward them to host's resolver, use the following command:
1387 <screen>VBoxManage modifyvm "VM name" --natdnshostresolver1 on</screen>
1388 Note that this setting is similar to the DNS proxy mode, however whereas
1389 the proxy mode just forwards DNS requests to the appropriate servers,
1390 the resolver mode will interpret the DNS requests and use the host's DNS
1391 API to query the information and return it to the guest.</para>
1392
1393 <sect3 id="nat_host_resolver_name_intercepting">
1394 <title>User-defined host name resolving</title>
1395 <para>In some cases it might be useful to intercept the name resolving mechanism,
1396 providing a user-defined IP address on a particular DNS request. The intercepting
1397 mechanism allows the user to map not only a single host but domains and even more
1398 complex namings conventions if required.</para>
1399 <para>
1400 The following command sets a rule for mapping a name to a specified IP:</para>
1401 <screen>VBoxManage setextradata "VM name" \
1402 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1403 &lt;uniq name of interception rule&gt;/HostIP" &lt;IPv4&gt;
1404VBoxManage setextradata "VM name" \
1405 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1406 &lt;uniq name of interception rule&gt;/HostName" &lt;name of host&gt;</screen>
1407 <para>The following command sets a rule for mapping a pattern name to a specified IP:</para>
1408 <screen>VBoxManage setextradata "VM name" \
1409 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1410 &lt;uniq name of interception rule&gt;/HostIP" &lt;IPv4&gt;
1411VBoxManage setextradata "VM name" \
1412 "VBoxInternal/Devices/{pcnet,e1000}/0/LUN#0/Config/HostResolverMappings/ \
1413 &lt;uniq name of interception rule&gt;/HostNamePattern" &lt;hostpattern&gt;</screen>
1414 <para>The host pattern may include <computeroutput>"|", "?" and "*"</computeroutput>.</para>
1415 <para>This example demonstrates how to instruct the host-resolver mechanism to resolve
1416 all domain and probably some mirrors of www.blocked-site.info site with IP 127.0.0.1:</para>
1417 <screen>VBoxManage setextradata "VM name" \
1418 "VBoxInternal/Devices/e1000/0/LUN#0/Config/HostResolverMappings/ \
1419 all_blocked_site/HostIP" 127.0.0.1
1420VBoxManage setextradata "VM name" \
1421 "VBoxInternal/Devices/e1000/0/LUN#0/Config/HostResolverMappings/ \
1422 all_blocked_site/HostNamePattern" "*.blocked-site.*|*.fb.org"</screen>
1423 <note><para>The host resolver mechanism should be enabled to use user-defined
1424 mapping rules (please see
1425 <xref linkend="nat_host_resolver_proxy" /> for more details).</para></note>
1426 </sect3>
1427 </sect2>
1428
1429 <sect2 id="nat-adv-alias">
1430 <title>Configuring aliasing of the NAT engine</title>
1431
1432 <para>By default, the NAT core uses aliasing and uses random ports when
1433 generating an alias for a connection. This works well for the most
1434 protocols like SSH, FTP and so on. Though some protocols might need a
1435 more transparent behavior or may depend on the real port number the
1436 packet was sent from. It is possible to change the NAT mode via the
1437 VBoxManage frontend with the following commands: <screen>VBoxManage modifyvm "VM name" --nataliasmode1 proxyonly</screen>
1438 and <screen>VBoxManage modifyvm "Linux Guest" --nataliasmode1 sameports</screen>
1439 The first example disables aliasing and switches NAT into transparent
1440 mode, the second example enforces preserving of port values. These modes
1441 can be combined if necessary.</para>
1442 </sect2>
1443 </sect1>
1444
1445 <sect1 id="changedmi">
1446 <title>Configuring the BIOS DMI information</title>
1447
1448 <para>The DMI data VirtualBox provides to guests can be changed for a
1449 specific VM. Use the following commands to configure the DMI BIOS
1450 information:</para>
1451
1452 <sect2>
1453 <title>DMI BIOS information (type 0)</title>
1454 <screen>VBoxManage setextradata "VM name"
1455 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
1456VBoxManage setextradata "VM name"
1457 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
1458VBoxManage setextradata "VM name"
1459 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
1460VBoxManage setextradata "VM name"
1461 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
1462VBoxManage setextradata "VM name"
1463 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
1464VBoxManage setextradata "VM name"
1465 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
1466VBoxManage setextradata "VM name"
1467 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4</screen>
1468 </sect2>
1469 <sect2>
1470 <title>DMI system information (type 1)</title>
1471 <screen>VBoxManage setextradata "VM name"
1472 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
1473VBoxManage setextradata "VM name"
1474 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
1475VBoxManage setextradata "VM name"
1476 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
1477VBoxManage setextradata "VM name"
1478 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
1479VBoxManage setextradata "VM name"
1480 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
1481VBoxManage setextradata "VM name"
1482 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
1483VBoxManage setextradata "VM name"
1484 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"
1485 "9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
1486 </sect2>
1487 <sect2>
1488 <title>DMI board information (type 2)</title>
1489 <screen>VBoxManage setextradata "VM name"
1490 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor" "Board Vendor"
1491VBoxManage setextradata "VM name"
1492 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct" "Board Product"
1493VBoxManage setextradata "VM name"
1494 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion" "Board Version"
1495VBoxManage setextradata "VM name"
1496 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial" "Board Serial"
1497VBoxManage setextradata "VM name"
1498 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag" "Board Tag"
1499VBoxManage setextradata "VM name"
1500 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass" "Board Location"
1501VBoxManage setextradata "VM name"
1502 "VBoxInternal/Devices/pcbios/0/Config/DmiBoardType" 10</screen>
1503 </sect2>
1504 <sect2>
1505 <title>DMI system enclosure or chassis (type 3)</title>
1506 <screen>VBoxManage setextradata "VM name"
1507 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor" "Chassis Vendor"
1508VBoxManage setextradata "VM name"
1509 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion" "Chassis Version"
1510VBoxManage setextradata "VM name"
1511 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial" "Chassis Serial"
1512VBoxManage setextradata "VM name"
1513 "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag" "Chassis Tag"</screen>
1514 </sect2>
1515 <sect2>
1516 <title>DMI processor informatiion (type 4)</title>
1517 <screen>VBoxManage setextradata "VM name"
1518 "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer" "GenuineIntel"
1519VBoxManage setextradata "VM name"
1520 "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion" "Pentium(R) III"</screen>
1521 </sect2>
1522 <sect2>
1523 <title>DMI OEM strings (type 11)</title>
1524 <screen>VBoxManage setextradata "VM name"
1525 "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer" "vboxVer_1.2.3"
1526VBoxManage setextradata "VM name"
1527 "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev" "vboxRev_12345"</screen>
1528 </sect2>
1529 <para>If a DMI string is not set, the default value of VirtualBox is used.
1530 To set an empty string use
1531 <computeroutput>"&lt;EMPTY&gt;"</computeroutput>.</para>
1532
1533 <para>Note that in the above list, all quoted parameters (DmiBIOSVendor,
1534 DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be strings. If
1535 such a string is a valid number, the parameter is treated as number and
1536 the VM will most probably refuse to start with an
1537 <computeroutput>VERR_CFGM_NOT_STRING</computeroutput> error. In that case,
1538 use <computeroutput>"string:&lt;value&gt;"</computeroutput>, for instance
1539 <screen>VBoxManage setextradata "VM name"
1540 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen></para>
1541
1542 <para>Changing this information can be necessary to provide the DMI
1543 information of the host to the guest to prevent Windows from asking for a
1544 new product key. On Linux hosts the DMI BIOS information can be obtained
1545 with <screen>dmidecode -t0</screen>and the DMI system information can be
1546 obtained with <screen>dmidecode -t1</screen></para>
1547 </sect1>
1548
1549 <sect1 id="changeacpicust">
1550 <title>Configuring the custom ACPI table</title>
1551
1552 <para>VirtualBox can be configured to present an custom ACPI table to
1553 the guest. Use the following command to configure this:</para>
1554
1555 <screen>VBoxManage setextradata "VM name"
1556 "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/path/to/table.bin"</screen>
1557
1558 <para>Configuring a custom ACPI table can prevent Windows
1559 Vista and Windows 7 from asking for a new product key. On Linux hosts,
1560 one of the host tables can be read from
1561 <filename>/sys/firmware/acpi/tables/</filename>.</para>
1562 </sect1>
1563
1564 <sect1>
1565 <title>Fine-tuning timers and time synchronization</title>
1566
1567 <sect2 id="changetscmode">
1568 <title>Configuring the guest time stamp counter (TSC) to reflect guest
1569 execution</title>
1570
1571 <para>By default, VirtualBox keeps all sources of time visible to the
1572 guest synchronized to a single time source, the monotonic host time.
1573 This reflects the assumptions of many guest operating systems, which
1574 expect all time sources to reflect "wall clock" time. In special
1575 circumstances it may be useful however to make the TSC (time stamp
1576 counter) in the guest reflect the time actually spent executing the
1577 guest.</para>
1578
1579 <para>This special TSC handling mode can be enabled on a per-VM basis,
1580 and for best results must be used only in combination with hardware
1581 virtualization. To enable this mode use the following command:</para>
1582
1583 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
1584
1585 <para>To revert to the default TSC handling mode use:</para>
1586
1587 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
1588
1589 <para>Note that if you use the special TSC handling mode with a guest
1590 operating system which is very strict about the consistency of time
1591 sources you may get a warning or error message about the timing
1592 inconsistency. It may also cause clocks to become unreliable with some
1593 guest operating systems depending on how they use the TSC.</para>
1594 </sect2>
1595
1596 <sect2 id="warpguest">
1597 <title>Accelerate or slow down the guest clock</title>
1598
1599 <para>For certain purposes it can be useful to accelerate or to slow
1600 down the (virtual) guest clock. This can be achieved as follows:</para>
1601
1602 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
1603
1604 <para>The above example will double the speed of the guest clock
1605 while</para>
1606
1607 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
1608
1609 <para>will halve the speed of the guest clock. Note that changing the
1610 rate of the virtual clock can confuse the guest and can even lead to
1611 abnormal guest behavior. For instance, a higher clock rate means shorter
1612 timeouts for virtual devices with the result that a slightly increased
1613 response time of a virtual device due to an increased host load can
1614 cause guest failures. Note further that any time synchronization
1615 mechanism will frequently try to resynchronize the guest clock with the
1616 reference clock (which is the host clock if the VirtualBox Guest
1617 Additions are active). Therefore any time synchronization should be
1618 disabled if the rate of the guest clock is changed as described above
1619 (see <xref linkend="changetimesync" />).</para>
1620 </sect2>
1621
1622 <sect2 id="changetimesync">
1623 <title>Tuning the Guest Additions time synchronization
1624 parameters</title>
1625
1626 <para>The VirtualBox Guest Additions ensure that the guest's system time
1627 is synchronized with the host time. There are several parameters which
1628 can be tuned. The parameters can be set for a specific VM using the
1629 following command:</para>
1630
1631 <screen>VBoxManage guestproperty set "VM name" "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
1632
1633 <para>where <computeroutput>PARAMETER</computeroutput> is one of the
1634 following:</para>
1635
1636 <para><glosslist>
1637 <glossentry>
1638 <glossterm><computeroutput>--timesync-interval</computeroutput></glossterm>
1639
1640 <glossdef>
1641 <para>Specifies the interval at which to synchronize the time
1642 with the host. The default is 10000 ms (10 seconds).</para>
1643 </glossdef>
1644 </glossentry>
1645
1646 <glossentry>
1647 <glossterm><computeroutput>--timesync-min-adjust</computeroutput></glossterm>
1648
1649 <glossdef>
1650 <para>The minimum absolute drift value measured in milliseconds
1651 to make adjustments for. The default is 1000 ms on OS/2 and 100
1652 ms elsewhere.</para>
1653 </glossdef>
1654 </glossentry>
1655
1656 <glossentry>
1657 <glossterm><computeroutput>--timesync-latency-factor</computeroutput></glossterm>
1658
1659 <glossdef>
1660 <para>The factor to multiply the time query latency with to
1661 calculate the dynamic minimum adjust time. The default is 8
1662 times, that means in detail: Measure the time it takes to
1663 determine the host time (the guest has to contact the VM host
1664 service which may take some time), multiply this value by 8 and
1665 do an adjustment only if the time difference between host and
1666 guest is bigger than this value. Don't do any time adjustment
1667 otherwise.</para>
1668 </glossdef>
1669 </glossentry>
1670
1671 <glossentry>
1672 <glossterm><computeroutput>--timesync-max-latency</computeroutput></glossterm>
1673
1674 <glossdef>
1675 <para>The max host timer query latency to accept. The default is
1676 250 ms.</para>
1677 </glossdef>
1678 </glossentry>
1679
1680 <glossentry>
1681 <glossterm><computeroutput>--timesync-set-threshold</computeroutput></glossterm>
1682
1683 <glossdef>
1684 <para>The absolute drift threshold, given as milliseconds where
1685 to start setting the time instead of trying to smoothly adjust
1686 it. The default is 20 minutes.</para>
1687 </glossdef>
1688 </glossentry>
1689
1690 <glossentry>
1691 <glossterm><computeroutput>--timesync-set-start</computeroutput></glossterm>
1692
1693 <glossdef>
1694 <para>Set the time when starting the time sync service.</para>
1695 </glossdef>
1696 </glossentry>
1697
1698 <glossentry>
1699 <glossterm><computeroutput>--timesync-set-on-restore
1700 0|1</computeroutput></glossterm>
1701
1702 <glossdef>
1703 <para>Set the time after the VM was restored from a saved state
1704 when passing 1 as parameter (default). Disable by passing 0. In
1705 the latter case, the time will be adjusted smoothly which can
1706 take a long time.</para>
1707 </glossdef>
1708 </glossentry>
1709 </glosslist></para>
1710
1711 <para>All these parameters can be specified as command line parameters
1712 to VBoxService as well.</para>
1713 </sect2>
1714
1715 <sect2 id="disabletimesync">
1716
1717 <title>Disabling the Guest Additions time synchronization</title>
1718
1719 <para>Once installed and started, the VirtualBox Guest Additions will
1720 try to synchronize the guest time with the host time. This can be
1721 prevented by forbidding the guest service from reading the host
1722 clock:</para>
1723
1724 <screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1</screen>
1725
1726 </sect2>
1727
1728 </sect1>
1729
1730 <sect1 id="vboxbowsolaris11">
1731 <title>Installing the alternate bridged networking driver on Solaris 11
1732 hosts</title>
1733
1734 <para>Starting with VirtualBox 4.1, VirtualBox ships a new network filter
1735 driver that utilizes Solaris 11's Crossbow functionality. By default, this
1736 new driver is installed for Solaris 11 hosts (builds 159 and above) that
1737 has support for it.</para>
1738
1739 <para>To force installation of the older STREAMS based network filter
1740 driver, execute as root the following command before installing the
1741 VirtualBox package:</para>
1742
1743 <screen>touch /etc/vboxinst_vboxflt</screen>
1744
1745 <para>To force installation of the Crossbow based network filter driver,
1746 execute as root the following command before installing the VirtualBox
1747 package:</para>
1748
1749 <screen>touch /etc/vboxinst_vboxbow</screen>
1750
1751 <para>To check which driver is currently being used by VirtualBox,
1752 execute:</para>
1753
1754 <screen>modinfo | grep vbox</screen>
1755
1756 <para>If the output contains "vboxbow", it indicates VirtualBox is using
1757 the Crossbow network filter driver, while the name "vboxflt" indicates
1758 usage of the older STREAMS network filter.</para>
1759 </sect1>
1760
1761 <sect1 id="vboxbowvnictemplates">
1762 <title>VirtualBox VNIC templates for VLANs on Solaris 11 hosts</title>
1763
1764 <para>VirtualBox supports VNIC (Virtual Network Interface) templates for
1765 configuring VMs over VLANs.<footnote>
1766 <para>Support for Crossbow based bridged networking was introduced
1767 with VirtualBox 4.1 and requires Solaris 11 build 159 or above.</para>
1768 </footnote> A VirtualBox VNIC template is a VNIC whose name starts with
1769 "vboxvnic_template".</para>
1770
1771 <para>Here is an example of how to use a VNIC template to configure a VLAN
1772 for VMs. Create a VirtualBox VNIC template, by executing as root:</para>
1773
1774 <screen>dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0
1775</screen>
1776
1777 <para>This will create a temporary VNIC over interface "nge0" with the
1778 VLAN ID 23. To create VNIC templates that are persistent across host
1779 reboots, skip the <computeroutput>-t</computeroutput> parameter in the
1780 above command. You may check the current state of links using:</para>
1781
1782 <para><screen>$ dladm show-link
1783LINK CLASS MTU STATE BRIDGE OVER
1784nge0 phys 1500 up -- --
1785nge1 phys 1500 down -- --
1786vboxvnic_template0 vnic 1500 up -- nge0
1787
1788$ dladm show-vnic
1789LINK OVER SPEED MACADDRESS MACADDRTYPE VID
1790vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23
1791</screen></para>
1792
1793 <para>Once the VNIC template is created, all VMs that need to be part of
1794 VLAN 23 over the physical interface "nge0" can use the same VNIC template.
1795 This makes managing VMs on VLANs simpler and efficient, as the VLAN
1796 details are not stored as part of every VM's configuration but rather
1797 picked from the VNIC template which can be modified anytime using
1798 <computeroutput>dladm</computeroutput>. Apart from the VLAN ID, VNIC
1799 templates can be created with additional properties such as bandwidth
1800 limits, CPU fanout etc. Refer to your Solaris network documentation on how
1801 to accomplish this. These additional properties, if any, are also applied
1802 to VMs which use the VNIC template.</para>
1803 </sect1>
1804
1805 <sect1 id="addhostonlysolaris">
1806 <title>Configuring multiple host-only network interfaces on Solaris
1807 hosts</title>
1808
1809 <para>By default VirtualBox provides you with one host-only network
1810 interface. Adding more host-only network interfaces on Solaris hosts
1811 requires manual configuration. Here's how to add two more host-only
1812 network interfaces.</para>
1813
1814 <para>You first need to stop all running VMs and unplumb all existing
1815 "vboxnet" interfaces. Execute the following commands as root:</para>
1816
1817 <screen>ifconfig vboxnet0 unplumb</screen>
1818
1819 <para>Once you make sure all vboxnet interfaces are unplumbed, remove the
1820 driver using:</para>
1821
1822 <para><screen>rem_drv vboxnet</screen>then edit the file
1823 <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
1824 and add a line for the new interfaces:</para>
1825
1826 <para><screen>name="vboxnet" parent="pseudo" instance=1;
1827name="vboxnet" parent="pseudo" instance=2;</screen>Add as many of these lines
1828 as required and make sure "instance" number is uniquely incremented. Next
1829 reload the vboxnet driver using:</para>
1830
1831 <para><screen>add_drv vboxnet</screen>Now plumb all the interfaces using
1832 <computeroutput>ifconfig vboxnetX plumb</computeroutput> (where X can be
1833 0, 1 or 2 in this case) and once plumbed you can then configure the
1834 interface like any other network interface.</para>
1835
1836 <para>To make your newly added interfaces' settings persistent across
1837 reboots you will need to edit the files
1838 <computeroutput>/etc/netmasks</computeroutput>, and if you are using NWAM
1839 <computeroutput>/etc/nwam/llp</computeroutput> and add the appropriate
1840 entries to set the netmask and static IP for each of those interfaces. The
1841 VirtualBox installer only updates these configuration files for the one
1842 "vboxnet0" interface it creates by default.</para>
1843 </sect1>
1844
1845 <sect1 id="solariscodedumper">
1846 <title>Configuring the VirtualBox CoreDumper on Solaris hosts</title>
1847
1848 <para>VirtualBox is capable of producing its own core files for extensive
1849 debugging when things go wrong. Currently this is only available on
1850 Solaris hosts.</para>
1851
1852 <para>The VirtualBox CoreDumper can be enabled using the following
1853 command:</para>
1854
1855 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen></para>
1856
1857 <para>You can specify which directory to use for core dumps with this
1858 command:</para>
1859
1860 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir &lt;path-to-directory&gt;</screen>Make
1861 sure the directory you specify is on a volume with sufficient free space
1862 and that the VirtualBox process has sufficient permissions to write files
1863 to this directory. If you skip this command and don't specify any core
1864 dump directory, the current directory of the VirtualBox executable will be
1865 used (which would most likely fail when writing cores as they are
1866 protected with root permissions). It is recommended you explicitly set a
1867 core dump directory.</para>
1868
1869 <para>You must specify when the VirtualBox CoreDumper should be triggered.
1870 This is done using the following commands:</para>
1871
1872 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
1873VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>At
1874 least one of the above two commands will have to be provided if you have
1875 enabled the VirtualBox CoreDumper.</para>
1876
1877 <para>Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
1878 sets up the VM to override the host's core dumping mechanism and in the
1879 event of any crash only the VirtualBox CoreDumper would produce the core
1880 file.</para>
1881
1882 <para>Setting <computeroutput>CoreDumpLive</computeroutput> sets up the VM
1883 to produce cores whenever the VM process receives a
1884 <computeroutput>SIGUSR2</computeroutput> signal. After producing the core
1885 file, the VM will not be terminated and will continue to run. You can thus
1886 take cores of the VM process using:</para>
1887
1888 <para><screen>kill -s SIGUSR2 &lt;VM-process-id&gt;</screen></para>
1889
1890 <para>Core files produced by the VirtualBox CoreDumper are of the form
1891 <computeroutput>core.vb.&lt;ProcessName&gt;.&lt;ProcessID&gt;</computeroutput>,
1892 for example <computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.</para>
1893 </sect1>
1894
1895 <sect1 id="guitweaks">
1896 <title>Locking down the VirtualBox manager GUI</title>
1897
1898 <sect2>
1899 <title>GUI customization</title>
1900
1901 <para>There are several advanced customization settings for locking down
1902 the VirtualBox manager, that is, removing some features that the user
1903 should not see.</para>
1904
1905 <para><screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen></para>
1906
1907 <para>where <computeroutput>OPTION</computeroutput> is one of the
1908 following keywords:<glosslist>
1909 <glossentry>
1910 <glossterm><computeroutput>noSelector</computeroutput></glossterm>
1911
1912 <glossdef>
1913 <para>Don't allow to start the VirtualBox manager. Trying to do so
1914 will show a window containing a proper error message.</para>
1915 </glossdef>
1916 </glossentry>
1917
1918 <glossentry>
1919 <glossterm><computeroutput>noMenuBar</computeroutput></glossterm>
1920
1921 <glossdef>
1922 <para>VM windows will not contain a menu bar.</para>
1923 </glossdef>
1924 </glossentry>
1925
1926 <glossentry>
1927 <glossterm><computeroutput>noStatusBar</computeroutput></glossterm>
1928
1929 <glossdef>
1930 <para>VM windows will not contain a status bar.</para>
1931 </glossdef>
1932 </glossentry>
1933 </glosslist></para>
1934
1935 <para>To disable any GUI customization do <screen>VBoxManage setextradata global GUI/Customizations</screen></para>
1936 </sect2>
1937
1938 <sect2>
1939 <title>Host Key customization</title>
1940
1941 <para>To disable all host key combinations, open the preferences and
1942 change the host key to <emphasis>None</emphasis>. This might be useful
1943 when using VirtualBox in a kiosk mode.</para>
1944
1945 <para>To redefine or disable certain host key actions, use the following command:</para>
1946
1947 <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=F,...."</screen>
1948
1949 <para>The following list shows the possible host key actions together with their default
1950 host key shortcut. Setting an action to <emphasis>None</emphasis> will disable
1951 that host key action.</para>
1952 <table>
1953 <title>ignoreme</title>
1954 <tgroup cols="3">
1955 <tbody>
1956 <row>
1957 <entry><emphasis role="bold">Action</emphasis></entry>
1958 <entry><emphasis role="bold">Default Host Key</emphasis></entry>
1959 <entry><emphasis role="bold">Action</emphasis></entry>
1960 </row>
1961 <row>
1962 <entry>SettingsDialog</entry>
1963 <entry>S</entry>
1964 <entry>open the VM settings dialog</entry>
1965 </row>
1966 <row>
1967 <entry>TakeSnapshot</entry>
1968 <entry>S</entry>
1969 <entry>take a snapshot</entry>
1970 </row>
1971 <row>
1972 <entry>InformationsDialog</entry>
1973 <entry>N</entry>
1974 <entry>show the VM information dialog</entry>
1975 </row>
1976 <row>
1977 <entry>MouseIntegration</entry>
1978 <entry>I</entry>
1979 <entry>toggle mouse integration</entry>
1980 </row>
1981 <row>
1982 <entry>TypeCAD</entry>
1983 <entry>Del</entry>
1984 <entry>inject Ctrl+Alt+Del</entry>
1985 </row>
1986 <row>
1987 <entry>TypeCABS</entry>
1988 <entry>Backspace</entry>
1989 <entry>inject Ctrl+Alt+Backspace</entry>
1990 </row>
1991 <row>
1992 <entry>Pause</entry>
1993 <entry>P</entry>
1994 <entry>Pause the VM</entry>
1995 </row>
1996 <row>
1997 <entry>Reset</entry>
1998 <entry>R</entry>
1999 <entry>(hard) reset the guest</entry>
2000 </row>
2001 <row>
2002 <entry>Shutdown</entry>
2003 <entry>H</entry>
2004 <entry>press the ACPI power button</entry>
2005 </row>
2006 <row>
2007 <entry>Close</entry>
2008 <entry>Q</entry>
2009 <entry>show the VM close dialog</entry>
2010 </row>
2011 <row>
2012 <entry>FullscreenMode</entry>
2013 <entry>F</entry>
2014 <entry>switch the VM into fullscreen</entry>
2015 </row>
2016 <row>
2017 <entry>SeamlessMode</entry>
2018 <entry>L</entry>
2019 <entry>switch the VM into seamless mode</entry>
2020 </row>
2021 <row>
2022 <entry>ScaleMode</entry>
2023 <entry>C</entry>
2024 <entry>switch the VM into scale mode</entry>
2025 </row>
2026 <row>
2027 <entry>PopupMenu</entry>
2028 <entry>Home</entry>
2029 <entry>show popup menu in fullscreen / seamless mode</entry>
2030 </row>
2031 </tbody>
2032 </tgroup>
2033 </table>
2034
2035 <para>To disable the fullscreen mode as well as the seamless mode, use the following command:
2036 <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
2037 </para>
2038
2039 </sect2>
2040 <sect2>
2041 <title>Action when terminating the VM</title>
2042
2043 <para>You can disallow certain actions when terminating a VM. To disallow specific actions, type:</para>
2044
2045 <para><screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen></para>
2046
2047 <para>where <computeroutput>OPTION</computeroutput> is one of the
2048 following keywords:<glosslist>
2049 <glossentry>
2050 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
2051
2052 <glossdef>
2053 <para>Don't allow the user to save the VM state when terminating
2054 the VM.</para>
2055 </glossdef>
2056 </glossentry>
2057
2058 <glossentry>
2059 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
2060
2061 <glossdef>
2062 <para>Don't allow the user to shutdown the VM by sending the ACPI
2063 power-off event to the guest.</para>
2064 </glossdef>
2065 </glossentry>
2066
2067 <glossentry>
2068 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
2069
2070 <glossdef>
2071 <para>Don't allow the user to power off the VM.</para>
2072 </glossdef>
2073 </glossentry>
2074
2075 <glossentry>
2076 <glossterm><computeroutput>Restore</computeroutput></glossterm>
2077
2078 <glossdef>
2079 <para>Don't allow the user to return to the last snapshot when
2080 powering off the VM.</para>
2081 </glossdef>
2082 </glossentry>
2083 </glosslist></para>
2084
2085 <para>Any combination of the above is allowed. If all options are
2086 specified, the VM cannot be shut down at all.</para>
2087 </sect2>
2088 </sect1>
2089
2090 <sect1 id="vboxwebsrv-daemon">
2091 <title>Starting the VirtualBox web service automatically</title>
2092
2093 <para>The VirtualBox web service
2094 (<computeroutput>vboxwebsrv</computeroutput>) is used for controlling
2095 VirtualBox remotely. It is documented in detail in the VirtualBox Software
2096 Development Kit (SDK); please see <xref linkend="VirtualBoxAPI" />. As the
2097 client base using this interface is growing, we added start scripts for
2098 the various operation systems we support. The following sections describe
2099 how to use them. The VirtualBox web service is never started automatically
2100 as a result of a standard installation.</para>
2101
2102 <sect2 id="vboxwebsrv-linux">
2103 <title>Linux: starting the webservice via <computeroutput>init</computeroutput></title>
2104
2105 <para>On Linux, the web service can be automatically started during
2106 host boot by adding appropriate parameters to the file
2107 <computeroutput>/etc/default/virtualbox</computeroutput>.
2108 There is one mandatory parameter, <computeroutput>VBOXWEB_USER</computeroutput>,
2109 which must be set to the user which will later start the VMs. The
2110 parameters in the table below all start with <computeroutput>VBOXWEB_</computeroutput>
2111 (<computeroutput>VBOXWEB_HOST</computeroutput>,
2112 <computeroutput>VBOXWEB_PORT</computeroutput> etc.):
2113 <table>
2114 <title>ignored</title>
2115 <tgroup cols="3">
2116 <tbody>
2117 <row>
2118 <entry><emphasis role="bold">Parameter</emphasis></entry>
2119 <entry><emphasis role="bold">Description</emphasis></entry>
2120 <entry><emphasis role="bold">Default</emphasis></entry>
2121 </row>
2122 <row>
2123 <entry>USER</entry>
2124 <entry>The user as which the web service runs</entry>
2125 <entry></entry>
2126 </row>
2127 <row>
2128 <entry>HOST</entry>
2129 <entry>The host to bind the web service to</entry>
2130 <entry>localhost</entry>
2131 </row>
2132 <row>
2133 <entry>PORT</entry>
2134 <entry>The port to bind the web service to</entry>
2135 <entry>18083</entry>
2136 </row>
2137 <row>
2138 <entry>SSL_KEYFILE</entry>
2139 <entry>Server key and certificate file, PEM format</entry>
2140 <entry></entry>
2141 </row>
2142 <row>
2143 <entry>SSL_PASSWORDFILE</entry>
2144 <entry>File name for password to server key</entry>
2145 <entry></entry>
2146 </row>
2147 <row>
2148 <entry>SSL_CACERT</entry>
2149 <entry>CA certificate file, PEM format</entry>
2150 <entry></entry>
2151 </row>
2152 <row>
2153 <entry>SSL_CAPATH</entry>
2154 <entry>CA certificate path</entry>
2155 <entry></entry>
2156 </row>
2157 <row>
2158 <entry>SSL_DHFILE</entry>
2159 <entry>DH file name or DH key length in bits</entry>
2160 <entry></entry>
2161 </row>
2162 <row>
2163 <entry>SSL_RANDFILE</entry>
2164 <entry>File containing seed for random number generator</entry>
2165 <entry></entry>
2166 </row>
2167 <row>
2168 <entry>TIMEOUT</entry>
2169 <entry>Session timeout in seconds; 0 disables timeouts</entry>
2170 <entry>300</entry>
2171 </row>
2172 <row>
2173 <entry>CHECK_INTERVAL</entry>
2174 <entry>Frequency of timeout checks in seconds</entry>
2175 <entry>5</entry>
2176 </row>
2177 <row>
2178 <entry>THREADS</entry>
2179 <entry>Maximum number of worker threads to run in parallel</entry>
2180 <entry>100</entry>
2181 </row>
2182 <row>
2183 <entry>KEEPALIVE</entry>
2184 <entry>Maximum number of requests before a socket will be closed</entry>
2185 <entry>100</entry>
2186 </row>
2187 <row>
2188 <entry>LOGFILE</entry>
2189 <entry>Name of file to write log to</entry>
2190 <entry></entry>
2191 </row>
2192 <row>
2193 <entry>ROTATE</entry>
2194 <entry>Number of log files; 0 disables log rotation</entry>
2195 <entry>10</entry>
2196 </row>
2197 <row>
2198 <entry>LOGSIZE</entry>
2199 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
2200 <entry>1MB</entry>
2201 </row>
2202 <row>
2203 <entry>LOGINTERVAL</entry>
2204 <entry>Maximum time interval in seconds to trigger log rotation</entry>
2205 <entry>1 day</entry>
2206 </row>
2207 </tbody>
2208 </tgroup>
2209 </table>
2210 </para>
2211
2212 <para>Setting the parameter <computeroutput>SSL_KEYFILE</computeroutput>
2213 enables the SSL/TLS support. Using encryption is strongly encouraged, as
2214 otherwise everything (including passwords) is transferred in clear
2215 text.</para>
2216 </sect2>
2217
2218 <sect2 id="vboxwebsrv-solaris">
2219 <title>Solaris: starting the web service via SMF</title>
2220
2221 <para>On Solaris hosts, the VirtualBox web service daemon is
2222 integrated into the SMF framework. You can change the parameters, but
2223 don't have to if the defaults below already match your needs:<screen>svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
2224svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
2225svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root</screen></para>
2226
2227 <para>The table in the previous section showing the parameter names and
2228 defaults also applies to Solaris. The parameter names must be changed
2229 to lowercase and a prefix of <computeroutput>config/</computeroutput>
2230 has to be added, e.g. <computeroutput>config/user</computeroutput> or
2231 <computeroutput>config/ssl_keyfile</computeroutput>. If you made any
2232 change, don't forget to run the following command to put the changes into
2233 effect immediately:<screen>svcadm refresh svc:/application/virtualbox/webservice:default</screen></para>
2234
2235 <para>If you forget the above command then the previous settings will
2236 be used when enabling the service. Check the current property settings
2237 with:<screen>svcprop -p config svc:/application/virtualbox/webservice:default</screen></para>
2238
2239 <para>When everything is configured correctly you can start the
2240 VirtualBox web service with the following command:<screen>svcadm enable svc:/application/virtualbox/webservice:default</screen></para>
2241
2242 <para>For more information about SMF, please refer to the Solaris
2243 documentation.</para>
2244 </sect2>
2245
2246 <sect2 id="vboxwebsrv-osx">
2247 <title>Mac OS X: starting the webservice via launchd</title>
2248
2249 <para>On Mac OS X, launchd is used to start the VirtualBox webservice. An
2250 example configuration file can be found in
2251 <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
2252 It can be enabled by changing the
2253 <computeroutput>Disabled</computeroutput> key from
2254 <computeroutput>true</computeroutput> to
2255 <computeroutput>false</computeroutput>. To manually start the
2256 service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
2257 For additional information on how launchd services could be
2258 configured see <literal><ulink
2259 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>
2260 </sect2>
2261 </sect1>
2262
2263 <sect1 id="vboxwatchdog">
2264 <title>VirtualBox Watchdog</title>
2265 <para>Starting with VirtualBox 4.2 the memory ballooning service formerly
2266 known as <computeroutput>VBoxBalloonCtrl</computeroutput> was renamed to
2267 VBoxWatchdog, which now incorporates several host services that are meant
2268 to be run in a server environment.</para>
2269
2270 <para>These services are: <itemizedlist>
2271 <listitem>
2272 <para>Memory ballooning control, which automatically takes care of
2273 a VM's configured memory balloon (see <xref linkend="guestadd-balloon" />
2274 for an introduction to memory ballooning). This especially is useful
2275 for server environments where VMs may dynamically require more or
2276 less memory during runtime.</para>
2277
2278 <para>The service periodically checks a VM's current memory balloon
2279 and its free guest RAM and automatically adjusts the current memory
2280 balloon by inflating or deflating it accordingly. This handling only
2281 applies to running VMs having recent Guest Additions installed.</para>
2282 </listitem>
2283 <listitem>
2284 <para>Host isolation detection, which provides a way to detect whether
2285 the host cannot reach the specific VirtualBox server instance anymore
2286 and take appropriate actions, such as shutting down, saving the
2287 current state or even powering down certain VMs.</para>
2288 </listitem>
2289 </itemizedlist></para>
2290
2291 <para>
2292 All configuration values can be either specified via command line or global
2293 extradata, whereas command line values always have a higher priority when set.
2294 Some of the configuration values also be be specified on a per-VM basis. So
2295 the overall lookup order is: command line, per-VM basis extradata (if available),
2296 global extradata.
2297 </para>
2298
2299 <sect2 id="vboxwatchdog-ballonctrl">
2300 <title>Memory ballooning control</title>
2301 <para>The memory ballooning control inflates and deflates the memory balloon
2302 of VMs based on the VMs free memory and the desired maximum balloon size.</para>
2303
2304 <para>To set up the memory ballooning control the maximum ballooning size a
2305 VM can reach needs to be set. This can be specified via command line with
2306 <screen>--balloon-max &lt;Size in MB&gt;</screen>, on a per-VM basis extradata value with
2307 <screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
2308 or using a global extradata value with
2309 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
2310 <note><para>If no maximum ballooning size is specified by at least one of
2311 the parameters above, no ballooning will be performed at all.</para></note>
2312 </para>
2313
2314 <para>Setting the ballooning increment in MB can be either done via
2315 command line with
2316 <screen>--balloon-inc &lt;Size in MB&gt;</screen> or using a global
2317 extradata value with
2318 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
2319 Default ballooning increment is 256 MB if not specified.</para>
2320
2321 <para>Same goes with the ballooning decrement: Via command line with
2322 <screen>--balloon-dec &lt;Size in MB&gt;</screen> or using a global
2323 extradata value with
2324 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
2325 Default ballooning decrement is 128 MB if not specified.</para>
2326
2327 <para>To define the lower limit in MB a balloon can be the command line with
2328 <screen>--balloon-lower-limit &lt;Size in MB&gt;</screen> can be used or using a global
2329 extradata value with
2330 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
2331 is available. Default lower limit is 128 if not specified.</para>
2332 </sect2>
2333
2334 <sect2 id="vboxwatchdog-hostisln">
2335 <title>Host isolation detection</title>
2336 <para>To detect whether a host is being isolated, that is, the host cannot
2337 reach the VirtualBox server instance anymore, the host needs to set an
2338 alternating value to a global extradata value within a time period. If
2339 this value is not set within that time period a timeout occurred and the
2340 so-called host isolation response will be performed to the VMs handled.
2341 Which VMs are handled can be controlled by defining VM groups and assigning
2342 VMs to those groups. By default no groups are set, meaning that all VMs
2343 on the server will be handled when no host response is received within
2344 30 seconds.</para>
2345
2346 <para>To set the groups handled by the host isolation detection via
2347 command line:
2348 <screen>--apimon-groups=&lt;string[,stringN]&gt;</screen> or using a global
2349 extradata value with
2350 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
2351 </para>
2352
2353 <para>To set the host isolation timeout via command line:
2354 <screen>--apimon-isln-timeout=&lt;ms&gt;</screen> or using a global
2355 extradata value with
2356 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
2357 </para>
2358
2359 <para>To set the actual host isolation response via command line:
2360 <screen>--apimon-isln-response=&lt;cmd&gt;</screen> or using a global
2361 extradata value with
2362 <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
2363 The following response commands are available:
2364 <itemizedlist>
2365 <listitem>
2366 <para><computeroutput>none</computeroutput>, which does nothing.</para>
2367 </listitem>
2368 <listitem>
2369 <para><computeroutput>pause</computeroutput>, which pauses the
2370 execution of a VM.</para>
2371 </listitem>
2372 <listitem>
2373 <para><computeroutput>poweroff</computeroutput>, which shuts down
2374 the VM by pressing the virtual power button. The VM will not have
2375 the chance of saving any data or veto the shutdown process.</para>
2376 </listitem>
2377 <listitem>
2378 <para><computeroutput>save</computeroutput>, which saves the current
2379 machine state and powers off the VM afterwards. If saving the machine
2380 state fails the VM will be paused.</para>
2381 </listitem>
2382 <listitem>
2383 <para><computeroutput>shutdown</computeroutput>, which shuts down
2384 the VM in a gentle way by sending an <computeroutput>ACPI</computeroutput>
2385 shutdown event to the VM's operating system. The OS then has the
2386 chance of doing a clean shutdown.</para>
2387 </listitem>
2388 </itemizedlist>
2389 </para>
2390 </sect2>
2391
2392 <sect2 id="vboxwatchdog-moreinfo">
2393 <title>More information</title>
2394 <para>For more advanced options and parameters like verbose logging check
2395 the built-in command line help accessible with
2396 <computeroutput>--help</computeroutput>.</para>
2397 </sect2>
2398
2399 <sect2 id="vboxwatchdog-linux">
2400 <title>Linux: starting the watchdog service via <computeroutput>init</computeroutput></title>
2401
2402 <para>On Linux, the watchdog service can be automatically started during
2403 host boot by adding appropriate parameters to the file
2404 <computeroutput>/etc/default/virtualbox</computeroutput>.
2405 There is one mandatory parameter, <computeroutput>VBOXWATCHDOG_USER</computeroutput>,
2406 which must be set to the user which will later start the VMs. For backward
2407 compatibility you can also specify <computeroutput>VBOXBALLOONCTRL_USER</computeroutput>The
2408 parameters in the table below all start with <computeroutput>VBOXWATCHDOG_</computeroutput>
2409 (<computeroutput>VBOXWATCHDOG_BALLOON_INTERVAL</computeroutput>,
2410 <computeroutput>VBOXWATCHDOG_LOGSIZE</computeroutput> etc., and for
2411 previously existing parameters the
2412 <computeroutput>VBOXBALLOONCTRL_INTERVAL</computeroutput> etc. parameters
2413 can still be used):
2414 <table>
2415 <title>ignored</title>
2416 <tgroup cols="3">
2417 <tbody>
2418 <row>
2419 <entry><emphasis role="bold">Parameter</emphasis></entry>
2420 <entry><emphasis role="bold">Description</emphasis></entry>
2421 <entry><emphasis role="bold">Default</emphasis></entry>
2422 </row>
2423 <row>
2424 <entry>USER</entry>
2425 <entry>The user as which the watchdog service runs</entry>
2426 <entry></entry>
2427 </row>
2428 <row>
2429 <entry>ROTATE</entry>
2430 <entry>Number of log files; 0 disables log rotation</entry>
2431 <entry>10</entry>
2432 </row>
2433 <row>
2434 <entry>LOGSIZE</entry>
2435 <entry>Maximum size of a log file in bytes to trigger rotation</entry>
2436 <entry>1MB</entry>
2437 </row>
2438 <row>
2439 <entry>LOGINTERVAL</entry>
2440 <entry>Maximum time interval in seconds to trigger log rotation</entry>
2441 <entry>1 day</entry>
2442 </row>
2443 <row>
2444 <entry>BALLOON_INTERVAL</entry>
2445 <entry>Interval for checking the balloon size (msec)</entry>
2446 <entry>30000</entry>
2447 </row>
2448 <row>
2449 <entry>BALLOON_INCREMENT</entry>
2450 <entry>Balloon size increment (MByte)</entry>
2451 <entry>256</entry>
2452 </row>
2453 <row>
2454 <entry>BALLOON_DECREMENT</entry>
2455 <entry>Balloon size decrement (MByte)</entry>
2456 <entry>128</entry>
2457 </row>
2458 <row>
2459 <entry>BALLOON_LOWERLIMIT</entry>
2460 <entry>Balloon size lower limit (MByte)</entry>
2461 <entry>64</entry>
2462 </row>
2463 <row>
2464 <entry>BALLOON_SAFETYMARGIN</entry>
2465 <entry>Free memory required for decreasing the balloon size (MByte)</entry>
2466 <entry>1024</entry>
2467 </row>
2468 </tbody>
2469 </tgroup>
2470 </table>
2471 </para>
2472 </sect2>
2473
2474 <sect2 id="vboxwatchdog-solaris">
2475 <title>Solaris: starting the watchdog service via SMF</title>
2476
2477 <para>On Solaris hosts, the VirtualBox watchdog service daemon is
2478 integrated into the SMF framework. You can change the parameters, but
2479 don't have to if the defaults already match your needs:<screen>svccfg -s svc:/application/virtualbox/balloonctrl:default setprop config/balloon_interval=10000
2480svccfg -s svc:/application/virtualbox/balloonctrl:default setprop config/balloon_safetymargin=134217728</screen></para>
2481
2482 <para>The table in the previous section showing the parameter names and
2483 defaults also applies to Solaris. The parameter names must be changed
2484 to lowercase and a prefix of <computeroutput>config/</computeroutput>
2485 has to be added, e.g. <computeroutput>config/user</computeroutput> or
2486 <computeroutput>config/balloon_safetymargin</computeroutput>. If you made any
2487 change, don't forget to run the following command to put the changes into
2488 effect immediately:<screen>svcadm refresh svc:/application/virtualbox/balloonctrl:default</screen></para>
2489
2490 <para>If you forget the above command then the previous settings will
2491 be used when enabling the service. Check the current property settings
2492 with:<screen>svcprop -p config svc:/application/virtualbox/balloonctrl:default</screen></para>
2493
2494 <para>When everything is configured correctly you can start the
2495 VirtualBox watchdog service with the following command:<screen>svcadm enable svc:/application/virtualbox/balloonctrl:default</screen></para>
2496
2497 <para>For more information about SMF, please refer to the Solaris
2498 documentation.</para>
2499 </sect2>
2500
2501 </sect1>
2502
2503 <sect1 id="otherextpacks">
2504 <title>Other extension packs</title>
2505
2506 <para>Starting with VirtualBox 4.2.0 there is another extension pack,
2507 <code>VNC</code>, which is open source and replaces the previous
2508 integration of the VNC remote access protocol. This is experimental code,
2509 and will be initially available in the VirtualBox source code package only.
2510 It is to a large portion code contributed by users, and is not supported
2511 in any way by Oracle.</para>
2512
2513 <para>The keyboard handling is severely limited, and only the US keyboard
2514 layout works. Other keyboard layouts will have at least some keys which
2515 produce the wrong results (often quite surprising effects), and for layouts
2516 which have significant differences to the US keyboard layout it is most
2517 likely unusable.</para>
2518
2519 <para>It is possible to install both the Oracle VM VirtualBox Extension
2520 Pack and VNC, but only one VRDE module can be active at any time. The
2521 following command switches to the VNC VRDE module in
2522 VNC:<screen>VBoxManage setproperty vrdeextpack VNC</screen></para>
2523
2524 <para>Configuring the remote access works very similarly to VRDP (see
2525 <xref linkend="vrde" />), with some limitations: VNC does not
2526 support specifying several port numbers, and the authentication is done
2527 differently. VNC can only deal with password authentication, and there
2528 is no option to use password hashes. This leaves no other choice than
2529 having a clear-text password in the VM configuration, which can be set with
2530 the following command:<screen>VBoxManage modifyvm VMNAME --vrdeproperty VNCPassword=secret</screen></para>
2531
2532 <para>The user is responsible for keeping this password secret, and it
2533 should be removed when a VM configuration is passed to another person,
2534 for whatever purpose. Some VNC servers claim to have "encrypted" passwords
2535 in the configuration. This is not true encryption, it is only concealing
2536 the passwords, which is exactly as secure as clear-text passwords.</para>
2537
2538 <para>The following command switches back to VRDP (if
2539 installed):<screen>VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"</screen></para>
2540 </sect1>
2541
2542 <sect1 id="autostart">
2543 <title>Starting virtual machines during system boot</title>
2544
2545 <para>Starting with VirtualBox 4.2.0 it is possible to start VMs automatically during
2546 system boot on Linux, Solaris and Mac OS X for all users. </para>
2547
2548 <sect2 id="autostart-linux">
2549 <title>Linux: starting the autostart service via <computeroutput>init</computeroutput></title>
2550
2551 <para>On Linux, the autostart service is activated by setting two variables in
2552 <computeroutput>/etc/default/virtualbox</computeroutput>.
2553 The first one is <computeroutput>VBOXAUTOSTART_DB</computeroutput> which
2554 contains an absolute path to the autostart database directory.
2555 The directory should have write access for every user who should be able to
2556 start virtual machines automatically. Furthermore the directory should have the
2557 sticky bit set.
2558 The second variable is <computeroutput>VBOXAUTOSTART_CONFIG</computeroutput>
2559 which points the service to the autostart configuration file which is used
2560 during boot to determine whether to allow individual users to start a VM
2561 automatically and configure startup delays.
2562 The configuration file can be placed in <computeroutput>/etc/vbox</computeroutput>
2563 and contains several options. One is <computeroutput>default_policy</computeroutput>
2564 which controls whether the autostart service allows or denies to start a VM
2565 for users which are not in the exception list.
2566 The exception list starts with <computeroutput>exception_list</computeroutput>
2567 and contains a comma seperated list with usernames. Furthermore a separate
2568 startup delay can be configured for every user to avoid overloading the host.
2569 A sample configuration is given below:</para>
2570
2571 <para><screen>
2572# Default policy is to deny starting a VM, the other option is "allow".
2573default_policy = deny
2574
2575# Bob is allowed to start virtual machines but starting them
2576# will be delayed for 10 seconds
2577bob = {
2578 allow = true
2579 startup_delay = 10
2580}
2581
2582# Alice is not allowed to start virtual machines, useful to exclude certain users
2583# if the default policy is set to allow.
2584alice = {
2585 allow = false
2586}
2587 </screen></para>
2588
2589 <para>Every user who wants to enable autostart for individual machines
2590 has to set the path to the autostart database directory with
2591 <screen>VBoxManage setproperty autostartdbpath &lt;Autostart directory&gt;</screen>
2592 </para>
2593 </sect2>
2594
2595 <sect2 id="autostart-solaris">
2596 <title>Solaris: starting the autostart service via SMF</title>
2597
2598 <para>On Solaris hosts, the VirtualBox autostart daemon is
2599 integrated into the SMF framework. To enable it you have to point the service
2600 to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />):
2601 <screen>svccfg -s svc:/application/virtualbox/autostart:default setprop config/config=/etc/vbox/autostart.cfg</screen>
2602 </para>
2603
2604 <para>When everything is configured correctly you can start the
2605 VirtualBox autostart service with the following command:<screen>svcadm enable svc:/application/virtualbox/autostart:default</screen></para>
2606
2607 <para>For more information about SMF, please refer to the Solaris
2608 documentation.</para>
2609 </sect2>
2610
2611 <sect2 id="autostart-osx">
2612 <title>Mac OS X: starting the autostart service via launchd</title>
2613
2614 <para>On Mac OS X, launchd is used to start the VirtualBox autostart service. An
2615 example configuration file can be found in
2616 <computeroutput>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</computeroutput>.
2617 To enable the service copy the file to <computeroutput>/Library/LaunchDaemons</computeroutput> and change the
2618 <computeroutput>Disabled</computeroutput> key from
2619 <computeroutput>true</computeroutput> to
2620 <computeroutput>false</computeroutput>. Furthermore replace the second parameter
2621 to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />).
2622 To manually start the service use the following command:
2623 <screen>launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
2624 For additional information on how launchd services could be
2625 configured see <literal><ulink
2626 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>
2627 </sect2>
2628 </sect1>
2629</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