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