VirtualBox

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

Last change on this file since 34531 was 34531, checked in by vboxsync, 14 years ago

Manual: document 4.0 file format/location changes in detail

File size: 80.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4<chapter id="AdvancedTopics">
5 <title>Advanced topics</title>
6
7 <sect1 id="vboxconfigdata">
8 <title>Where VirtualBox stores its files</title>
9
10 <para>In VirtualBox, a virtual machine and its settings are described in a
11 virtual machine settings file in XML format. In addition, most virtual
12 machine have one or more virtual hard disks, which are typically
13 represented by disk images (e.g. in VDI format). Where all these files are
14 stored depends on which version of VirtualBox created the machine.</para>
15
16 <sect2>
17 <title>Machines created by VirtualBox version 4.0 or later</title>
18
19 <para>Starting with version 4.0, by default, each virtual machine has
20 one directory on your host computer where all the files of that machine
21 are stored -- the XML settings file (with a
22 <computeroutput>.vbox</computeroutput> file extension) and its disk
23 images.</para>
24
25 <para>By default, this "machine folder" is placed in a shared folder
26 called "VirtualBox VMs", which VirtualBox creates in the current system
27 user's home directory, as per the conventions of the host operating
28 system:</para>
29
30 <itemizedlist>
31 <listitem>
32 <para>On Windows, this is
33 <computeroutput>%HOMEDRIVE%%HOMEPATH%</computeroutput>; typically
34 something like <computeroutput>C:\Documents and
35 Settings\Username\</computeroutput>.</para>
36 </listitem>
37
38 <listitem>
39 <para>On Mac OS X, this is
40 <computeroutput>/Users/username</computeroutput>.</para>
41 </listitem>
42
43 <listitem>
44 <para>On Linux and Solaris, this is
45 <computeroutput>/home/username</computeroutput>.</para>
46 </listitem>
47 </itemizedlist>
48
49 <para>For simplicity, we will abbreviate this as
50 <computeroutput>$HOME</computeroutput> below. Using that convention, the
51 shared folder for all virtual machines is
52 <computeroutput>$HOME/VirtualBox VMs</computeroutput>.</para>
53
54 <para>As an example, if you have created a virtual machine called
55 "Example VM", you will find that VirtualBox has created<orderedlist>
56 <listitem>
57 <para>the folder <computeroutput>$HOME/VirtualBox VMs/Example
58 VM/</computeroutput> and, in that folder, </para>
59 </listitem>
60
61 <listitem>
62 <para>the settings file <computeroutput>Example
63 VM.vbox</computeroutput> and</para>
64 </listitem>
65
66 <listitem>
67 <para>the virtual disk image <computeroutput>Example
68 VM.vdi</computeroutput>.</para>
69 </listitem>
70 </orderedlist></para>
71
72 <para>This is the default layout if you use the "Create new virtual
73 machine" wizard as described in <xref linkend="gui-createvm" />. Once
74 you start working with the VM, additional files will show up: you will
75 find log files in a subfolder called
76 <computeroutput>Logs</computeroutput>, and once you have taken
77 snapshots, they will appear in a
78 <computeroutput>Snapshots</computeroutput> subfolder. For each VM, you
79 can change the location of its snapsnots folder in the VM
80 settings.</para>
81
82 <para>You can change the default machine folder by selecting
83 "Preferences" from the "File" menu in the VirtualBox main window. Then,
84 in the window that pops up, click on the "General" tab. Alternatively,
85 use VBoxManage setproperty machinefolder; see <xref
86 linkend="vboxmanage-setproperty" />.</para>
87 </sect2>
88
89 <sect2>
90 <title>Machines created by VirtualBox versions before 4.0</title>
91
92 <para>If you have upgraded to VirtualBox 4.0 from an earlier version of
93 VirtualBox, you probably have settings files and disks in the earlier
94 file system layout.</para>
95
96 <para>Before version 4.0, VirtualBox separated the machine settings
97 files from virtual disk images. The machine settings files had an
98 <computeroutput>.xml</computeroutput> file extension and resided in a
99 folder called "Machines" under the VirtualBox configuration directory
100 (see the next section). So, for example, on Linux, this was the hidden
101 <computeroutput>$HOME/.VirtualBox/Machines</computeroutput> directory.
102 The default hard disks folder was called "HardDisks" and resided in the
103 <computeroutput>.VirtualBox</computeroutput> folder as well, but that
104 could be changed by the user in the global preferences. (The concept of
105 a "default hard disk folder" has been abandoned with VirtualBox 4.0,
106 since disk images now reside in each machine's folder by
107 default.)</para>
108
109 <para>The old layout had several severe disadvantages.<orderedlist>
110 <listitem>
111 <para>It was very difficult to move a virtual machine from one
112 host to another because the files involved did not reside in the
113 same folder. In addition, the virtual media of all machines were
114 registered with a global registry in the central VirtualBox
115 settings file
116 (<computeroutput>$HOME/.VirtualBox/VirtualBox.xml</computeroutput>).
117 </para>
118
119 <para>To move a machine to another host, it was therefore not
120 enough to move the XML settings file and the disk images (which
121 were in different locations), but the hard disk entries from the
122 global media registry XML had to be meticulously copied as well,
123 which was close to impossible if the machine had snapshots and
124 therefore differencing images.</para>
125 </listitem>
126
127 <listitem>
128 <para>Storing virtual disk images, which can grow very large,
129 under the hidden <computeroutput>.VirtualBox</computeroutput>
130 directory (at least on Linux and Solaris hosts) made many users
131 wonder where their disk space had gone.</para>
132 </listitem>
133 </orderedlist></para>
134
135 <para>Whereas new VMs created with VirtualBox 4.0 or later will conform
136 to the new layout, for maximum compatibility, old VMs are
137 <emphasis>not</emphasis> converted to the new layout. Otherwise machine
138 settings would be irrevocably broken if a user downgraded from 4.0 back
139 to an older version of VirtualBox.</para>
140 </sect2>
141
142 <sect2>
143 <title>Global configuration data</title>
144
145 <para>In addition to the files of the virtual machines, VirtualBox
146 maintains global configuration data. On Windows, Linux and Solaris, this
147 is <computeroutput>$HOME/.VirtualBox</computeroutput> (which makes it
148 hidden on Linux and Solaris), whereas on a Mac this resides in
149 <computeroutput>$HOME/Library/VirtualBox</computeroutput>.</para>
150
151 <para>VirtualBox creates this configuration directory automatically, if
152 necessary. Optionally, you can supply an alternate configuration
153 directory by setting the
154 <computeroutput><literal>VBOX_USER_HOME</literal></computeroutput>
155 environment variable.</para>
156
157 <para>Most importantly, in this directory, VirtualBox stores its global
158 settings file, another XML file called
159 <computeroutput>VirtualBox.xml</computeroutput>. This includes global
160 configuration options and the list of registered virtual machines with
161 pointers to their XML settings files. (Neither the location of this file
162 nor its directory has changed with VirtualBox 4.0.)</para>
163
164 <para>Before VirtualBox 4.0, all virtual media (disk image files) were
165 also contained in a global registry in this settings file. For
166 compatibility, this media registry still exists if you upgrade
167 VirtualBox and there are media from machines which were created with a
168 version before 4.0. If you have no such machines, then there will be no
169 global media registry; with VirtualBox 4.0, each machine XML file has
170 its own media registry.</para>
171
172 <para>Also before VirtualBox 4.0, the default "Machines" folder and the
173 default "HardDisks" folder were subdirectories of the VirtualBox
174 configuration directory (e.g.
175 <computeroutput>$HOME/.VirtualBox/Machines</computeroutput> on Linux).
176 If you are upgrading from a VirtualBox version before 4.0, files in
177 these directories are not automatically moved in order not to break
178 backwards compatibility.</para>
179 </sect2>
180
181 <sect2>
182 <title>Summary of 4.0 configuration changes</title>
183
184 <table>
185 <title>ignoreme</title>
186
187 <tgroup cols="3">
188 <tbody>
189 <row>
190 <entry></entry>
191
192 <entry>Before 4.0</entry>
193
194 <entry>4.0 or above</entry>
195 </row>
196
197 <row>
198 <entry>Default machines folder</entry>
199
200 <entry><computeroutput>$HOME/.VirtualBox/Machines</computeroutput></entry>
201
202 <entry><computeroutput>$HOME/VirtualBox
203 VMs</computeroutput></entry>
204 </row>
205
206 <row>
207 <entry>Default disk image location</entry>
208
209 <entry><computeroutput>$HOME/.VirtualBox/HardDisks</computeroutput></entry>
210
211 <entry>In each machine's folder</entry>
212 </row>
213
214 <row>
215 <entry>Machine settings file extension</entry>
216
217 <entry><computeroutput>.xml</computeroutput></entry>
218
219 <entry><computeroutput>.vbox</computeroutput></entry>
220 </row>
221
222 <row>
223 <entry>Media registry</entry>
224
225 <entry>Global <computeroutput>VirtualBox.xml</computeroutput>
226 file</entry>
227
228 <entry>Each machine settings file</entry>
229 </row>
230
231 <row>
232 <entry>Media registration</entry>
233
234 <entry>Explicit open/close required</entry>
235
236 <entry>Automatic on attach</entry>
237 </row>
238 </tbody>
239 </tgroup>
240 </table>
241 </sect2>
242
243 <sect2>
244 <title>VirtualBox XML files</title>
245
246 <para>VirtualBox uses XML for both the machine settings files and the
247 global configuration file,
248 <computeroutput>VirtualBox.xml</computeroutput>. </para>
249
250 <para>All VirtualBox XML files are versioned. When a new settings file
251 is created (e.g. because a new virtual machine is created), VirtualBox
252 automatically uses the settings format of the current VirtualBox
253 version. These files may not be readable if you downgrade to an earlier
254 version of VirtualBox. However, when VirtualBox encounters a settings
255 file from an earlier version (e.g. after upgrading VirtualBox), it
256 attempts to preserve the settings format as much as possible. It will
257 only silently upgrade the settings format if the current settings cannot
258 be expressed in the old format, for example because you enabled a
259 feature that was not present in an earlier version of
260 VirtualBox.<footnote>
261 <para>As an example, before VirtualBox 3.1, it was only possible to
262 enable or disable a single DVD drive in a virtual machine. If it was
263 enabled, then it would always be visible as the secondary master of
264 the IDE controller. With VirtualBox 3.1, DVD drives can be attached
265 to arbitrary slots of arbitrary controllers, so they could be the
266 secondary slave of an IDE controller or in a SATA slot. If you have
267 a machine settings file from an earlier version and upgrade
268 VirtualBox to 3.1 and then move the DVD drive from its default
269 position, this cannot be expressed in the old settings format; the
270 XML machine file would get written in the new format, and a backup
271 file of the old format would be kept.</para>
272 </footnote> In such cases, VirtualBox backs up the old settings file
273 in the virtual machine's configuration directory. If you need to go back
274 to the earlier version of VirtualBox, then you will need to manually
275 copy these backup files back.</para>
276
277 <para>We intentionally do not document the specifications of the
278 VirtualBox XML files, as we must reserve the right to modify them in the
279 future. We therefore strongly suggest that you do not edit these files
280 manually. VirtualBox provides complete access to its configuration data
281 through its the <computeroutput>VBoxManage</computeroutput> command line
282 tool (see <xref linkend="vboxmanage" />) and its API (see <xref
283 linkend="VirtualBoxAPI" />).</para>
284 </sect2>
285 </sect1>
286
287 <sect1 id="vboxsdl">
288 <title>VBoxSDL, the simplified VM displayer</title>
289
290 <sect2>
291 <title>Introduction</title>
292
293 <para>VBoxSDL is a simple graphical user interface (GUI) that lacks the
294 nice point-and-click support which VirtualBox, our main GUI, provides.
295 VBoxSDL is currently primarily used internally for debugging VirtualBox
296 and therefore not officially supported. Still, you may find it useful
297 for environments where the virtual machines are not necessarily
298 controlled by the same person that uses the virtual machine.<note>
299 <para>VBoxSDL is not available on the Mac OS X host platform.</para>
300 </note></para>
301
302 <para>As you can see in the following screenshot, VBoxSDL does indeed
303 only provide a simple window that contains only the "pure" virtual
304 machine, without menus or other controls to click upon and no additional
305 indicators of virtual machine activity:</para>
306
307 <para><mediaobject>
308 <imageobject>
309 <imagedata align="center" fileref="images/vbox-sdl.png"
310 width="10cm" />
311 </imageobject>
312 </mediaobject></para>
313
314 <para>To start a virtual machine with VBoxSDL instead of the VirtualBox
315 GUI, enter the following on a command line:<screen>VBoxSDL --startvm &lt;vm&gt;</screen></para>
316
317 <para>where <computeroutput>&lt;vm&gt;</computeroutput> is, as usual
318 with VirtualBox command line parameters, the name or UUID of an existing
319 virtual machine.</para>
320 </sect2>
321
322 <sect2>
323 <title>Secure labeling with VBoxSDL</title>
324
325 <para>When running guest operating systems in fullscreen mode, the guest
326 operating system usually has control over the whole screen. This could
327 present a security risk as the guest operating system might fool the
328 user into thinking that it is either a different system (which might
329 have a higher security level) or it might present messages on the screen
330 that appear to stem from the host operating system.</para>
331
332 <para>In order to protect the user against the above mentioned security
333 risks, the secure labeling feature has been developed. Secure labeling
334 is currently available only for VBoxSDL. When enabled, a portion of the
335 display area is reserved for a label in which a user defined message is
336 displayed. The label height in set to 20 pixels in VBoxSDL. The label
337 font color and background color can be optionally set as hexadecimal RGB
338 color values. The following syntax is used to enable secure
339 labeling:</para>
340
341 <screen>VBoxSDL --startvm "VM name"
342 --securelabel --seclabelfnt ~/fonts/arial.ttf
343 --seclabelsiz 14 --seclabelfgcol 00FF00 --seclabelbgcol 00FFFF</screen>
344
345 <para>In addition to enabling secure labeling, a TrueType font has to be
346 supplied. To use another font size than 12 point use the parameter
347 <computeroutput>--seclabelsiz</computeroutput>.</para>
348
349 <para>The label text can be set with <screen>VBoxManage setextradata "VM name" "VBoxSDL/SecureLabel" "The Label"</screen>
350 Changing this label will take effect immediately.</para>
351
352 <para>Typically, full screen resolutions are limited to certain
353 "standard" geometries such as 1024 x 768. Increasing this by twenty
354 lines is not usually feasible, so in most cases, VBoxSDL will chose the
355 next higher resolution, e.g. 1280 x 1024 and the guest's screen will not
356 cover the whole display surface. If VBoxSDL is unable to choose a higher
357 resolution, the secure label will be painted on top of the guest's
358 screen surface. In order to address the problem of the bottom part of
359 the guest screen being hidden, VBoxSDL can provide custom video modes to
360 the guest that are reduced by the height of the label. For Windows
361 guests and recent Solaris and Linux guests, the VirtualBox Guest
362 Additions automatically provide the reduced video modes. Additionally,
363 the VESA BIOS has been adjusted to duplicate its standard mode table
364 with adjusted resolutions. The adjusted mode IDs can be calculated using
365 the following formula:</para>
366
367 <screen>reduced_modeid = modeid + 0x30</screen>
368
369 <para>For example, in order to start Linux with 1024 x 748 x 16, the
370 standard mode 0x117 (1024 x 768 x 16) is used as a base. The Linux video
371 mode kernel parameter can then be calculated using:</para>
372
373 <screen>vga = 0x200 | 0x117 + 0x30
374vga = 839</screen>
375
376 <para>The reason for duplicating the standard modes instead of only
377 supplying the adjusted modes is that most guest operating systems
378 require the standard VESA modes to be fixed and refuse to start with
379 different modes.</para>
380
381 <para>When using the X.org VESA driver, custom modelines have to be
382 calculated and added to the configuration (usually in
383 <literal>/etc/X11/xorg.conf</literal>. A handy tool to determine
384 modeline entries can be found at <literal><ulink
385 url="http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html">http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html</ulink></literal>.)</para>
386 </sect2>
387
388 <sect2>
389 <title>Releasing modifiers with VBoxSDL on Linux</title>
390
391 <para>When switching from a X virtual terminal (VT) to another VT using
392 Ctrl-Alt-Fx while the VBoxSDL window has the input focus, the guest will
393 receive Ctrl and Alt keypress events without receiving the corresponding
394 key release events. This is an architectural limitation of Linux. In
395 order to reset the modifier keys, it is possible to send
396 <computeroutput>SIGUSR1</computeroutput> to the VBoxSDL main thread
397 (first entry in the <computeroutput>ps</computeroutput> list). For
398 example, when switching away to another VT and saving the virtual
399 machine from this terminal, the following sequence can be used to make
400 sure the VM is not saved with stuck modifiers:</para>
401
402 <para><screen>kill -usr1 &lt;pid&gt;
403VBoxManage controlvm "Windows 2000" savestate</screen></para>
404 </sect2>
405 </sect1>
406
407 <sect1>
408 <title id="autologon">Automated guest logons</title>
409
410 <para>VirtualBox provides Guest Addition modules for Windows, Linux and
411 Solaris to enable automated logons on the guest.</para>
412
413 <para>When a guest operating system is running in a virtual machine, it
414 might be desirable to perform coordinated and automated logons using
415 credentials from a master logon system. (With "credentials", we are
416 referring to logon information consisting of user name, password and
417 domain name, where each value might be empty.)</para>
418
419 <sect2 id="autologon_win">
420 <title>Automated Windows guest logons</title>
421
422 <para>Since Windows NT, Windows has provided a modular system logon
423 subsystem ("Winlogon") which can be customized and extended by means of
424 so-called GINA modules (Graphical Identification and Authentication).
425 With Windows Vista and Windows 7, the GINA modules were replaced with a
426 new mechanism called "credential providers". The VirtualBox Guest
427 Additions for Windows come with both, a GINA and a credential provider
428 module, and therefore enable any Windows guest to perform automated
429 logons.</para>
430
431 <para>To activate the VirtualBox GINA or credential provider module,
432 install the Guest Additions with using the command line switch
433 <computeroutput>/with_autologon</computeroutput>. All the following
434 manual steps required for installing these modules will be then done by
435 the installer.</para>
436
437 <para>To manually install the VirtualBox GINA module, extract the Guest
438 Additions (see <xref linkend="windows-guest-file-extraction" />) and
439 copy the file <computeroutput>VBoxGINA.dll</computeroutput> to the
440 Windows <computeroutput>SYSTEM32</computeroutput> directory. Then, in
441 the registry, create the following key: <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL</screen>
442 with a value of <computeroutput>VBoxGINA.dll</computeroutput>.</para>
443
444 <note>
445 <para>The VirtualBox GINA module is implemented as a wrapper around
446 the standard Windows GINA module
447 (<computeroutput>MSGINA.DLL</computeroutput>). As a result, it will
448 most likely not work correctly with 3rd party GINA modules.</para>
449 </note>
450
451 <para>To manually install the VirtualBox credential module, extract the
452 Guest Additions (see <xref linkend="windows-guest-file-extraction" />)
453 and copy the file <computeroutput>VBoxCredProv.dll</computeroutput> to
454 the Windows <computeroutput>SYSTEM32</computeroutput> directory. Then,
455 in the registry, create the following keys:<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
456 Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
457
458HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
459
460HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32</screen></para>
461
462 <para>with all default values (the key named
463 <computeroutput>(Default)</computeroutput> in each key) set to
464 <computeroutput>VBoxCredProv</computeroutput>. After that a new string
465 named <screen>HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel</screen>
466 with a value of <computeroutput>Apartment</computeroutput> has to be
467 created.</para>
468
469 <para>To set credentials, use the following command on a
470 <emphasis>running</emphasis> VM:</para>
471
472 <screen>VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST"</screen>
473
474 <para>While the VM is running, the credentials can be queried by the
475 VirtualBox logon modules (GINA or credential provider) using the
476 VirtualBox Guest Additions device driver. When Windows is in "logged
477 out" mode, the logon modules will constantly poll for credentials and if
478 they are present, a logon will be attempted. After retrieving the
479 credentials, the logon modules will erase them so that the above command
480 will have to be repeated for subsequent logons.</para>
481
482 <para>For security reasons, credentials are not stored in any persistent
483 manner and will be lost when the VM is reset. Also, the credentials are
484 "write-only", i.e. there is no way to retrieve the credentials from the
485 host side. Credentials can be reset from the host side by setting empty
486 values.</para>
487
488 <para>Depending on the particular variant of the Windows guest, the
489 following restrictions apply: <orderedlist>
490 <listitem>
491 <para>For <emphasis role="bold">Windows XP guests,</emphasis> the
492 logon subsystem needs to be configured to use the classic logon
493 dialog as the VirtualBox GINA module does not support the XP-style
494 welcome dialog.</para>
495 </listitem>
496
497 <listitem>
498 <para>For <emphasis role="bold">Windows Vista and Windows 7
499 guests,</emphasis> the logon subsystem does not support the
500 so-called Secure Attention Sequence
501 (<computeroutput>CTRL+ALT+DEL</computeroutput>). As a result, the
502 guest's group policy settings need to be changed to not use the
503 Secure Attention Sequence. Also, the user name given is only
504 compared to the true user name, not the user friendly name. This
505 means that when you rename a user, you still have to supply the
506 original user name (internally, Windows never renames user
507 accounts).</para>
508 </listitem>
509 </orderedlist></para>
510
511 <para>The following command forces VirtualBox to keep the credentials
512 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
513 that this is a potential security risk as a malicious application
514 running on the guest could request this information using the proper
515 interface.</para>
516 </sect2>
517
518 <sect2 id="autologon_unix">
519 <title>Automated Linux/Unix guest logons</title>
520
521 <para>Starting with version 3.2, VirtualBox provides a custom PAM module
522 (Pluggable Authentication Module) which can be used to perform automated
523 guest logons on platforms which support this framework. Virtually all
524 modern Linux/Unix distributions rely on PAM.</para>
525
526 <para>The <computeroutput>pam_vbox.so</computeroutput> module itself
527 <emphasis role="bold">does not</emphasis> do an actual verification of
528 the credentials passed to the guest OS; instead it relies on other
529 modules such as <computeroutput>pam_unix.so</computeroutput> or
530 <computeroutput>pam_unix2.so</computeroutput> down in the PAM stack to
531 do the actual validation using the credentials retrieved by
532 <computeroutput>pam_vbox.so</computeroutput>. Therefore
533 <computeroutput>pam_vbox.so</computeroutput> has to be on top of the
534 authentication PAM service list.</para>
535
536 <note>
537 <para>The <computeroutput>pam_vbox.so</computeroutput> only supports
538 the <computeroutput>auth</computeroutput> primitive. Other primitives
539 such as <computeroutput>account</computeroutput>,
540 <computeroutput>session</computeroutput> or
541 <computeroutput>password</computeroutput> are not supported.</para>
542 </note>
543
544 <para>The <computeroutput>pam_vbox.so</computeroutput> module is shipped
545 as part of the Guest Additions but it is not installed and/or activated
546 on the guest OS by default. In order to install it, it has to be copied
547 from
548 <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions/</computeroutput>
549 to the security modules directory, usually
550 <computeroutput>/lib/security/</computeroutput>. Please refer to your
551 guest OS documentation for the correct PAM module directory.</para>
552
553 <para>For example, to use <computeroutput>pam_vbox.so</computeroutput>
554 with a Ubuntu Linux guest OS and GDM (the GNOME Desktop Manager) to
555 logon users automatically with the credentials passed by the host, the
556 guest OS has to be configured like the following:</para>
557
558 <orderedlist>
559 <listitem>
560 <para>The <computeroutput>pam_vbox.so</computeroutput> module has to
561 be copied to the security modules directory, in this case it is
562 <computeroutput>/lib/security</computeroutput>.</para>
563 </listitem>
564
565 <listitem>
566 <para>Edit the PAM configuration file for GDM found at
567 <computeroutput>/etc/pam.d/gdm</computeroutput>, adding the line
568 <computeroutput>auth requisite pam_vbox.so</computeroutput> at the
569 top. Additionaly, in most Linux distributions there is a file called
570 <computeroutput>/etc/pam.d/common-auth</computeroutput>. This file
571 is included in many other services (like the GDM file mentioned
572 above). There you also have to add add the line <computeroutput>auth
573 requisite pam_vbox.so</computeroutput>.</para>
574 </listitem>
575
576 <listitem>
577 <para>If authentication against the shadow database using
578 <computeroutput>pam_unix.so</computeroutput> or
579 <computeroutput>pam_unix2.so</computeroutput> is desired, the
580 argument <computeroutput>try_first_pass</computeroutput> is needed
581 in order to pass the credentials from the VirtualBox module to the
582 shadow database authentication module. For Ubuntu, this needs to be
583 added to <computeroutput>/etc/pam.d/common-auth</computeroutput>, to
584 the end of the line referencing
585 <computeroutput>pam_unix.so</computeroutput>. This argument tells
586 the PAM module to use credentials already present in the stack, i.e.
587 the ones provided by the VirtualBox PAM module.</para>
588 </listitem>
589 </orderedlist>
590
591 <para><warning>
592 <para>An incorrectly configured PAM stack can effectively prevent
593 you from logging into your guest system!</para>
594 </warning></para>
595
596 <para>To make deployment easier, you can pass the argument
597 <computeroutput>debug</computeroutput> right after the
598 <computeroutput>pam_vbox.so</computeroutput> statement. Debug log output
599 will then be recorded using syslog.</para>
600
601 <para><warning>
602 <para>At present, the GDM display manager only retrieves credentials
603 at startup so unless the credentials have been supplied to the guest
604 before GDM starts, automatic logon will not work. This limitation
605 needs to be addressed by the GDM developers or another display
606 manager must be used.</para>
607 </warning></para>
608 </sect2>
609 </sect1>
610
611 <sect1>
612 <title>Advanced configuration for Windows guests</title>
613
614 <sect2 id="sysprep">
615 <title>Automated Windows system preparation</title>
616
617 <para>Beginning with Windows NT 4.0, Microsoft offers a "system
618 preparation" tool (in short: Sysprep) to prepare a Windows system for
619 deployment or redistribution. Whereas Windows 2000 and XP ship with
620 Sysprep on the installation medium, the tool also is available for
621 download on the Microsoft web site. In a standard installation of
622 Windows Vista and 7, Sysprep is already included. Sysprep mainly
623 consists of an executable called
624 <computeroutput>sysprep.exe</computeroutput> which is invoked by the
625 user to put the Windows installation into preparation mode.</para>
626
627 <para>Starting with VirtualBox 3.2.2, the Guest Additions offer a way to
628 launch a system preparation on the guest operating system in an
629 automated way, controlled from the host system. To achieve that, see
630 <xref linkend="guestadd-guestcontrol" /> for using the feature with the
631 special identifier <computeroutput>sysprep</computeroutput> as the
632 program to execute, along with the user name
633 <computeroutput>sysprep</computeroutput> and password
634 <computeroutput>sysprep</computeroutput> for the credentials. Sysprep
635 then gets launched with the required system rights.</para>
636
637 <note>
638 <para>Specifying the location of "sysprep.exe" is <emphasis
639 role="bold">not possible</emphasis> -- instead the following paths are
640 used (based on the operating system): <itemizedlist>
641 <listitem>
642 <para><computeroutput>C:\sysprep\sysprep.exe</computeroutput>
643 for Windows NT 4.0, 2000 and XP</para>
644 </listitem>
645
646 <listitem>
647 <para><computeroutput>%WINDIR%\System32\Sysprep\sysprep.exe</computeroutput>
648 for Windows Vista, 2008 Server and 7</para>
649 </listitem>
650 </itemizedlist> The Guest Additions will automatically use the
651 appropriate path to execute the system preparation tool.</para>
652 </note>
653 </sect2>
654 </sect1>
655
656 <sect1 id="cpuhotplug">
657 <title>CPU hot-plugging</title>
658
659 <para>With virtual machines running modern server operating systems,
660 VirtualBox supports CPU hot-plugging.<footnote>
661 <para>Support for CPU hot-plugging was introduced with VirtualBox
662 3.2.</para>
663 </footnote> Whereas on a physical computer this would mean that a CPU
664 can be added or removed while the machine is running, VirtualBox supports
665 adding and removing virtual CPUs while a virtual machine is
666 running.</para>
667
668 <para>CPU hot-plugging works only with guest operating systems that
669 support it. So far this applies only to Linux and Windows Server 2008 x64
670 Data Center Edition. Windows supports only hot-add while Linux supports
671 hot-add and hot-remove but to use this feature with more than 8 CPUs a
672 64bit Linux guest is required.</para>
673
674 <para>At this time, CPU hot-plugging requires using the VBoxManage
675 command-line interface. First, hot-plugging needs to be enabled for a
676 virtual machine:<screen>VBoxManage modifyvm "VM name" --cpuhotplug on</screen></para>
677
678 <para>After that, the --cpus option specifies the maximum number of CPUs
679 that the virtual machine can have:<screen>VBoxManage modifyvm "VM name" --cpus 8</screen>When
680 the VM is off, you can then add and remove virtual CPUs with the modifyvm
681 --plugcpu and --unplugcpu subcommands, which take the number of the
682 virtual CPU as a parameter, like this:<screen>VBoxManage modifyvm "VM name" --plugcpu 3
683VBoxManage modifyvm "VM name" --unplugcpu 3</screen>Note that CPU 0 can never
684 be removed.</para>
685
686 <para>While the VM is running, CPUs can be added with the
687 <computeroutput>controlvm plugcpu/unplugcpu</computeroutput> commands
688 instead:<screen>VBoxManage controlvm "VM name" plugcpu 3
689VBoxManage controlvm "VM name" unplugcpu 3</screen></para>
690
691 <para>See <xref linkend="vboxmanage-modifyvm" /> and <xref
692 linkend="vboxmanage-controlvm" /> for details.</para>
693
694 <para>With Linux guests, the following applies: To prevent ejection while
695 the CPU is still used it has to be ejected from within the guest before.
696 The Linux Guest Additions contain a service which receives hot-remove
697 events and ejects the CPU. Also, after a CPU is added to the VM it is not
698 automatically used by Linux. The Linux Guest Additions service will take
699 care of that if installed. If not a CPU can be started with the following
700 command:<screen>echo 1 &gt; /sys/devices/system/cpu/cpu&lt;id&gt;/online</screen></para>
701 </sect1>
702
703 <sect1>
704 <title>Advanced display configuration</title>
705
706 <sect2>
707 <title>Custom VESA resolutions</title>
708
709 <para>Apart from the standard VESA resolutions, the VirtualBox VESA BIOS
710 allows you to add up to 16 custom video modes which will be reported to
711 the guest operating system. When using Windows guests with the
712 VirtualBox Guest Additions, a custom graphics driver will be used
713 instead of the fallback VESA solution so this information does not
714 apply.</para>
715
716 <para>Additional video modes can be configured for each VM using the
717 extra data facility. The extra data key is called
718 <literal>CustomVideoMode&lt;x&gt;</literal> with <literal>x</literal>
719 being a number from 1 to 16. Please note that modes will be read from 1
720 until either the following number is not defined or 16 is reached. The
721 following example adds a video mode that corresponds to the native
722 display resolution of many notebook computers:</para>
723
724 <screen>VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</screen>
725
726 <para>The VESA mode IDs for custom video modes start at
727 <literal>0x160</literal>. In order to use the above defined custom video
728 mode, the following command line has be supplied to Linux:</para>
729
730 <screen>vga = 0x200 | 0x160
731vga = 864</screen>
732
733 <para>For guest operating systems with VirtualBox Guest Additions, a
734 custom video mode can be set using the video mode hint feature.</para>
735 </sect2>
736
737 <sect2>
738 <title>Configuring the maximum resolution of guests when using the
739 graphical frontend</title>
740
741 <para>When guest systems with the Guest Additions installed are started
742 using the graphical frontend (the normal VirtualBox application), they
743 will not be allowed to use screen resolutions greater than the host's
744 screen size unless the user manually resizes them by dragging the
745 window, switching to fullscreen or seamless mode or sending a video mode
746 hint using VBoxManage. This behavior is what most users will want, but
747 if you have different needs, it is possible to change it by issuing one
748 of the following commands from the command line:</para>
749
750 <screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
751
752 <para>will remove all limits on guest resolutions.</para>
753
754 <screen>VBoxManage setextradata global GUI/MaxGuestResolution &gt;width,height&lt;</screen>
755
756 <para>manually specifies a maximum resolution.</para>
757
758 <screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
759
760 <para>restores the default settings. Note that these settings apply
761 globally to all guest systems, not just to a single machine.</para>
762 </sect2>
763
764 <sect2 id="vbox-authenticate-sdk">
765 <title>Custom external authentication modules</title>
766
767 <para>As described in <xref linkend="vbox-auth" />, VirtualBox supports
768 arbitrary external modules to perform authentication. When the
769 authentication method is set to "external" for a particular VM,
770 VirtualBox calls the library that was specified with
771 <computeroutput>VBoxManage setproperty vrdeauthlibrary</computeroutput>.
772 This library will be loaded by the VM process on demand, i.e. when the
773 first RDP connection is made by an external client.</para>
774
775 <para>External authentication is the most flexible as the external
776 handler can both choose to grant access to everyone (like the "null"
777 authentication method would) and delegate the request to the guest
778 authentication component. When delegating the request to the guest
779 component, it will still be called afterwards with the option to
780 override the result.</para>
781
782 <para>An authentication library is required to implement exactly one
783 entry point:</para>
784
785 <screen>#include "VRDPAuth.h"
786
787/**
788 * Authentication library entry point. Decides whether to allow
789 * a client connection.
790 *
791 * Parameters:
792 *
793 * pUuid Pointer to the UUID of the virtual machine
794 * which the client connected to.
795 * guestJudgement Result of the guest authentication.
796 * szUser User name passed in by the client (UTF8).
797 * szPassword Password passed in by the client (UTF8).
798 * szDomain Domain passed in by the client (UTF8).
799 * fLogon Boolean flag. Indicates whether the entry point is called
800 * for a client logon or the client disconnect.
801 * clientId Server side unique identifier of the client.
802 *
803 * Return code:
804 *
805 * VRDPAuthAccessDenied Client access has been denied.
806 * VRDPAuthAccessGranted Client has the right to use the
807 * virtual machine.
808 * VRDPAuthDelegateToGuest Guest operating system must
809 * authenticate the client and the
810 * library must be called again with
811 * the result of the guest
812 * authentication.
813 */
814VRDPAuthResult VRDPAUTHCALL VRDPAuth2(
815 PVRDPAUTHUUID pUuid,
816 VRDPAuthGuestJudgement guestJudgement,
817 const char *szUser,
818 const char *szPassword
819 const char *szDomain
820 int fLogon,
821 unsigned clientId)
822{
823 /* process request against your authentication source of choice */
824 return VRDPAuthAccessGranted;
825}</screen>
826
827 <para>A note regarding the UUID implementation of the first argument:
828 VirtualBox uses a consistent binary representation of UUIDs on all
829 platforms. For this reason the integer fields comprising the UUID are
830 stored as little endian values. If you want to pass such UUIDs to code
831 which assumes that the integer fields are big endian (often also called
832 network byte order), you need to adjust the contents of the UUID to e.g.
833 achieve the same string representation. The required changes
834 are:<itemizedlist>
835 <listitem>
836 <para>reverse the order of byte 0, 1, 2 and 3</para>
837 </listitem>
838
839 <listitem>
840 <para>reverse the order of byte 4 and 5</para>
841 </listitem>
842
843 <listitem>
844 <para>reverse the order of byte 6 and 7.</para>
845 </listitem>
846 </itemizedlist>Using this conversion you will get identical results
847 when converting the binary UUID to the string representation.</para>
848
849 <para>The second arguments contains information about the guest
850 authentication status. For the first call, it is always set to
851 <computeroutput>VRDPAuthGuestNotAsked</computeroutput>. In case the
852 function returns
853 <computeroutput>VRDPAuthDelegateToGuest</computeroutput>, a guest
854 authentication will be attempted and another call to the method is made
855 with its result. This can be either granted / denied or no judgement
856 (the guest component chose for whatever reason to not make a decision).
857 In case there is a problem with the guest authentication module (e.g.
858 the Additions are not installed or not running or the guest did not
859 respond within a timeout), the "not reacted" status will be
860 returned.</para>
861 </sect2>
862 </sect1>
863
864 <sect1>
865 <title>Advanced storage configuration</title>
866
867 <sect2 id="rawdisk">
868 <title>Using a raw host hard disk from a guest</title>
869
870 <para>Starting with version 1.4, as an alternative to using virtual disk
871 images (as described in detail in <xref linkend="storage" />),
872 VirtualBox can also present either entire physical hard disks or
873 selected partitions thereof as virtual disks to virtual machines.</para>
874
875 <para>With VirtualBox, this type of access is called "raw hard disk
876 access"; it allows a guest operating system to access its virtual hard
877 disk without going through the host OS file system. The actual
878 performance difference for image files vs. raw disk varies greatly
879 depending on the overhead of the host file system, whether dynamically
880 growing images are used and on host OS caching strategies. The caching
881 indirectly also affects other aspects such as failure behavior, i.e.
882 whether the virtual disk contains all data written before a host OS
883 crash. Consult your host OS documentation for details on this.</para>
884
885 <para><warning>
886 <para>Raw hard disk access is for expert users only. Incorrect use
887 or use of an outdated configuration can lead to <emphasis
888 role="bold">total loss of data </emphasis>on the physical disk. Most
889 importantly, <emphasis>do not</emphasis> attempt to boot the
890 partition with the currently running host operating system in a
891 guest. This will lead to severe data corruption.</para>
892 </warning></para>
893
894 <para>Raw hard disk access -- both for entire disks and individual
895 partitions -- is implemented as part of the VMDK image format support.
896 As a result, you will need to create a special VMDK image file which
897 defines where the data will be stored. After creating such a special
898 VMDK image, you can use it like a regular virtual disk image. For
899 example, you can use the Virtual Media Manager (<xref linkend="vdis" />)
900 or <computeroutput>VBoxManage</computeroutput> to assign the image to a
901 virtual machine.</para>
902
903 <sect3>
904 <title>Access to entire physical hard disk</title>
905
906 <para>While this variant is the simplest to set up, you must be aware
907 that this will give a guest operating system direct and full access to
908 an <emphasis>entire physical disk</emphasis>. If your
909 <emphasis>host</emphasis> operating system is also booted from this
910 disk, please take special care to not access the partition from the
911 guest at all. On the positive side, the physical disk can be
912 repartitioned in arbitrary ways without having to recreate the image
913 file that gives access to the raw disk.</para>
914
915 <para>To create an image that represents an entire physical hard disk
916 (which will not contain any actual data, as this will all be stored on
917 the physical disk), on a Linux host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
918 -rawdisk /dev/sda</screen>This creates the image
919 <code>/path/to/file.vmdk</code> (must be absolute), and all data will
920 be read and written from <code>/dev/sda</code>.</para>
921
922 <para>On a Windows host, instead of the above device specification,
923 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
924 of the above device specification use e.g. <code>/dev/disk1</code>.
925 Note that on OS X you can only get access to an entire disk if no
926 volume is mounted from it.</para>
927
928 <para>Creating the image requires read/write access for the given
929 device. Read/write access is also later needed when using the image
930 from a virtual machine.</para>
931
932 <para>Just like with regular disk images, this does not automatically
933 register the newly created image in the internal registry of hard
934 disks. If you want this done automatically, add
935 <code>-register</code>: <screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
936 -rawdisk /dev/sda -register</screen>After registering, you can assign
937 the newly created image to a virtual machine with e.g. <screen>VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
938 --port 0 --device 0 --type hdd --medium /path/to/file.vmdk</screen>When
939 this is done the selected virtual machine will boot from the specified
940 physical disk.</para>
941 </sect3>
942
943 <sect3>
944 <title>Access to individual physical hard disk partitions</title>
945
946 <para>This "raw partition support" is quite similar to the "full hard
947 disk" access described above. However, in this case, any partitioning
948 information will be stored inside the VMDK image, so you can e.g.
949 install a different boot loader in the virtual hard disk without
950 affecting the host's partitioning information. While the guest will be
951 able to <emphasis>see</emphasis> all partitions that exist on the
952 physical disk, access will be filtered in that reading from partitions
953 for which no access is allowed the partitions will only yield zeroes,
954 and all writes to them are ignored.</para>
955
956 <para>To create a special image for raw partition support (which will
957 contain a small amount of data, as already mentioned), on a Linux
958 host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
959 -rawdisk /dev/sda -partitions 1,5</screen></para>
960
961 <para>As you can see, the command is identical to the one for "full
962 hard disk" access, except for the additional
963 <computeroutput>-partitions</computeroutput> parameter. This example
964 would create the image <code>/path/to/file.vmdk</code> (which, again,
965 must be absolute), and partitions 1 and 5 of <code>/dev/sda</code>
966 would be made accessible to the guest.</para>
967
968 <para>VirtualBox uses the same partition numbering as your Linux host.
969 As a result, the numbers given in the above example would refer to the
970 first primary partition and the first logical drive in the extended
971 partition, respectively.</para>
972
973 <para>On a Windows host, instead of the above device specification,
974 use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
975 of the above device specification use e.g. <code>/dev/disk1</code>.
976 Note that on OS X you can only use partitions which are not mounted
977 (eject the respective volume first). Partition numbers are the same on
978 Linux, Windows and Mac OS X hosts.</para>
979
980 <para>The numbers for the list of partitions can be taken from the
981 output of<screen>VBoxManage internalcommands listpartitions -rawdisk /dev/sda</screen>The
982 output lists the partition types and sizes to give the user enough
983 information to identify the partitions necessary for the guest.</para>
984
985 <para>Images which give access to individual partitions are specific
986 to a particular host disk setup. You cannot transfer these images to
987 another host; also, whenever the host partitioning changes, the image
988 <emphasis>must be recreated</emphasis>.</para>
989
990 <para>Creating the image requires read/write access for the given
991 device. Read/write access is also later needed when using the image
992 from a virtual machine. If this is not feasible, there is a special
993 variant for raw partition access (currently only available on Linux
994 hosts) that avoids having to give the current user access to the
995 entire disk. To set up such an image, use<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
996 -rawdisk /dev/sda -partitions 1,5 -relative</screen>When used from a
997 virtual machine, the image will then refer not to the entire disk, but
998 only to the individual partitions (in the example
999 <code>/dev/sda1</code> and <code>/dev/sda5</code>). As a consequence,
1000 read/write access is only required for the affected partitions, not
1001 for the entire disk. During creation however, read-only access to the
1002 entire disk is required to obtain the partitioning information.</para>
1003
1004 <para>In some configurations it may be necessary to change the MBR
1005 code of the created image, e.g. to replace the Linux boot loader that
1006 is used on the host by another boot loader. This allows e.g. the guest
1007 to boot directly to Windows, while the host boots Linux from the
1008 "same" disk. For this purpose the
1009 <computeroutput>-mbr</computeroutput> parameter is provided. It
1010 specifies a file name from which to take the MBR code. The partition
1011 table is not modified at all, so a MBR file from a system with totally
1012 different partitioning can be used. An example of this is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1013 -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr</screen>The modified
1014 MBR will be stored inside the image, not on the host disk.</para>
1015
1016 <para>For each of the above variants, you can register the resulting
1017 image for immediate use in VirtualBox by adding
1018 <computeroutput>-register</computeroutput> to the respective command
1019 line. The image will then immediately appear in the list of registered
1020 disk images. An example is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
1021 -rawdisk /dev/sda -partitions 1,5 -relative -register</screen> which
1022 creates an image referring to individual partitions, and registers it
1023 when the image is successfully created.</para>
1024 </sect3>
1025 </sect2>
1026
1027 <sect2 id="changevpd">
1028 <title>Configuring the hard disk vendor product data (VPD)</title>
1029
1030 <para>VirtualBox reports vendor product data for its virtual hard disks
1031 which consist of hard disk serial number, firmware revision and model
1032 number. These can be changed using the following commands:</para>
1033
1034 <screen>VBoxManage setextradata "VM name"
1035 "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
1036VBoxManage setextradata "VM name"
1037 "VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
1038VBoxManage setextradata "VM name"
1039 "VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
1040
1041 <para>The serial number is a 20 byte alphanumeric string, the firmware
1042 revision an 8 byte alphanumeric string and the model number a 40 byte
1043 alphanumeric string. Instead of "Port0" (referring to the first port),
1044 specify the desired SATA hard disk port.</para>
1045
1046 <para>Additional three parameters are needed for CD/DVD drives to report
1047 the vendor product data:</para>
1048
1049 <screen>VBoxManage setextradata "VM name"
1050 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
1051VBoxManage setextradata "VM name"
1052 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
1053VBoxManage setextradata "VM name"
1054 "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
1055
1056 <para>The vendor id is an 8 byte alphanumeric string, the product id an
1057 16 byte alphanumeric string and the revision a 4 byte alphanumeric
1058 string. Instead of "Port0" (referring to the first port), specify the
1059 desired SATA hard disk port.</para>
1060 </sect2>
1061 </sect1>
1062
1063 <sect1>
1064 <title>Launching more than 120 VMs on Solaris hosts</title>
1065
1066 <para>Solaris hosts have a fixed number of IPC semaphores IDs per process
1067 preventing users from starting more than 120 VMs. While trying to launch
1068 more VMs you would be shown a "Cannot create IPC semaphore" error.</para>
1069
1070 <para>In order to run more VMs, you will need to bump the semaphore ID
1071 limit of the VBoxSVC process. Execute as root the
1072 <computeroutput>prctl</computeroutput> command as shown below. The process
1073 ID of VBoxSVC can be obtained using the
1074 <computeroutput>ps</computeroutput> list command.</para>
1075
1076 <para><screen>prctl -r -n project.max-sem-ids -v 2048 &lt;pid-of-VBoxSVC&gt;</screen></para>
1077 </sect1>
1078
1079 <sect1>
1080 <title>Legacy commands for using serial ports</title>
1081
1082 <para>Starting with version 1.4, VirtualBox provided support for virtual
1083 serial ports, which, at the time, was rather complicated to set up with a
1084 sequence of <computeroutput>VBoxManage setextradata</computeroutput>
1085 statements. Since version 1.5, that way of setting up serial ports is no
1086 longer necessary and <emphasis>deprecated.</emphasis> To set up virtual
1087 serial ports, use the methods now described in <xref
1088 linkend="serialports" />.<note>
1089 <para>For backwards compatibility, the old
1090 <computeroutput>setextradata</computeroutput> statements, whose
1091 description is retained below from the old version of the manual, take
1092 <emphasis>precedence</emphasis> over the new way of configuring serial
1093 ports. As a result, if configuring serial ports the new way doesn't
1094 work, make sure the VM in question does not have old configuration
1095 data such as below still active.</para>
1096 </note></para>
1097
1098 <para>The old sequence of configuring a serial port used the following 6
1099 commands:</para>
1100
1101 <screen>VBoxManage setextradata "VM name"
1102 "VBoxInternal/Devices/serial/0/Config/IRQ" 4
1103VBoxManage setextradata "VM name"
1104 "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
1105VBoxManage setextradata "VM name"
1106 "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
1107VBoxManage setextradata "VM name"
1108 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
1109VBoxManage setextradata "VM name"
1110 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
1111VBoxManage setextradata "VM name"
1112 "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1</screen>
1113
1114 <para>This sets up a serial port in the guest with the default settings
1115 for COM1 (IRQ 4, I/O address 0x3f8) and the
1116 <computeroutput>Location</computeroutput> setting assumes that this
1117 configuration is used on a Windows host, because the Windows named pipe
1118 syntax is used. Keep in mind that on Windows hosts a named pipe must
1119 always start with <computeroutput>\\.\pipe\</computeroutput>. On Linux the
1120 same config settings apply, except that the path name for the
1121 <computeroutput>Location</computeroutput> can be chosen more freely. Local
1122 domain sockets can be placed anywhere, provided the user running
1123 VirtualBox has the permission to create a new file in the directory. The
1124 final command above defines that VirtualBox acts as a server, i.e. it
1125 creates the named pipe itself instead of connecting to an already existing
1126 one.</para>
1127 </sect1>
1128
1129 <sect1 id="changenat">
1130 <title>Fine-tuning the VirtualBox NAT engine</title>
1131
1132 <sect2>
1133 <title>Configuring the address of a NAT network interface</title>
1134
1135 <para>In NAT mode, the guest network interface is assigned to the IPv4
1136 range <computeroutput>10.0.x.0/24</computeroutput> by default where
1137 <computeroutput>x</computeroutput> corresponds to the instance of the
1138 NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
1139 is only one NAT instance active. In that case the guest is assigned to
1140 the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
1141 set to <computeroutput>10.0.2.2</computeroutput> and the name server can
1142 be found at <computeroutput>10.0.2.3</computeroutput>.</para>
1143
1144 <para>If, for any reason, the NAT network needs to be changed, this can
1145 be achieved with the following command:</para>
1146
1147 <screen>VBoxManage modifyvm "VM name" --natnet1 "192.168/16"</screen>
1148
1149 <para>This command would reserve the network addresses from
1150 <computeroutput>192.168.0.0</computeroutput> to
1151 <computeroutput>192.168.254.254</computeroutput> for the first NAT
1152 network instance of "VM name". The guest IP would be assigned to
1153 <computeroutput>192.168.0.15</computeroutput> and the default gateway
1154 could be found at <computeroutput>192.168.0.2</computeroutput>.</para>
1155 </sect2>
1156
1157 <sect2 id="nat-adv-tftp">
1158 <title>Configuring the boot server (next server) of a NAT network
1159 interface</title>
1160
1161 <para>For network booting in NAT mode, by default VirtualBox uses a
1162 built-in TFTP server at the IP address 10.0.2.3. This default behavior
1163 should work fine for typical remote-booting scenarios. However, it is
1164 possible to change the boot server IP and the location of the boot image
1165 with the following commands: <screen>VBoxManage modifyvm "VM name" --nattftpserver1 10.0.2.2
1166VBoxManage modifyvm "VM name" --nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen></para>
1167 </sect2>
1168
1169 <sect2 id="nat-adv-settings">
1170 <title>Tuning TCP/IP buffers for NAT</title>
1171
1172 <para>The VirtualBox NAT stack performance is often determined by its
1173 interaction with the host's TCP/IP stack and the size of several buffers
1174 (<computeroutput>SO_RCVBUF</computeroutput> and
1175 <computeroutput>SO_SNDBUF</computeroutput>). For certain setups users
1176 might want to adjust the buffer size for a better performance. This can
1177 by achieved using the following commands (values are in kilobytes and
1178 can range from 8 to 1024): <screen>VBoxManage modifyvm "VM name" --natsettings1 16000,128,128,0,0</screen>
1179 This example illustrates tuning the NAT settings. The first parameter is
1180 the MTU, then the size of the socket's send buffer and the size of the
1181 socket's receive buffer, the initial size of the TCP send window, and
1182 lastly the initial size of the TCP receive window. Note that specifying
1183 zero means fallback to the default value.</para>
1184
1185 <para>Each of these buffers has a default size of 64KB and default MTU
1186 is 1500.</para>
1187 </sect2>
1188
1189 <sect2>
1190 <title>Binding NAT sockets to a specific interface</title>
1191
1192 <para>By default, VirtualBox's NAT engine will route TCP/IP packets
1193 through the default interface assigned by the host's TCP/IP stack. (The
1194 technical reason for this is that the NAT engine uses sockets for
1195 communication.) If, for some reason, you want to change this behavior,
1196 you can tell the NAT engine to bind to a particular IP address instead.
1197 Use the following command: <screen>VBoxManage modifyvm "VM name" --natbindip1 "10.45.0.2"</screen></para>
1198
1199 <para>After this, all outgoing traffic will be sent through the
1200 interface with the IP address 10.45.0.2. Please make sure that this
1201 interface is up and running prior to this assignment.</para>
1202 </sect2>
1203
1204 <sect2 id="nat-adv-dns">
1205 <title>Enabling DNS proxy in NAT mode</title>
1206
1207 <para>The NAT engine by default offers the same DNS servers to the guest
1208 that are configured on the host. In some scenarios, it can be desirable
1209 to hide the DNS server IPs from the guest, for example when this
1210 information can change on the host due to expiring DHCP leases. In this
1211 case, you can tell the NAT engine to act as DNS proxy using the
1212 following command: <screen>VBoxManage modifyvm "VM name" --natdnsproxy1 on</screen></para>
1213 </sect2>
1214
1215 <sect2 id="nat_host_resolver_proxy">
1216 <title>Using the host's resolver as a DNS proxy in NAT mode</title>
1217
1218 <para>For resolving network names, the DHCP server of the NAT engine
1219 offers a list of registered DNS servers of the host. If for some reason
1220 you need to hide this DNS server list and use the host's resolver
1221 settings, thereby forcing the VirtualBox NAT engine to intercept DNS
1222 requests and forward them to host's resolver, use the following command:
1223 <screen>VBoxManage modifyvm "VM name" --natdnshostresolver1 on</screen>
1224 Note that this setting is similar to the DNS proxy mode, however whereas
1225 the proxy mode just forwards DNS requests to the appropriate servers,
1226 the resolver mode will interpret the DNS requests and use the host's DNS
1227 API to query the information and return it to the guest.</para>
1228 </sect2>
1229
1230 <sect2 id="nat-adv-alias">
1231 <title>Configuring aliasing of the NAT engine</title>
1232
1233 <para>By default, the NAT core uses aliasing and uses random ports when
1234 generating an alias for a connection. This works well for the most
1235 protocols like SSH, FTP and so on. Though some protocols might need a
1236 more transparent behavior or may depend on the real port number the
1237 packet was sent from. It is possible to change the NAT mode via the
1238 VBoxManage frontend with the following commands: <screen>VBoxManage modifyvm "VM name" --nataliasmode proxyonly</screen>
1239 and <screen>VBoxManage modifyvm "Linux Guest" --nataliasmode sameports</screen>
1240 The first example disables aliasing and switches NAT into transparent
1241 mode, the second example enforces preserving of port values. These modes
1242 can be combined if necessary.</para>
1243 </sect2>
1244 </sect1>
1245
1246 <sect1 id="changedmi">
1247 <title>Configuring the BIOS DMI information</title>
1248
1249 <para>The DMI data VirtualBox provides to guests can be changed for a
1250 specific VM. Use the following commands to configure the DMI BIOS
1251 information:</para>
1252
1253 <screen>VBoxManage setextradata "VM name"
1254 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
1255VBoxManage setextradata "VM name"
1256 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
1257VBoxManage setextradata "VM name"
1258 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
1259VBoxManage setextradata "VM name"
1260 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
1261VBoxManage setextradata "VM name"
1262 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
1263VBoxManage setextradata "VM name"
1264 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
1265VBoxManage setextradata "VM name"
1266 "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4
1267VBoxManage setextradata "VM name"
1268 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
1269VBoxManage setextradata "VM name"
1270 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
1271VBoxManage setextradata "VM name"
1272 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
1273VBoxManage setextradata "VM name"
1274 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
1275VBoxManage setextradata "VM name"
1276 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
1277VBoxManage setextradata "VM name"
1278 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
1279VBoxManage setextradata "VM name"
1280 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"
1281 "9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
1282
1283 <para>If a DMI string is not set, the default value of VirtualBox is used.
1284 To set an empty string use
1285 <computeroutput>"&lt;EMPTY&gt;"</computeroutput>.</para>
1286
1287 <para>Note that in the above list, all quoted parameters (DmiBIOSVendor,
1288 DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be strings. If
1289 such a string is a valid number, the parameter is treated as number and
1290 the VM will most probably refuse to start with an
1291 <computeroutput>VERR_CFGM_NOT_STRING</computeroutput> error. In that case,
1292 use <computeroutput>"string:&lt;value&gt;"</computeroutput>, for instance
1293 <screen>VBoxManage setextradata "VM name"
1294 "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen></para>
1295
1296 <para>Changing this information can be necessary to provide the DMI
1297 information of the host to the guest to prevent Windows from asking for a
1298 new product key. On Linux hosts the DMI BIOS information can be obtained
1299 with <screen>dmidecode -t0</screen>and the DMI system information can be
1300 obtained with <screen>dmidecode -t1</screen></para>
1301 </sect1>
1302
1303 <sect1>
1304 <title>Fine-tuning timers and time synchronization</title>
1305
1306 <sect2 id="changetscmode">
1307 <title>Configuring the guest time stamp counter (TSC) to reflect guest
1308 execution</title>
1309
1310 <para>By default, VirtualBox keeps all sources of time visible to the
1311 guest synchronized to a single time source, the monotonic host time.
1312 This reflects the assumptions of many guest operating systems, which
1313 expect all time sources to reflect "wall clock" time. In special
1314 circumstances it may be useful however to make the TSC (time stamp
1315 counter) in the guest reflect the time actually spent executing the
1316 guest.</para>
1317
1318 <para>This special TSC handling mode can be enabled on a per-VM basis,
1319 and for best results must be used only in combination with hardware
1320 virtualization. To enable this mode use the following command:</para>
1321
1322 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
1323
1324 <para>To revert to the default TSC handling mode use:</para>
1325
1326 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
1327
1328 <para>Note that if you use the special TSC handling mode with a guest
1329 operating system which is very strict about the consistency of time
1330 sources you may get a warning or error message about the timing
1331 inconsistency. It may also cause clocks to become unreliable with some
1332 guest operating systems depending on they use the TSC.</para>
1333 </sect2>
1334
1335 <sect2 id="warpguest">
1336 <title>Accelerate or slow down the guest clock</title>
1337
1338 <para>For certain purposes it can be useful to accelerate or to slow
1339 down the (virtual) guest clock. This can be achieved as follows:</para>
1340
1341 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
1342
1343 <para>The above example will double the speed of the guest clock
1344 while</para>
1345
1346 <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
1347
1348 <para>will halve the speed of the guest clock. Note that changing the
1349 rate of the virtual clock can confuse the guest and can even lead to
1350 abnormal guest behavior. For instance, a higher clock rate means shorter
1351 timeouts for virtual devices with the result that a slightly increased
1352 response time of a virtual device due to an increased host load can
1353 cause guest failures. Note further that any time synchronization
1354 mechanism will frequently try to resynchronize the guest clock with the
1355 reference clock (which is the host clock if the VirtualBox Guest
1356 Additions are active). Therefore any time synchronization should be
1357 disabled if the rate of the guest clock is changed as described above
1358 (see <xref linkend="changetimesync" />).</para>
1359 </sect2>
1360
1361 <sect2 id="changetimesync">
1362 <title>Tuning the Guest Additions time synchronization
1363 parameters</title>
1364
1365 <para>The VirtualBox Guest Additions ensure that the guest's system time
1366 is synchronized with the host time. There are several parameters which
1367 can be tuned. The parameters can be set for a specific VM using the
1368 following command:</para>
1369
1370 <screen>VBoxManage guestproperty set VM_NAME "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
1371
1372 <para>where <computeroutput>PARAMETER</computeroutput> is one of the
1373 following:</para>
1374
1375 <para><glosslist>
1376 <glossentry>
1377 <glossterm><computeroutput>--timesync-interval</computeroutput></glossterm>
1378
1379 <glossdef>
1380 <para>Specifies the interval at which to synchronize the time
1381 with the host. The default is 10000 ms (10 seconds).</para>
1382 </glossdef>
1383 </glossentry>
1384
1385 <glossentry>
1386 <glossterm><computeroutput>--timesync-min-adjust</computeroutput></glossterm>
1387
1388 <glossdef>
1389 <para>The minimum absolute drift value measured in milliseconds
1390 to make adjustments for. The default is 1000 ms on OS/2 and 100
1391 ms elsewhere.</para>
1392 </glossdef>
1393 </glossentry>
1394
1395 <glossentry>
1396 <glossterm><computeroutput>--timesync-latency-factor</computeroutput></glossterm>
1397
1398 <glossdef>
1399 <para>The factor to multiply the time query latency with to
1400 calculate the dynamic minimum adjust time. The default is 8
1401 times, that means in detail: Measure the time it takes to
1402 determine the host time (the guest has to contact the VM host
1403 service which may take some time), multiply this value by 8 and
1404 do an adjustment only if the time difference between host and
1405 guest is bigger than this value. Don't do any time adjustment
1406 otherwise.</para>
1407 </glossdef>
1408 </glossentry>
1409
1410 <glossentry>
1411 <glossterm><computeroutput>--timesync-max-latency</computeroutput></glossterm>
1412
1413 <glossdef>
1414 <para>The max host timer query latency to accept. The default is
1415 250 ms.</para>
1416 </glossdef>
1417 </glossentry>
1418
1419 <glossentry>
1420 <glossterm><computeroutput>--timesync-set-threshold</computeroutput></glossterm>
1421
1422 <glossdef>
1423 <para>The absolute drift threshold, given as milliseconds where
1424 to start setting the time instead of trying to smoothly adjust
1425 it. The default is 20 minutes.</para>
1426 </glossdef>
1427 </glossentry>
1428
1429 <glossentry>
1430 <glossterm><computeroutput>--timesync-set-start</computeroutput></glossterm>
1431
1432 <glossdef>
1433 <para>Set the time when starting the time sync service.</para>
1434 </glossdef>
1435 </glossentry>
1436
1437 <glossentry>
1438 <glossterm><computeroutput>--timesync-set-on-restore
1439 0|1</computeroutput></glossterm>
1440
1441 <glossdef>
1442 <para>Set the time after the VM was restored from a saved state
1443 when passing 1 as parameter (default). Disable by passing 0. In
1444 the latter case, the time will be adjusted smoothly which can
1445 take a long time.</para>
1446 </glossdef>
1447 </glossentry>
1448 </glosslist></para>
1449
1450 <para>All these parameters can be specified as command line parameters
1451 to VBoxService as well.</para>
1452 </sect2>
1453 </sect1>
1454
1455 <sect1 id="addhostonlysolaris">
1456 <title>Configuring multiple host-only network interfaces on Solaris
1457 hosts</title>
1458
1459 <para>By default VirtualBox provides you with one host-only network
1460 interface. Adding more host-only network interfaces on Solaris hosts
1461 requires manual configuration. Here's how to add two more host-only
1462 network interfaces.</para>
1463
1464 <para>You first need to stop all running VMs and unplumb all existing
1465 "vboxnet" interfaces. Execute the following commands as root:</para>
1466
1467 <screen>ifconfig vboxnet0 unplumb</screen>
1468
1469 <para>Once you make sure all vboxnet interfaces are unplumbed, remove the
1470 driver using:</para>
1471
1472 <para><screen>rem_drv vboxnet</screen>then edit the file
1473 <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
1474 and add a line for the new interfaces:</para>
1475
1476 <para><screen>name="vboxnet" parent="pseudo" instance=1;
1477name="vboxnet" parent="pseudo" instance=2;</screen>Add as many of these lines
1478 as required and make sure "instance" number is uniquely incremented. Next
1479 reload the vboxnet driver using:</para>
1480
1481 <para><screen>add_drv vboxnet</screen>Now plumb all the interfaces using
1482 <computeroutput>ifconfig vboxnetX plumb</computeroutput> (where X can be
1483 0, 1 or 2 in this case) and once plumbed you can then configure the
1484 interface like any other network interface.</para>
1485
1486 <para>To make your newly added interfaces' settings persistent across
1487 reboots you will need to edit the files
1488 <computeroutput>/etc/netmasks</computeroutput>, and if you are using NWAM
1489 <computeroutput>/etc/nwam/llp</computeroutput> and add the appropriate
1490 entries to set the netmask and static IP for each of those interfaces. The
1491 VirtualBox installer only updates these configuration files for the one
1492 "vboxnet0" interface it creates by default.</para>
1493 </sect1>
1494
1495 <sect1 id="solariscodedumper">
1496 <title>Configuring VirtualBox CoreDumper on Solaris hosts</title>
1497
1498 <para>VirtualBox is capable of producing its own core files when things go
1499 wrong and for more extensive debugging. Currently this is only available
1500 on Solaris hosts.</para>
1501
1502 <para>The VirtualBox CoreDumper can be enabled using the following
1503 command:</para>
1504
1505 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen></para>
1506
1507 <para>You can specify which directory to use for core dumps with this
1508 command:</para>
1509
1510 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir &lt;path-to-directory&gt;</screen>Make
1511 sure the directory you specify is on a volume with sufficient free space
1512 and that the VirtualBox process has sufficient permissions to write files
1513 to this directory. If you skip this command and don't specify any core
1514 dump directory, the current directory of the VirtualBox executable will be
1515 used (which would most likely fail when writing cores as they are
1516 protected with root permissions). It is recommended you explicity set a
1517 core dump directory.</para>
1518
1519 <para>You must specify when the VirtualBox CoreDumper should be triggered.
1520 This is done using the following commands:</para>
1521
1522 <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
1523VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>At
1524 least one of the above two commands will have to be provided if you have
1525 enabled the VirtualBox CoreDumper.</para>
1526
1527 <para>Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
1528 sets up the VM to override the host's core dumping mechanism and in the
1529 event of any crash only the VirtualBox CoreDumper would produce the core
1530 file.</para>
1531
1532 <para>Setting <computeroutput>CoreDumpLive</computeroutput> sets up the VM
1533 to produce cores whenever the VM receives a
1534 <computeroutput>SIGUSR2</computeroutput> signal. After producing the core
1535 file, the VM will not be terminated and will continue to run. You can then
1536 take cores of the VM process using:</para>
1537
1538 <para><screen>kill -s SIGUSR2 &lt;VM-process-id&gt;</screen></para>
1539
1540 <para>Core files produced by the VirtualBox CoreDumper are of the form
1541 <computeroutput>core.vb.&lt;ProcessName&gt;.&lt;ProcessID&gt;</computeroutput>,
1542 e.g.<computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.</para>
1543 </sect1>
1544
1545 <sect1 id="guitweaks">
1546 <title>Locking down the GUI</title>
1547
1548 <para>There are several advanced customization settings for locking down
1549 the GUI, that is, removing some features that the user should not
1550 see.<screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen></para>
1551
1552 <para>where <computeroutput>OPTION</computeroutput> is one of the
1553 following keywords:<glosslist>
1554 <glossentry>
1555 <glossterm><computeroutput>noSelector</computeroutput></glossterm>
1556
1557 <glossdef>
1558 <para>Don't allow to start the VM selector GUI. Trying to do so
1559 will show a window containing a proper error message.</para>
1560 </glossdef>
1561 </glossentry>
1562
1563 <glossentry>
1564 <glossterm><computeroutput>noMenuBar</computeroutput></glossterm>
1565
1566 <glossdef>
1567 <para>The VM windows will not contain a menu bar.</para>
1568 </glossdef>
1569 </glossentry>
1570
1571 <glossentry>
1572 <glossterm><computeroutput>noStatusBar</computeroutput></glossterm>
1573
1574 <glossdef>
1575 <para>The VM windows will not contain a status bar.</para>
1576 </glossdef>
1577 </glossentry>
1578 </glosslist></para>
1579
1580 <para>To disable any GUI customization do <screen>VBoxManage setextradata global GUI/Customizations</screen></para>
1581
1582 <para>To disable all host key combinations, open the global settings and
1583 change the host key to <emphasis>None</emphasis>. This might be useful
1584 when using VirtualBox in a kiosk mode.</para>
1585
1586 <para>Furthermore, you can disallow certain actions when terminating a VM
1587 from the GUI. To disallow specific actions, type:</para>
1588
1589 <para><screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen></para>
1590
1591 <para>where <computeroutput>OPTION</computeroutput> is one of the
1592 following keywords:<glosslist>
1593 <glossentry>
1594 <glossterm><computeroutput>SaveState</computeroutput></glossterm>
1595
1596 <glossdef>
1597 <para>Don't allow the user to save the VM state plus terminate the
1598 VM.</para>
1599 </glossdef>
1600 </glossentry>
1601
1602 <glossentry>
1603 <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
1604
1605 <glossdef>
1606 <para>Don't allow the user to shutdown the VM by sending the ACPI
1607 power off event to the guest.</para>
1608 </glossdef>
1609 </glossentry>
1610
1611 <glossentry>
1612 <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
1613
1614 <glossdef>
1615 <para>Don't allow the user to power off the VM.</para>
1616 </glossdef>
1617 </glossentry>
1618
1619 <glossentry>
1620 <glossterm><computeroutput>Restore</computeroutput></glossterm>
1621
1622 <glossdef>
1623 <para>Don't allow the user to return to the last snapshot when
1624 powering off the VM.</para>
1625 </glossdef>
1626 </glossentry>
1627 </glosslist></para>
1628
1629 <para>Combinations of all of these options are allowed. If all options are
1630 specified, the VM cannot be shut down from the GUI.</para>
1631 </sect1>
1632
1633 <sect1 id="vboxwebsrv-daemon">
1634 <title>Starting <computeroutput>vboxwebsrv</computeroutput>
1635 automatically</title>
1636
1637 <para><computeroutput>vboxwebsrv</computeroutput> is used for controlling
1638 VirtualBox remotely. As the client base using this interface is growing,
1639 we added start scripts for the various operation systems we support. The
1640 following describes how to use them. <itemizedlist>
1641 <listitem>
1642 <para>On Mac OS X, launchd is used. An example configuration file
1643 can be found in
1644 <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
1645 It has to be enabled by changing the
1646 <computeroutput>Disabled</computeroutput> key from
1647 <computeroutput>true</computeroutput> to
1648 <computeroutput>false</computeroutput>. To manually start the
1649 service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
1650 For additional information on how launchd services could be
1651 configured see <literal><ulink
1652 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>
1653 </listitem>
1654 </itemizedlist></para>
1655 </sect1>
1656</chapter>
Note: See TracBrowser for help on using the repository browser.

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