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