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