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 fullscreen 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>
|
---|
128 | <title id="autologon">Automated guest logons</title>
|
---|
129 |
|
---|
130 | <para>VirtualBox provides Guest Addition modules for Windows, Linux and
|
---|
131 | Solaris to enable automated logons on the guest.</para>
|
---|
132 |
|
---|
133 | <para>When a guest operating system is running in a virtual machine, it
|
---|
134 | might be desirable to perform coordinated and automated logons using
|
---|
135 | credentials from a master logon system. (With "credentials", we are
|
---|
136 | referring to logon information consisting of user name, password and
|
---|
137 | domain name, where each value might be empty.)</para>
|
---|
138 |
|
---|
139 | <sect2 id="autologon_win">
|
---|
140 | <title>Automated Windows guest logons</title>
|
---|
141 |
|
---|
142 | <para>Since Windows NT, Windows has provided a modular system logon
|
---|
143 | subsystem ("Winlogon") which can be customized and extended by means of
|
---|
144 | so-called GINA modules (Graphical Identification and Authentication).
|
---|
145 | With Windows Vista and Windows 7, the GINA modules were replaced with a
|
---|
146 | new mechanism called "credential providers". The VirtualBox Guest
|
---|
147 | Additions for Windows come with both, a GINA and a credential provider
|
---|
148 | module, and therefore enable any Windows guest to perform automated
|
---|
149 | logons.</para>
|
---|
150 |
|
---|
151 | <para>To activate the VirtualBox GINA or credential provider module,
|
---|
152 | install the Guest Additions with using the command line switch
|
---|
153 | <computeroutput>/with_autologon</computeroutput>. All the following
|
---|
154 | manual steps required for installing these modules will be then done by
|
---|
155 | the installer.</para>
|
---|
156 |
|
---|
157 | <para>To manually install the VirtualBox GINA module, extract the Guest
|
---|
158 | Additions (see <xref linkend="windows-guest-file-extraction" />) and
|
---|
159 | copy the file <computeroutput>VBoxGINA.dll</computeroutput> to the
|
---|
160 | Windows <computeroutput>SYSTEM32</computeroutput> directory. Then, in
|
---|
161 | the registry, create the following key: <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL</screen>
|
---|
162 | with a value of <computeroutput>VBoxGINA.dll</computeroutput>.</para>
|
---|
163 |
|
---|
164 | <note>
|
---|
165 | <para>The VirtualBox GINA module is implemented as a wrapper around
|
---|
166 | the standard Windows GINA module
|
---|
167 | (<computeroutput>MSGINA.DLL</computeroutput>). As a result, it will
|
---|
168 | most likely not work correctly with 3rd party GINA modules.</para>
|
---|
169 | </note>
|
---|
170 |
|
---|
171 | <para>To manually install the VirtualBox credential provider module, extract the
|
---|
172 | Guest Additions (see <xref linkend="windows-guest-file-extraction" />)
|
---|
173 | and copy the file <computeroutput>VBoxCredProv.dll</computeroutput> to
|
---|
174 | the Windows <computeroutput>SYSTEM32</computeroutput> directory. Then,
|
---|
175 | in the registry, create the following keys:<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
|
---|
176 | Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
|
---|
177 |
|
---|
178 | HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
|
---|
179 |
|
---|
180 | HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32</screen></para>
|
---|
181 |
|
---|
182 | <para>with all default values (the key named
|
---|
183 | <computeroutput>(Default)</computeroutput> in each key) set to
|
---|
184 | <computeroutput>VBoxCredProv</computeroutput>. After that a new string
|
---|
185 | named <screen>HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel</screen>
|
---|
186 | with a value of <computeroutput>Apartment</computeroutput> has to be
|
---|
187 | created.</para>
|
---|
188 |
|
---|
189 | <para>To set credentials, use the following command on a
|
---|
190 | <emphasis>running</emphasis> VM:</para>
|
---|
191 |
|
---|
192 | <screen>VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST"</screen>
|
---|
193 |
|
---|
194 | <para>While the VM is running, the credentials can be queried by the
|
---|
195 | VirtualBox logon modules (GINA or credential provider) using the
|
---|
196 | VirtualBox Guest Additions device driver. When Windows is in "logged
|
---|
197 | out" mode, the logon modules will constantly poll for credentials and if
|
---|
198 | they are present, a logon will be attempted. After retrieving the
|
---|
199 | credentials, the logon modules will erase them so that the above command
|
---|
200 | will have to be repeated for subsequent logons.</para>
|
---|
201 |
|
---|
202 | <para>For security reasons, credentials are not stored in any persistent
|
---|
203 | manner and will be lost when the VM is reset. Also, the credentials are
|
---|
204 | "write-only", i.e. there is no way to retrieve the credentials from the
|
---|
205 | host side. Credentials can be reset from the host side by setting empty
|
---|
206 | values.</para>
|
---|
207 |
|
---|
208 | <para>Depending on the particular variant of the Windows guest, the
|
---|
209 | following restrictions apply: <orderedlist>
|
---|
210 | <listitem>
|
---|
211 | <para>For <emphasis role="bold">Windows XP guests,</emphasis> the
|
---|
212 | logon subsystem needs to be configured to use the classic logon
|
---|
213 | dialog as the VirtualBox GINA module does not support the XP-style
|
---|
214 | welcome dialog.</para>
|
---|
215 | </listitem>
|
---|
216 |
|
---|
217 | <listitem>
|
---|
218 | <para>For <emphasis role="bold">Windows Vista and Windows 7
|
---|
219 | guests,</emphasis> the logon subsystem does not support the
|
---|
220 | so-called Secure Attention Sequence
|
---|
221 | (<computeroutput>CTRL+ALT+DEL</computeroutput>). As a result, the
|
---|
222 | guest's group policy settings need to be changed to not use the
|
---|
223 | Secure Attention Sequence. Also, the user name given is only
|
---|
224 | compared to the true user name, not the user friendly name. This
|
---|
225 | means that when you rename a user, you still have to supply the
|
---|
226 | original user name (internally, Windows never renames user
|
---|
227 | accounts).</para>
|
---|
228 | </listitem>
|
---|
229 |
|
---|
230 | <listitem>
|
---|
231 | <para>Auto-logon handling of the built-in Windows Remote Desktop Service
|
---|
232 | (formerly known as Terminal Services) is disabled by default. To enable
|
---|
233 | it, create the registry key
|
---|
234 | <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox Guest Additions\AutoLogon</screen>
|
---|
235 | with a <computeroutput>DWORD</computeroutput> value of <computeroutput>1</computeroutput>.</para>
|
---|
236 | </listitem>
|
---|
237 | </orderedlist></para>
|
---|
238 |
|
---|
239 | <para>The following command forces VirtualBox to keep the credentials
|
---|
240 | 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
|
---|
241 | that this is a potential security risk as a malicious application
|
---|
242 | running on the guest could request this information using the proper
|
---|
243 | interface.</para>
|
---|
244 | </sect2>
|
---|
245 |
|
---|
246 | <sect2 id="autologon_unix">
|
---|
247 | <title>Automated Linux/Unix guest logons</title>
|
---|
248 |
|
---|
249 | <para>Starting with version 3.2, VirtualBox provides a custom PAM module
|
---|
250 | (Pluggable Authentication Module) which can be used to perform automated
|
---|
251 | guest logons on platforms which support this framework. Virtually all
|
---|
252 | modern Linux/Unix distributions rely on PAM.</para>
|
---|
253 |
|
---|
254 | <para>The <computeroutput>pam_vbox.so</computeroutput> module itself
|
---|
255 | <emphasis role="bold">does not</emphasis> do an actual verification of
|
---|
256 | the credentials passed to the guest OS; instead it relies on other
|
---|
257 | modules such as <computeroutput>pam_unix.so</computeroutput> or
|
---|
258 | <computeroutput>pam_unix2.so</computeroutput> down in the PAM stack to
|
---|
259 | do the actual validation using the credentials retrieved by
|
---|
260 | <computeroutput>pam_vbox.so</computeroutput>. Therefore
|
---|
261 | <computeroutput>pam_vbox.so</computeroutput> has to be on top of the
|
---|
262 | authentication PAM service list.</para>
|
---|
263 |
|
---|
264 | <note>
|
---|
265 | <para>The <computeroutput>pam_vbox.so</computeroutput> only supports
|
---|
266 | the <computeroutput>auth</computeroutput> primitive. Other primitives
|
---|
267 | such as <computeroutput>account</computeroutput>,
|
---|
268 | <computeroutput>session</computeroutput> or
|
---|
269 | <computeroutput>password</computeroutput> are not supported.</para>
|
---|
270 | </note>
|
---|
271 |
|
---|
272 | <para>The <computeroutput>pam_vbox.so</computeroutput> module is shipped
|
---|
273 | as part of the Guest Additions but it is not installed and/or activated
|
---|
274 | on the guest OS by default. In order to install it, it has to be copied
|
---|
275 | from
|
---|
276 | <computeroutput>/opt/VBoxGuestAdditions-<version>/lib/VBoxGuestAdditions/</computeroutput>
|
---|
277 | to the security modules directory, usually
|
---|
278 | <computeroutput>/lib/security/</computeroutput> on 32-bit guest Linuxes or
|
---|
279 | <computeroutput>/lib64/security/</computeroutput> on 64-bit ones. Please refer to your
|
---|
280 | guest OS documentation for the correct PAM module directory.</para>
|
---|
281 |
|
---|
282 | <para>For example, to use <computeroutput>pam_vbox.so</computeroutput>
|
---|
283 | with a Ubuntu Linux guest OS and GDM (the GNOME Desktop Manager) to
|
---|
284 | logon users automatically with the credentials passed by the host, the
|
---|
285 | guest OS has to be configured like the following:</para>
|
---|
286 |
|
---|
287 | <orderedlist>
|
---|
288 | <listitem>
|
---|
289 | <para>The <computeroutput>pam_vbox.so</computeroutput> module has to
|
---|
290 | be copied to the security modules directory, in this case it is
|
---|
291 | <computeroutput>/lib/security</computeroutput>.</para>
|
---|
292 | </listitem>
|
---|
293 |
|
---|
294 | <listitem>
|
---|
295 | <para>Edit the PAM configuration file for GDM found at
|
---|
296 | <computeroutput>/etc/pam.d/gdm</computeroutput>, adding the line
|
---|
297 | <computeroutput>auth requisite pam_vbox.so</computeroutput> at the
|
---|
298 | top. Additionaly, in most Linux distributions there is a file called
|
---|
299 | <computeroutput>/etc/pam.d/common-auth</computeroutput>. This file
|
---|
300 | is included in many other services (like the GDM file mentioned
|
---|
301 | above). There you also have to add the line <computeroutput>auth
|
---|
302 | requisite pam_vbox.so</computeroutput>.</para>
|
---|
303 | </listitem>
|
---|
304 |
|
---|
305 | <listitem>
|
---|
306 | <para>If authentication against the shadow database using
|
---|
307 | <computeroutput>pam_unix.so</computeroutput> or
|
---|
308 | <computeroutput>pam_unix2.so</computeroutput> is desired, the
|
---|
309 | argument <computeroutput>try_first_pass</computeroutput> for
|
---|
310 | <computeroutput>pam_unix.so</computeroutput> or
|
---|
311 | <computeroutput>use_first_pass</computeroutput> for
|
---|
312 | <computeroutput>pam_unix2.so</computeroutput> is needed
|
---|
313 | in order to pass the credentials from the VirtualBox module to the
|
---|
314 | shadow database authentication module. For Ubuntu, this needs to be
|
---|
315 | added to <computeroutput>/etc/pam.d/common-auth</computeroutput>, to
|
---|
316 | the end of the line referencing
|
---|
317 | <computeroutput>pam_unix.so</computeroutput>. This argument tells
|
---|
318 | the PAM module to use credentials already present in the stack, i.e.
|
---|
319 | the ones provided by the VirtualBox PAM module.</para>
|
---|
320 | </listitem>
|
---|
321 | </orderedlist>
|
---|
322 |
|
---|
323 | <para><warning>
|
---|
324 | <para>An incorrectly configured PAM stack can effectively prevent
|
---|
325 | you from logging into your guest system!</para>
|
---|
326 | </warning></para>
|
---|
327 |
|
---|
328 | <para>To make deployment easier, you can pass the argument
|
---|
329 | <computeroutput>debug</computeroutput> right after the
|
---|
330 | <computeroutput>pam_vbox.so</computeroutput> statement. Debug log output
|
---|
331 | will then be recorded using syslog.</para>
|
---|
332 |
|
---|
333 | <para><warning>
|
---|
334 | <para>At present, the GDM display manager only retrieves credentials
|
---|
335 | at startup so unless the credentials have been supplied to the guest
|
---|
336 | before GDM starts, automatic logon will not work. This limitation
|
---|
337 | needs to be addressed by the GDM developers or another display
|
---|
338 | manager must be used.</para>
|
---|
339 | </warning></para>
|
---|
340 | </sect2>
|
---|
341 | </sect1>
|
---|
342 |
|
---|
343 | <sect1>
|
---|
344 | <title>Advanced configuration for Windows guests</title>
|
---|
345 |
|
---|
346 | <sect2 id="sysprep">
|
---|
347 | <title>Automated Windows system preparation</title>
|
---|
348 |
|
---|
349 | <para>Beginning with Windows NT 4.0, Microsoft offers a "system
|
---|
350 | preparation" tool (in short: Sysprep) to prepare a Windows system for
|
---|
351 | deployment or redistribution. Whereas Windows 2000 and XP ship with
|
---|
352 | Sysprep on the installation medium, the tool also is available for
|
---|
353 | download on the Microsoft web site. In a standard installation of
|
---|
354 | Windows Vista and 7, Sysprep is already included. Sysprep mainly
|
---|
355 | consists of an executable called
|
---|
356 | <computeroutput>sysprep.exe</computeroutput> which is invoked by the
|
---|
357 | user to put the Windows installation into preparation mode.</para>
|
---|
358 |
|
---|
359 | <para>Starting with VirtualBox 3.2.2, the Guest Additions offer a way to
|
---|
360 | launch a system preparation on the guest operating system in an
|
---|
361 | automated way, controlled from the host system. To achieve that, see
|
---|
362 | <xref linkend="guestadd-guestcontrol" /> for using the feature with the
|
---|
363 | special identifier <computeroutput>sysprep</computeroutput> as the
|
---|
364 | program to execute, along with the user name
|
---|
365 | <computeroutput>sysprep</computeroutput> and password
|
---|
366 | <computeroutput>sysprep</computeroutput> for the credentials. Sysprep
|
---|
367 | then gets launched with the required system rights.</para>
|
---|
368 |
|
---|
369 | <note>
|
---|
370 | <para>Specifying the location of "sysprep.exe" is <emphasis
|
---|
371 | role="bold">not possible</emphasis> -- instead the following paths are
|
---|
372 | used (based on the operating system): <itemizedlist>
|
---|
373 | <listitem>
|
---|
374 | <para><computeroutput>C:\sysprep\sysprep.exe</computeroutput>
|
---|
375 | for Windows NT 4.0, 2000 and XP</para>
|
---|
376 | </listitem>
|
---|
377 |
|
---|
378 | <listitem>
|
---|
379 | <para><computeroutput>%WINDIR%\System32\Sysprep\sysprep.exe</computeroutput>
|
---|
380 | for Windows Vista, 2008 Server and 7</para>
|
---|
381 | </listitem>
|
---|
382 | </itemizedlist> The Guest Additions will automatically use the
|
---|
383 | appropriate path to execute the system preparation tool.</para>
|
---|
384 | </note>
|
---|
385 | </sect2>
|
---|
386 | </sect1>
|
---|
387 |
|
---|
388 | <sect1>
|
---|
389 | <title>Advanced configuration for Linux and Solaris guests</title>
|
---|
390 |
|
---|
391 | <sect2>
|
---|
392 | <title>Manual setup of selected guest services on Linux</title>
|
---|
393 |
|
---|
394 | <para>The VirtualBox Guest Additions contain several different
|
---|
395 | drivers. If for any reason you do not wish to set them all up, you can
|
---|
396 | install the Guest Additions using the following command:</para>
|
---|
397 |
|
---|
398 | <screen> sh ./VBoxLinuxAdditions.run no_setup</screen>
|
---|
399 |
|
---|
400 | <para>After this, you will need to at least compile the kernel modules
|
---|
401 | by running the command <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen>
|
---|
402 | as root (you will need to replace <emphasis>lib</emphasis> by
|
---|
403 | <emphasis>lib64</emphasis> on some 64bit guests), and on older guests
|
---|
404 | without the udev service you will need to add the
|
---|
405 | <emphasis>vboxadd</emphasis> service to the default runlevel to ensure
|
---|
406 | that the modules get loaded.</para>
|
---|
407 |
|
---|
408 | <para>To setup the time synchronization service, run the command
|
---|
409 | <screen> /usr/lib/VBoxGuestAdditions/vboxadd-service setup</screen>
|
---|
410 | and add the service vboxadd-service to the default runlevel. To set up
|
---|
411 | the X11 and OpenGL part of the Guest Additions, run the command
|
---|
412 | <screen> /usr/lib/VBoxGuestAdditions/vboxadd-x11 setup</screen> (you
|
---|
413 | do not need to enable any services for this).</para>
|
---|
414 |
|
---|
415 | <para>To recompile the guest kernel modules, use this command:
|
---|
416 | <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen> After
|
---|
417 | compilation you should reboot your guest to ensure that the new
|
---|
418 | modules are actually used.</para>
|
---|
419 | </sect2>
|
---|
420 |
|
---|
421 | <sect2 id="guestxorgsetup">
|
---|
422 | <title>Guest graphics and mouse driver setup in depth</title>
|
---|
423 |
|
---|
424 | <para>This section assumes that you are familiar with configuring
|
---|
425 | the X.Org server using xorg.conf and optionally the newer mechanisms
|
---|
426 | using hal or udev and xorg.conf.d. If not you can learn about
|
---|
427 | them by studying the documentation which comes with X.Org.</para>
|
---|
428 |
|
---|
429 | <para>The VirtualBox Guest Additions come with drivers for X.Org
|
---|
430 | versions
|
---|
431 | <itemizedlist>
|
---|
432 | <listitem>X11R6.8/X11R6.9 and XFree86 version 4.3
|
---|
433 | (vboxvideo_drv_68.o and vboxmouse_drv_68.o)</listitem>
|
---|
434 | <listitem>X11R7.0 (vboxvideo_drv_70.so and vboxmouse_drv_70.so)
|
---|
435 | </listitem>
|
---|
436 | <listitem>X11R7.1 (vboxvideo_drv_71.so and vboxmouse_drv_71.so)
|
---|
437 | </listitem>
|
---|
438 | <listitem>X.Org Server versions 1.3 and later (vboxvideo_drv_13.so
|
---|
439 | and vboxmouse_drv_13.so and so on).</listitem>
|
---|
440 | </itemizedlist>
|
---|
441 | By default these drivers can be found in the directory</para>
|
---|
442 | <para>
|
---|
443 | <computeroutput>/opt/VBoxGuestAdditions-<version>/lib/VBoxGuestAdditions</computeroutput>
|
---|
444 | </para>
|
---|
445 | <para>and the correct versions for the X server are symbolically linked
|
---|
446 | into the X.Org driver directories.</para>
|
---|
447 |
|
---|
448 | <para>For graphics integration to work correctly, the X server must
|
---|
449 | load the vboxvideo driver (many recent X server versions look for it
|
---|
450 | automatically if they see that they are running in VirtualBox) and for
|
---|
451 | an optimal user experience the guest kernel drivers must be loaded and
|
---|
452 | the Guest Additions tool VBoxClient must be running as a client in the
|
---|
453 | X session. For mouse integration to work correctly, the guest kernel
|
---|
454 | drivers must be loaded and in addition, in X servers from X.Org X11R6.8
|
---|
455 | to X11R7.1 and in XFree86 version 4.3 the right vboxmouse driver must
|
---|
456 | be loaded and associated with /dev/mouse or /dev/psaux; in X.Org server
|
---|
457 | 1.3 or later a driver for a PS/2 mouse must be loaded and the right
|
---|
458 | vboxmouse driver must be associated with /dev/vboxguest.</para>
|
---|
459 |
|
---|
460 | <para>The VirtualBox guest graphics driver can use any graphics
|
---|
461 | configuration for which the virtual resolution fits into the virtual
|
---|
462 | video memory allocated to the virtual machine (minus a small amount
|
---|
463 | used by the guest driver) as described in
|
---|
464 | <xref linkend="settings-display" />. The driver will offer a range of
|
---|
465 | standard modes at least up to the default guest resolution for all
|
---|
466 | active guest monitors. In X.Org Server 1.3 and later the default mode
|
---|
467 | can be changed by setting the output property VBOX_MODE to
|
---|
468 | "<width>x<height>" for any guest monitor. When VBoxClient
|
---|
469 | and the kernel drivers are active this is done automatically when the
|
---|
470 | host requests a mode change. The driver for older versions can only
|
---|
471 | receive new modes by querying the host for requests at regular
|
---|
472 | intervals.</para>
|
---|
473 |
|
---|
474 | <para>With pre-1.3 X Servers you can also add your own modes to the X
|
---|
475 | server configuration file. You simply need to add them to the "Modes"
|
---|
476 | list in the "Display" subsection of the "Screen" section. For example,
|
---|
477 | the section shown here has a custom 2048x800 resolution mode added:
|
---|
478 | </para>
|
---|
479 |
|
---|
480 | <screen>Section "Screen"
|
---|
481 | Identifier "Default Screen"
|
---|
482 | Device "VirtualBox graphics card"
|
---|
483 | Monitor "Generic Monitor"
|
---|
484 | DefaultDepth 24
|
---|
485 | SubSection "Display"
|
---|
486 | Depth 24
|
---|
487 | Modes "2048x800" "800x600" "640x480"
|
---|
488 | EndSubSection
|
---|
489 | EndSection</screen>
|
---|
490 | </sect2>
|
---|
491 | </sect1>
|
---|
492 |
|
---|
493 | <sect1 id="cpuhotplug">
|
---|
494 | <title>CPU hot-plugging</title>
|
---|
495 |
|
---|
496 | <para>With virtual machines running modern server operating systems,
|
---|
497 | VirtualBox supports CPU hot-plugging.<footnote>
|
---|
498 | <para>Support for CPU hot-plugging was introduced with VirtualBox
|
---|
499 | 3.2.</para>
|
---|
500 | </footnote> Whereas on a physical computer this would mean that a CPU
|
---|
501 | can be added or removed while the machine is running, VirtualBox supports
|
---|
502 | adding and removing virtual CPUs while a virtual machine is
|
---|
503 | running.</para>
|
---|
504 |
|
---|
505 | <para>CPU hot-plugging works only with guest operating systems that
|
---|
506 | support it. So far this applies only to Linux and Windows Server 2008 x64
|
---|
507 | Data Center Edition. Windows supports only hot-add while Linux supports
|
---|
508 | hot-add and hot-remove but to use this feature with more than 8 CPUs a
|
---|
509 | 64bit Linux guest is required.</para>
|
---|
510 |
|
---|
511 | <para>At this time, CPU hot-plugging requires using the VBoxManage
|
---|
512 | command-line interface. First, hot-plugging needs to be enabled for a
|
---|
513 | virtual machine:<screen>VBoxManage modifyvm "VM name" --cpuhotplug on</screen></para>
|
---|
514 |
|
---|
515 | <para>After that, the --cpus option specifies the maximum number of CPUs
|
---|
516 | that the virtual machine can have:<screen>VBoxManage modifyvm "VM name" --cpus 8</screen>When
|
---|
517 | the VM is off, you can then add and remove virtual CPUs with the modifyvm
|
---|
518 | --plugcpu and --unplugcpu subcommands, which take the number of the
|
---|
519 | virtual CPU as a parameter, like this:<screen>VBoxManage modifyvm "VM name" --plugcpu 3
|
---|
520 | VBoxManage modifyvm "VM name" --unplugcpu 3</screen>Note that CPU 0 can never
|
---|
521 | be removed.</para>
|
---|
522 |
|
---|
523 | <para>While the VM is running, CPUs can be added with the
|
---|
524 | <computeroutput>controlvm plugcpu/unplugcpu</computeroutput> commands
|
---|
525 | instead:<screen>VBoxManage controlvm "VM name" plugcpu 3
|
---|
526 | VBoxManage controlvm "VM name" unplugcpu 3</screen></para>
|
---|
527 |
|
---|
528 | <para>See <xref linkend="vboxmanage-modifyvm" /> and <xref
|
---|
529 | linkend="vboxmanage-controlvm" /> for details.</para>
|
---|
530 |
|
---|
531 | <para>With Linux guests, the following applies: To prevent ejection while
|
---|
532 | the CPU is still used it has to be ejected from within the guest before.
|
---|
533 | The Linux Guest Additions contain a service which receives hot-remove
|
---|
534 | events and ejects the CPU. Also, after a CPU is added to the VM it is not
|
---|
535 | automatically used by Linux. The Linux Guest Additions service will take
|
---|
536 | care of that if installed. If not a CPU can be started with the following
|
---|
537 | command:<screen>echo 1 > /sys/devices/system/cpu/cpu<id>/online</screen></para>
|
---|
538 | </sect1>
|
---|
539 |
|
---|
540 | <sect1 id="pcipassthrough">
|
---|
541 | <title>PCI passthrough</title>
|
---|
542 |
|
---|
543 | <para>When running on Linux hosts, with recent enough kernel (at least version
|
---|
544 | <computeroutput>2.6.31</computeroutput>) experimental host PCI devices
|
---|
545 | passthrough is available.<footnote>
|
---|
546 | <para>Experimental support for PCI passthrough was introduced with VirtualBox
|
---|
547 | 4.1.</para>
|
---|
548 | </footnote> Essentially this feature allows to use physical PCI devices
|
---|
549 | on host directly by the guest, even if host doesn't have drivers for this
|
---|
550 | particular device. Both regular PCI and some PCI Express cards are
|
---|
551 | supported. AGP and certain PCI Express cards are not supported at the
|
---|
552 | moment, if they rely on GART (Graphics Address Remapping Table) unit
|
---|
553 | programming for texture management, as it does rather nontrivial
|
---|
554 | operations with pages remapping interfering with IOMMU.
|
---|
555 | This limitation may be lifted in future releases.</para>
|
---|
556 |
|
---|
557 | <para>To be fully functional, PCI passthrough support in VirtualBox depends upon
|
---|
558 | IOMMU hardware unit, which is not yet too widely available. To be exact,
|
---|
559 | if device uses bus mastering (i.e. performs DMA to the OS memory on its own), then
|
---|
560 | IOMMU hardware is needed (otherwise such DMA transactions may override wrong physical memory address,
|
---|
561 | as device DMA engine is programmed using device-specific protocol to perform memory transactions).
|
---|
562 | IOMMU functions as translation unit, mapping physical memory access requests from the device,
|
---|
563 | using knowledge of guest physical address to host physical addresses translation rules.</para>
|
---|
564 |
|
---|
565 | <para>Intel's solution for IOMMU is marketed as "Intel Virtualization Technology for
|
---|
566 | Directed I/O" (VT-d), and AMD's one is called AMD-Vi. So please check if your
|
---|
567 | motherboard datasheet has appropriate technology.
|
---|
568 | Even if your hardware doesn't have IOMMU, certain PCI cards may work
|
---|
569 | (such as serial PCI adapters), but guest will show warning on boot, and
|
---|
570 | VM execution will terminate, if guest driver will attempt to enable card
|
---|
571 | bus mastering.</para>
|
---|
572 |
|
---|
573 | <para>
|
---|
574 | It's not uncommon, that BIOS/OS disables IOMMU by default, so before any attempt to use it,
|
---|
575 | please make sure that
|
---|
576 | <orderedlist>
|
---|
577 | <listitem>
|
---|
578 | Your motherboard has IOMMU unit.
|
---|
579 | </listitem>
|
---|
580 | <listitem>
|
---|
581 | Your CPU supports IOMMU.
|
---|
582 | </listitem>
|
---|
583 | <listitem>
|
---|
584 | IOMMU is enabled in the BIOS.
|
---|
585 | </listitem>
|
---|
586 | <listitem>
|
---|
587 | Your Linux kernel was compiled with IOMMU support (including DMA remapping, see
|
---|
588 | <computeroutput>CONFIG_DMAR</computeroutput> kernel compilation option). The
|
---|
589 | PCI stub driver (<computeroutput>CONFIG_PCI_STUB</computeroutput>) is required
|
---|
590 | as well.
|
---|
591 | </listitem>
|
---|
592 | <listitem>
|
---|
593 | Your Linux kernel recognizes and uses IOMMU unit (<computeroutput>intel_iommu=on</computeroutput>
|
---|
594 | boot option could be needed). Search for DMAR and PCI-DMA in kernel boot log.
|
---|
595 | </listitem>
|
---|
596 | </orderedlist>
|
---|
597 | </para>
|
---|
598 |
|
---|
599 | <para>Once you made sure that host kernel supports IOMMU, next step is to select
|
---|
600 | PCI card, and attach it to the guest. To figure out list of available PCI devices,
|
---|
601 | use <computeroutput>lspci</computeroutput> command. Output will look like this
|
---|
602 | <screen>
|
---|
603 | 01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450]
|
---|
604 | 01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
|
---|
605 | 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
|
---|
606 | 03:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
|
---|
607 | 03:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)
|
---|
608 | 06:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8500 GT] (rev a1)
|
---|
609 | </screen>
|
---|
610 | First column here is a PCI address (in format <computeroutput>bus:device.function</computeroutput>).
|
---|
611 | This address could be used to identify device for further operations.
|
---|
612 | For example, to attach PCI network controller on system listed above,
|
---|
613 | to second PCI bus in the guest, as device 5, function 0, use the following command:
|
---|
614 | <screen>VBoxManage modifyvm "VM name" --attachpci 02:00.0@01:05.0</screen>
|
---|
615 | To detach same device, use
|
---|
616 | <screen>VBoxManage modifyvm "VM name" --detachpci 02:00.0</screen>
|
---|
617 | Please note, that both host and guest could freely assign different PCI address to
|
---|
618 | card attached during runtime, so those addresses only apply to address of card at
|
---|
619 | the moment of attachment (host), and during BIOS PCI init (guest).
|
---|
620 | </para>
|
---|
621 |
|
---|
622 | <para>If virtual machine has PCI device attached, certain limitations apply.
|
---|
623 | <orderedlist>
|
---|
624 | <listitem>
|
---|
625 | Only PCI cards with non-shared interrupts (such as using MSI on host) can be
|
---|
626 | supported at the moment.
|
---|
627 | </listitem>
|
---|
628 | <listitem>
|
---|
629 | No guest state can be reliably saved/restored (as PCI card internal state could
|
---|
630 | not be retrieved).
|
---|
631 | </listitem>
|
---|
632 | <listitem>
|
---|
633 | Teleportation (live migration) doesn't work (for the same reason).
|
---|
634 | </listitem>
|
---|
635 | <listitem>
|
---|
636 | No lazy physical memory allocation, host preallocates whole RAM on startup
|
---|
637 | (as we cannot catch physical hardware access to physical memory).
|
---|
638 | </listitem>
|
---|
639 | </orderedlist>
|
---|
640 | </para>
|
---|
641 |
|
---|
642 | </sect1>
|
---|
643 |
|
---|
644 |
|
---|
645 | <sect1>
|
---|
646 | <title>Advanced display configuration</title>
|
---|
647 |
|
---|
648 | <sect2>
|
---|
649 | <title>Custom VESA resolutions</title>
|
---|
650 |
|
---|
651 | <para>Apart from the standard VESA resolutions, the VirtualBox VESA BIOS
|
---|
652 | allows you to add up to 16 custom video modes which will be reported to
|
---|
653 | the guest operating system. When using Windows guests with the
|
---|
654 | VirtualBox Guest Additions, a custom graphics driver will be used
|
---|
655 | instead of the fallback VESA solution so this information does not
|
---|
656 | apply.</para>
|
---|
657 |
|
---|
658 | <para>Additional video modes can be configured for each VM using the
|
---|
659 | extra data facility. The extra data key is called
|
---|
660 | <literal>CustomVideoMode<x></literal> with <literal>x</literal>
|
---|
661 | being a number from 1 to 16. Please note that modes will be read from 1
|
---|
662 | until either the following number is not defined or 16 is reached. The
|
---|
663 | following example adds a video mode that corresponds to the native
|
---|
664 | display resolution of many notebook computers:</para>
|
---|
665 |
|
---|
666 | <screen>VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</screen>
|
---|
667 |
|
---|
668 | <para>The VESA mode IDs for custom video modes start at
|
---|
669 | <literal>0x160</literal>. In order to use the above defined custom video
|
---|
670 | mode, the following command line has be supplied to Linux:</para>
|
---|
671 |
|
---|
672 | <screen>vga = 0x200 | 0x160
|
---|
673 | vga = 864</screen>
|
---|
674 |
|
---|
675 | <para>For guest operating systems with VirtualBox Guest Additions, a
|
---|
676 | custom video mode can be set using the video mode hint feature.</para>
|
---|
677 | </sect2>
|
---|
678 |
|
---|
679 | <sect2>
|
---|
680 | <title>Configuring the maximum resolution of guests when using the
|
---|
681 | graphical frontend</title>
|
---|
682 |
|
---|
683 | <para>When guest systems with the Guest Additions installed are started
|
---|
684 | using the graphical frontend (the normal VirtualBox application), they
|
---|
685 | will not be allowed to use screen resolutions greater than the host's
|
---|
686 | screen size unless the user manually resizes them by dragging the
|
---|
687 | window, switching to fullscreen or seamless mode or sending a video mode
|
---|
688 | hint using VBoxManage. This behavior is what most users will want, but
|
---|
689 | if you have different needs, it is possible to change it by issuing one
|
---|
690 | of the following commands from the command line:</para>
|
---|
691 |
|
---|
692 | <screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
|
---|
693 |
|
---|
694 | <para>will remove all limits on guest resolutions.</para>
|
---|
695 |
|
---|
696 | <screen>VBoxManage setextradata global GUI/MaxGuestResolution >width,height<</screen>
|
---|
697 |
|
---|
698 | <para>manually specifies a maximum resolution.</para>
|
---|
699 |
|
---|
700 | <screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
|
---|
701 |
|
---|
702 | <para>restores the default settings. Note that these settings apply
|
---|
703 | globally to all guest systems, not just to a single machine.</para>
|
---|
704 | </sect2>
|
---|
705 |
|
---|
706 | </sect1>
|
---|
707 |
|
---|
708 | <sect1>
|
---|
709 | <title>Advanced storage configuration</title>
|
---|
710 |
|
---|
711 | <sect2 id="rawdisk">
|
---|
712 | <title>Using a raw host hard disk from a guest</title>
|
---|
713 |
|
---|
714 | <para>Starting with version 1.4, as an alternative to using virtual disk
|
---|
715 | images (as described in detail in <xref linkend="storage" />),
|
---|
716 | VirtualBox can also present either entire physical hard disks or
|
---|
717 | selected partitions thereof as virtual disks to virtual machines.</para>
|
---|
718 |
|
---|
719 | <para>With VirtualBox, this type of access is called "raw hard disk
|
---|
720 | access"; it allows a guest operating system to access its virtual hard
|
---|
721 | disk without going through the host OS file system. The actual
|
---|
722 | performance difference for image files vs. raw disk varies greatly
|
---|
723 | depending on the overhead of the host file system, whether dynamically
|
---|
724 | growing images are used and on host OS caching strategies. The caching
|
---|
725 | indirectly also affects other aspects such as failure behavior, i.e.
|
---|
726 | whether the virtual disk contains all data written before a host OS
|
---|
727 | crash. Consult your host OS documentation for details on this.</para>
|
---|
728 |
|
---|
729 | <para><warning>
|
---|
730 | <para>Raw hard disk access is for expert users only. Incorrect use
|
---|
731 | or use of an outdated configuration can lead to <emphasis
|
---|
732 | role="bold">total loss of data </emphasis>on the physical disk. Most
|
---|
733 | importantly, <emphasis>do not</emphasis> attempt to boot the
|
---|
734 | partition with the currently running host operating system in a
|
---|
735 | guest. This will lead to severe data corruption.</para>
|
---|
736 | </warning></para>
|
---|
737 |
|
---|
738 | <para>Raw hard disk access -- both for entire disks and individual
|
---|
739 | partitions -- is implemented as part of the VMDK image format support.
|
---|
740 | As a result, you will need to create a special VMDK image file which
|
---|
741 | defines where the data will be stored. After creating such a special
|
---|
742 | VMDK image, you can use it like a regular virtual disk image. For
|
---|
743 | example, you can use the Virtual Media Manager (<xref linkend="vdis" />)
|
---|
744 | or <computeroutput>VBoxManage</computeroutput> to assign the image to a
|
---|
745 | virtual machine.</para>
|
---|
746 |
|
---|
747 | <sect3>
|
---|
748 | <title>Access to entire physical hard disk</title>
|
---|
749 |
|
---|
750 | <para>While this variant is the simplest to set up, you must be aware
|
---|
751 | that this will give a guest operating system direct and full access to
|
---|
752 | an <emphasis>entire physical disk</emphasis>. If your
|
---|
753 | <emphasis>host</emphasis> operating system is also booted from this
|
---|
754 | disk, please take special care to not access the partition from the
|
---|
755 | guest at all. On the positive side, the physical disk can be
|
---|
756 | repartitioned in arbitrary ways without having to recreate the image
|
---|
757 | file that gives access to the raw disk.</para>
|
---|
758 |
|
---|
759 | <para>To create an image that represents an entire physical hard disk
|
---|
760 | (which will not contain any actual data, as this will all be stored on
|
---|
761 | the physical disk), on a Linux host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
|
---|
762 | -rawdisk /dev/sda</screen>This creates the image
|
---|
763 | <code>/path/to/file.vmdk</code> (must be absolute), and all data will
|
---|
764 | be read and written from <code>/dev/sda</code>.</para>
|
---|
765 |
|
---|
766 | <para>On a Windows host, instead of the above device specification,
|
---|
767 | use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
|
---|
768 | of the above device specification use e.g. <code>/dev/disk1</code>.
|
---|
769 | Note that on OS X you can only get access to an entire disk if no
|
---|
770 | volume is mounted from it.</para>
|
---|
771 |
|
---|
772 | <para>Creating the image requires read/write access for the given
|
---|
773 | device. Read/write access is also later needed when using the image
|
---|
774 | from a virtual machine.</para>
|
---|
775 |
|
---|
776 | <para>Just like with regular disk images, this does not automatically
|
---|
777 | attach the newly created image to a virtual machine. This can be done
|
---|
778 | with e.g. <screen>VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
|
---|
779 | --port 0 --device 0 --type hdd --medium /path/to/file.vmdk</screen>When
|
---|
780 | this is done the selected virtual machine will boot from the specified
|
---|
781 | physical disk.</para>
|
---|
782 | </sect3>
|
---|
783 |
|
---|
784 | <sect3>
|
---|
785 | <title>Access to individual physical hard disk partitions</title>
|
---|
786 |
|
---|
787 | <para>This "raw partition support" is quite similar to the "full hard
|
---|
788 | disk" access described above. However, in this case, any partitioning
|
---|
789 | information will be stored inside the VMDK image, so you can e.g.
|
---|
790 | install a different boot loader in the virtual hard disk without
|
---|
791 | affecting the host's partitioning information. While the guest will be
|
---|
792 | able to <emphasis>see</emphasis> all partitions that exist on the
|
---|
793 | physical disk, access will be filtered in that reading from partitions
|
---|
794 | for which no access is allowed the partitions will only yield zeroes,
|
---|
795 | and all writes to them are ignored.</para>
|
---|
796 |
|
---|
797 | <para>To create a special image for raw partition support (which will
|
---|
798 | contain a small amount of data, as already mentioned), on a Linux
|
---|
799 | host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
|
---|
800 | -rawdisk /dev/sda -partitions 1,5</screen></para>
|
---|
801 |
|
---|
802 | <para>As you can see, the command is identical to the one for "full
|
---|
803 | hard disk" access, except for the additional
|
---|
804 | <computeroutput>-partitions</computeroutput> parameter. This example
|
---|
805 | would create the image <code>/path/to/file.vmdk</code> (which, again,
|
---|
806 | must be absolute), and partitions 1 and 5 of <code>/dev/sda</code>
|
---|
807 | would be made accessible to the guest.</para>
|
---|
808 |
|
---|
809 | <para>VirtualBox uses the same partition numbering as your Linux host.
|
---|
810 | As a result, the numbers given in the above example would refer to the
|
---|
811 | first primary partition and the first logical drive in the extended
|
---|
812 | partition, respectively.</para>
|
---|
813 |
|
---|
814 | <para>On a Windows host, instead of the above device specification,
|
---|
815 | use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
|
---|
816 | of the above device specification use e.g. <code>/dev/disk1</code>.
|
---|
817 | Note that on OS X you can only use partitions which are not mounted
|
---|
818 | (eject the respective volume first). Partition numbers are the same on
|
---|
819 | Linux, Windows and Mac OS X hosts.</para>
|
---|
820 |
|
---|
821 | <para>The numbers for the list of partitions can be taken from the
|
---|
822 | output of<screen>VBoxManage internalcommands listpartitions -rawdisk /dev/sda</screen>The
|
---|
823 | output lists the partition types and sizes to give the user enough
|
---|
824 | information to identify the partitions necessary for the guest.</para>
|
---|
825 |
|
---|
826 | <para>Images which give access to individual partitions are specific
|
---|
827 | to a particular host disk setup. You cannot transfer these images to
|
---|
828 | another host; also, whenever the host partitioning changes, the image
|
---|
829 | <emphasis>must be recreated</emphasis>.</para>
|
---|
830 |
|
---|
831 | <para>Creating the image requires read/write access for the given
|
---|
832 | device. Read/write access is also later needed when using the image
|
---|
833 | from a virtual machine. If this is not feasible, there is a special
|
---|
834 | variant for raw partition access (currently only available on Linux
|
---|
835 | hosts) that avoids having to give the current user access to the
|
---|
836 | entire disk. To set up such an image, use<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
|
---|
837 | -rawdisk /dev/sda -partitions 1,5 -relative</screen>When used from a
|
---|
838 | virtual machine, the image will then refer not to the entire disk, but
|
---|
839 | only to the individual partitions (in the example
|
---|
840 | <code>/dev/sda1</code> and <code>/dev/sda5</code>). As a consequence,
|
---|
841 | read/write access is only required for the affected partitions, not
|
---|
842 | for the entire disk. During creation however, read-only access to the
|
---|
843 | entire disk is required to obtain the partitioning information.</para>
|
---|
844 |
|
---|
845 | <para>In some configurations it may be necessary to change the MBR
|
---|
846 | code of the created image, e.g. to replace the Linux boot loader that
|
---|
847 | is used on the host by another boot loader. This allows e.g. the guest
|
---|
848 | to boot directly to Windows, while the host boots Linux from the
|
---|
849 | "same" disk. For this purpose the
|
---|
850 | <computeroutput>-mbr</computeroutput> parameter is provided. It
|
---|
851 | specifies a file name from which to take the MBR code. The partition
|
---|
852 | table is not modified at all, so a MBR file from a system with totally
|
---|
853 | different partitioning can be used. An example of this is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
|
---|
854 | -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr</screen>The modified
|
---|
855 | MBR will be stored inside the image, not on the host disk.</para>
|
---|
856 |
|
---|
857 | <para>The created image can be attached to a storage controller in
|
---|
858 | a VM configuration as usual.</para>
|
---|
859 | </sect3>
|
---|
860 | </sect2>
|
---|
861 |
|
---|
862 | <sect2 id="changevpd">
|
---|
863 | <title>Configuring the hard disk vendor product data (VPD)</title>
|
---|
864 |
|
---|
865 | <para>VirtualBox reports vendor product data for its virtual hard disks
|
---|
866 | which consist of hard disk serial number, firmware revision and model
|
---|
867 | number. These can be changed using the following commands:</para>
|
---|
868 |
|
---|
869 | <screen>VBoxManage setextradata "VM name"
|
---|
870 | "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
|
---|
871 | VBoxManage setextradata "VM name"
|
---|
872 | "VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
|
---|
873 | VBoxManage setextradata "VM name"
|
---|
874 | "VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
|
---|
875 |
|
---|
876 | <para>The serial number is a 20 byte alphanumeric string, the firmware
|
---|
877 | revision an 8 byte alphanumeric string and the model number a 40 byte
|
---|
878 | alphanumeric string. Instead of "Port0" (referring to the first port),
|
---|
879 | specify the desired SATA hard disk port.</para>
|
---|
880 |
|
---|
881 | <para>The above commands apply to virtual machines with an AHCI (SATA)
|
---|
882 | controller. The commands for virtual machines with an IDE controller
|
---|
883 | are:</para>
|
---|
884 |
|
---|
885 | <screen>VBoxManage setextradata "VM name"
|
---|
886 | "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
|
---|
887 | VBoxManage setextradata "VM name"
|
---|
888 | "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision" "firmware"
|
---|
889 | VBoxManage setextradata "VM name"
|
---|
890 | "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber" "model"</screen>
|
---|
891 |
|
---|
892 | <para>For hard disks it's also possible (experimental!) to mark the drive
|
---|
893 | as having a non-rotational medium with:</para>
|
---|
894 |
|
---|
895 | <screen>VBoxManage setextradata "VM name"
|
---|
896 | "VBoxInternal/Devices/ahci/0/Config/Port0/NonRotational" "1"</screen>
|
---|
897 |
|
---|
898 | <para>Additional three parameters are needed for CD/DVD drives to report
|
---|
899 | the vendor product data:</para>
|
---|
900 |
|
---|
901 | <screen>VBoxManage setextradata "VM name"
|
---|
902 | "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
|
---|
903 | VBoxManage setextradata "VM name"
|
---|
904 | "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
|
---|
905 | VBoxManage setextradata "VM name"
|
---|
906 | "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
|
---|
907 |
|
---|
908 | <para>The vendor id is an 8 byte alphanumeric string, the product id an
|
---|
909 | 16 byte alphanumeric string and the revision a 4 byte alphanumeric
|
---|
910 | string. Instead of "Port0" (referring to the first port), specify the
|
---|
911 | desired SATA hard disk port.</para>
|
---|
912 | </sect2>
|
---|
913 |
|
---|
914 | <sect2>
|
---|
915 | <title id="iscsi-intnet">Access iSCSI targets via Internal
|
---|
916 | Networking</title>
|
---|
917 |
|
---|
918 | <para>As an experimental feature, VirtualBox allows for accessing an
|
---|
919 | iSCSI target running in a virtual machine which is configured for using
|
---|
920 | Internal Networking mode. Please see <xref linkend="storage-iscsi" />;
|
---|
921 | <xref linkend="network_internal" />; and <xref
|
---|
922 | linkend="vboxmanage-storageattach" /> for additional information.</para>
|
---|
923 |
|
---|
924 | <para>The IP stack accessing Internal Networking must be configured in
|
---|
925 | the virtual machine which accesses the iSCSI target. A free static IP
|
---|
926 | and a MAC address not used by other virtual machines must be chosen. In
|
---|
927 | the example below, adapt the name of the virtual machine, the MAC
|
---|
928 | address, the IP configuration and the Internal Networking name
|
---|
929 | ("MyIntNet") according to your needs. The following seven commands must
|
---|
930 | first be issued:<screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Trusted 1
|
---|
931 | VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f
|
---|
932 | VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1
|
---|
933 | VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0
|
---|
934 | VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet
|
---|
935 | VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet
|
---|
936 | VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1</screen></para>
|
---|
937 |
|
---|
938 | <para>Finally the iSCSI disk must be attached with the
|
---|
939 | <computeroutput>--intnet</computeroutput> option to tell the iSCSI
|
---|
940 | initiator to use internal networking:<screen>VBoxManage storageattach ... --medium iscsi
|
---|
941 | --server 10.0.9.30 --target iqn.2008-12.com.sun:sampletarget --intnet</screen></para>
|
---|
942 |
|
---|
943 | <para>Compared to a "regular" iSCSI setup, IP address of the target
|
---|
944 | <emphasis>must</emphasis> be specified as a numeric IP address, as there
|
---|
945 | is no DNS resolver for internal networking.</para>
|
---|
946 |
|
---|
947 | <para>The virtual machine with the iSCSI target should be started before
|
---|
948 | the VM using it is powered on. If a virtual machine using an iSCSI disk
|
---|
949 | is started without having the iSCSI target powered up, it can take up to
|
---|
950 | 200 seconds to detect this situation. The VM will fail to power
|
---|
951 | up.</para>
|
---|
952 | </sect2>
|
---|
953 | </sect1>
|
---|
954 |
|
---|
955 | <sect1>
|
---|
956 | <title>Launching more than 120 VMs on Solaris hosts</title>
|
---|
957 |
|
---|
958 | <para>Solaris hosts have a fixed number of IPC semaphores IDs per process
|
---|
959 | preventing users from starting more than 120 VMs. While trying to launch
|
---|
960 | more VMs you would be shown a "Cannot create IPC semaphore" error.</para>
|
---|
961 |
|
---|
962 | <para>In order to run more VMs, you will need to bump the semaphore ID
|
---|
963 | limit of the VBoxSVC process. Execute as root the
|
---|
964 | <computeroutput>prctl</computeroutput> command as shown below. The process
|
---|
965 | ID of VBoxSVC can be obtained using the
|
---|
966 | <computeroutput>ps</computeroutput> list command.</para>
|
---|
967 |
|
---|
968 | <para><screen>prctl -r -n project.max-sem-ids -v 2048 <pid-of-VBoxSVC></screen></para>
|
---|
969 | </sect1>
|
---|
970 |
|
---|
971 | <sect1>
|
---|
972 | <title>Legacy commands for using serial ports</title>
|
---|
973 |
|
---|
974 | <para>Starting with version 1.4, VirtualBox provided support for virtual
|
---|
975 | serial ports, which, at the time, was rather complicated to set up with a
|
---|
976 | sequence of <computeroutput>VBoxManage setextradata</computeroutput>
|
---|
977 | statements. Since version 1.5, that way of setting up serial ports is no
|
---|
978 | longer necessary and <emphasis>deprecated.</emphasis> To set up virtual
|
---|
979 | serial ports, use the methods now described in <xref
|
---|
980 | linkend="serialports" />.<note>
|
---|
981 | <para>For backwards compatibility, the old
|
---|
982 | <computeroutput>setextradata</computeroutput> statements, whose
|
---|
983 | description is retained below from the old version of the manual, take
|
---|
984 | <emphasis>precedence</emphasis> over the new way of configuring serial
|
---|
985 | ports. As a result, if configuring serial ports the new way doesn't
|
---|
986 | work, make sure the VM in question does not have old configuration
|
---|
987 | data such as below still active.</para>
|
---|
988 | </note></para>
|
---|
989 |
|
---|
990 | <para>The old sequence of configuring a serial port used the following 6
|
---|
991 | commands:</para>
|
---|
992 |
|
---|
993 | <screen>VBoxManage setextradata "VM name"
|
---|
994 | "VBoxInternal/Devices/serial/0/Config/IRQ" 4
|
---|
995 | VBoxManage setextradata "VM name"
|
---|
996 | "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
|
---|
997 | VBoxManage setextradata "VM name"
|
---|
998 | "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
|
---|
999 | VBoxManage setextradata "VM name"
|
---|
1000 | "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
|
---|
1001 | VBoxManage setextradata "VM name"
|
---|
1002 | "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
|
---|
1003 | VBoxManage setextradata "VM name"
|
---|
1004 | "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1</screen>
|
---|
1005 |
|
---|
1006 | <para>This sets up a serial port in the guest with the default settings
|
---|
1007 | for COM1 (IRQ 4, I/O address 0x3f8) and the
|
---|
1008 | <computeroutput>Location</computeroutput> setting assumes that this
|
---|
1009 | configuration is used on a Windows host, because the Windows named pipe
|
---|
1010 | syntax is used. Keep in mind that on Windows hosts a named pipe must
|
---|
1011 | always start with <computeroutput>\\.\pipe\</computeroutput>. On Linux the
|
---|
1012 | same config settings apply, except that the path name for the
|
---|
1013 | <computeroutput>Location</computeroutput> can be chosen more freely. Local
|
---|
1014 | domain sockets can be placed anywhere, provided the user running
|
---|
1015 | VirtualBox has the permission to create a new file in the directory. The
|
---|
1016 | final command above defines that VirtualBox acts as a server, i.e. it
|
---|
1017 | creates the named pipe itself instead of connecting to an already existing
|
---|
1018 | one.</para>
|
---|
1019 | </sect1>
|
---|
1020 |
|
---|
1021 | <sect1 id="changenat">
|
---|
1022 | <title>Fine-tuning the VirtualBox NAT engine</title>
|
---|
1023 |
|
---|
1024 | <sect2>
|
---|
1025 | <title>Configuring the address of a NAT network interface</title>
|
---|
1026 |
|
---|
1027 | <para>In NAT mode, the guest network interface is assigned to the IPv4
|
---|
1028 | range <computeroutput>10.0.x.0/24</computeroutput> by default where
|
---|
1029 | <computeroutput>x</computeroutput> corresponds to the instance of the
|
---|
1030 | NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
|
---|
1031 | is only one NAT instance active. In that case the guest is assigned to
|
---|
1032 | the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
|
---|
1033 | set to <computeroutput>10.0.2.2</computeroutput> and the name server can
|
---|
1034 | be found at <computeroutput>10.0.2.3</computeroutput>.</para>
|
---|
1035 |
|
---|
1036 | <para>If, for any reason, the NAT network needs to be changed, this can
|
---|
1037 | be achieved with the following command:</para>
|
---|
1038 |
|
---|
1039 | <screen>VBoxManage modifyvm "VM name" --natnet1 "192.168/16"</screen>
|
---|
1040 |
|
---|
1041 | <para>This command would reserve the network addresses from
|
---|
1042 | <computeroutput>192.168.0.0</computeroutput> to
|
---|
1043 | <computeroutput>192.168.254.254</computeroutput> for the first NAT
|
---|
1044 | network instance of "VM name". The guest IP would be assigned to
|
---|
1045 | <computeroutput>192.168.0.15</computeroutput> and the default gateway
|
---|
1046 | could be found at <computeroutput>192.168.0.2</computeroutput>.</para>
|
---|
1047 | </sect2>
|
---|
1048 |
|
---|
1049 | <sect2 id="nat-adv-tftp">
|
---|
1050 | <title>Configuring the boot server (next server) of a NAT network
|
---|
1051 | interface</title>
|
---|
1052 |
|
---|
1053 | <para>For network booting in NAT mode, by default VirtualBox uses a
|
---|
1054 | built-in TFTP server at the IP address 10.0.2.3. This default behavior
|
---|
1055 | should work fine for typical remote-booting scenarios. However, it is
|
---|
1056 | possible to change the boot server IP and the location of the boot image
|
---|
1057 | with the following commands: <screen>VBoxManage modifyvm "VM name" --nattftpserver1 10.0.2.2
|
---|
1058 | VBoxManage modifyvm "VM name" --nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen></para>
|
---|
1059 | </sect2>
|
---|
1060 |
|
---|
1061 | <sect2 id="nat-adv-settings">
|
---|
1062 | <title>Tuning TCP/IP buffers for NAT</title>
|
---|
1063 |
|
---|
1064 | <para>The VirtualBox NAT stack performance is often determined by its
|
---|
1065 | interaction with the host's TCP/IP stack and the size of several buffers
|
---|
1066 | (<computeroutput>SO_RCVBUF</computeroutput> and
|
---|
1067 | <computeroutput>SO_SNDBUF</computeroutput>). For certain setups users
|
---|
1068 | might want to adjust the buffer size for a better performance. This can
|
---|
1069 | by achieved using the following commands (values are in kilobytes and
|
---|
1070 | can range from 8 to 1024): <screen>VBoxManage modifyvm "VM name" --natsettings1 16000,128,128,0,0</screen>
|
---|
1071 | This example illustrates tuning the NAT settings. The first parameter is
|
---|
1072 | the MTU, then the size of the socket's send buffer and the size of the
|
---|
1073 | socket's receive buffer, the initial size of the TCP send window, and
|
---|
1074 | lastly the initial size of the TCP receive window. Note that specifying
|
---|
1075 | zero means fallback to the default value.</para>
|
---|
1076 |
|
---|
1077 | <para>Each of these buffers has a default size of 64KB and default MTU
|
---|
1078 | is 1500.</para>
|
---|
1079 | </sect2>
|
---|
1080 |
|
---|
1081 | <sect2>
|
---|
1082 | <title>Binding NAT sockets to a specific interface</title>
|
---|
1083 |
|
---|
1084 | <para>By default, VirtualBox's NAT engine will route TCP/IP packets
|
---|
1085 | through the default interface assigned by the host's TCP/IP stack. (The
|
---|
1086 | technical reason for this is that the NAT engine uses sockets for
|
---|
1087 | communication.) If, for some reason, you want to change this behavior,
|
---|
1088 | you can tell the NAT engine to bind to a particular IP address instead.
|
---|
1089 | Use the following command: <screen>VBoxManage modifyvm "VM name" --natbindip1 "10.45.0.2"</screen></para>
|
---|
1090 |
|
---|
1091 | <para>After this, all outgoing traffic will be sent through the
|
---|
1092 | interface with the IP address 10.45.0.2. Please make sure that this
|
---|
1093 | interface is up and running prior to this assignment.</para>
|
---|
1094 | </sect2>
|
---|
1095 |
|
---|
1096 | <sect2 id="nat-adv-dns">
|
---|
1097 | <title>Enabling DNS proxy in NAT mode</title>
|
---|
1098 |
|
---|
1099 | <para>The NAT engine by default offers the same DNS servers to the guest
|
---|
1100 | that are configured on the host. In some scenarios, it can be desirable
|
---|
1101 | to hide the DNS server IPs from the guest, for example when this
|
---|
1102 | information can change on the host due to expiring DHCP leases. In this
|
---|
1103 | case, you can tell the NAT engine to act as DNS proxy using the
|
---|
1104 | following command: <screen>VBoxManage modifyvm "VM name" --natdnsproxy1 on</screen></para>
|
---|
1105 | </sect2>
|
---|
1106 |
|
---|
1107 | <sect2 id="nat_host_resolver_proxy">
|
---|
1108 | <title>Using the host's resolver as a DNS proxy in NAT mode</title>
|
---|
1109 |
|
---|
1110 | <para>For resolving network names, the DHCP server of the NAT engine
|
---|
1111 | offers a list of registered DNS servers of the host. If for some reason
|
---|
1112 | you need to hide this DNS server list and use the host's resolver
|
---|
1113 | settings, thereby forcing the VirtualBox NAT engine to intercept DNS
|
---|
1114 | requests and forward them to host's resolver, use the following command:
|
---|
1115 | <screen>VBoxManage modifyvm "VM name" --natdnshostresolver1 on</screen>
|
---|
1116 | Note that this setting is similar to the DNS proxy mode, however whereas
|
---|
1117 | the proxy mode just forwards DNS requests to the appropriate servers,
|
---|
1118 | the resolver mode will interpret the DNS requests and use the host's DNS
|
---|
1119 | API to query the information and return it to the guest.</para>
|
---|
1120 | </sect2>
|
---|
1121 |
|
---|
1122 | <sect2 id="nat-adv-alias">
|
---|
1123 | <title>Configuring aliasing of the NAT engine</title>
|
---|
1124 |
|
---|
1125 | <para>By default, the NAT core uses aliasing and uses random ports when
|
---|
1126 | generating an alias for a connection. This works well for the most
|
---|
1127 | protocols like SSH, FTP and so on. Though some protocols might need a
|
---|
1128 | more transparent behavior or may depend on the real port number the
|
---|
1129 | packet was sent from. It is possible to change the NAT mode via the
|
---|
1130 | VBoxManage frontend with the following commands: <screen>VBoxManage modifyvm "VM name" --nataliasmode proxyonly</screen>
|
---|
1131 | and <screen>VBoxManage modifyvm "Linux Guest" --nataliasmode sameports</screen>
|
---|
1132 | The first example disables aliasing and switches NAT into transparent
|
---|
1133 | mode, the second example enforces preserving of port values. These modes
|
---|
1134 | can be combined if necessary.</para>
|
---|
1135 | </sect2>
|
---|
1136 | </sect1>
|
---|
1137 |
|
---|
1138 | <sect1 id="changedmi">
|
---|
1139 | <title>Configuring the BIOS DMI information</title>
|
---|
1140 |
|
---|
1141 | <para>The DMI data VirtualBox provides to guests can be changed for a
|
---|
1142 | specific VM. Use the following commands to configure the DMI BIOS
|
---|
1143 | information:</para>
|
---|
1144 |
|
---|
1145 | <screen>VBoxManage setextradata "VM name"
|
---|
1146 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
|
---|
1147 | VBoxManage setextradata "VM name"
|
---|
1148 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
|
---|
1149 | VBoxManage setextradata "VM name"
|
---|
1150 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
|
---|
1151 | VBoxManage setextradata "VM name"
|
---|
1152 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
|
---|
1153 | VBoxManage setextradata "VM name"
|
---|
1154 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
|
---|
1155 | VBoxManage setextradata "VM name"
|
---|
1156 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
|
---|
1157 | VBoxManage setextradata "VM name"
|
---|
1158 | "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4
|
---|
1159 | VBoxManage setextradata "VM name"
|
---|
1160 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
|
---|
1161 | VBoxManage setextradata "VM name"
|
---|
1162 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
|
---|
1163 | VBoxManage setextradata "VM name"
|
---|
1164 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
|
---|
1165 | VBoxManage setextradata "VM name"
|
---|
1166 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
|
---|
1167 | VBoxManage setextradata "VM name"
|
---|
1168 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
|
---|
1169 | VBoxManage setextradata "VM name"
|
---|
1170 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
|
---|
1171 | VBoxManage setextradata "VM name"
|
---|
1172 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"
|
---|
1173 | "9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
|
---|
1174 |
|
---|
1175 | <para>If a DMI string is not set, the default value of VirtualBox is used.
|
---|
1176 | To set an empty string use
|
---|
1177 | <computeroutput>"<EMPTY>"</computeroutput>.</para>
|
---|
1178 |
|
---|
1179 | <para>Note that in the above list, all quoted parameters (DmiBIOSVendor,
|
---|
1180 | DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be strings. If
|
---|
1181 | such a string is a valid number, the parameter is treated as number and
|
---|
1182 | the VM will most probably refuse to start with an
|
---|
1183 | <computeroutput>VERR_CFGM_NOT_STRING</computeroutput> error. In that case,
|
---|
1184 | use <computeroutput>"string:<value>"</computeroutput>, for instance
|
---|
1185 | <screen>VBoxManage setextradata "VM name"
|
---|
1186 | "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen></para>
|
---|
1187 |
|
---|
1188 | <para>Changing this information can be necessary to provide the DMI
|
---|
1189 | information of the host to the guest to prevent Windows from asking for a
|
---|
1190 | new product key. On Linux hosts the DMI BIOS information can be obtained
|
---|
1191 | with <screen>dmidecode -t0</screen>and the DMI system information can be
|
---|
1192 | obtained with <screen>dmidecode -t1</screen></para>
|
---|
1193 | </sect1>
|
---|
1194 |
|
---|
1195 | <sect1>
|
---|
1196 | <title>Fine-tuning timers and time synchronization</title>
|
---|
1197 |
|
---|
1198 | <sect2 id="changetscmode">
|
---|
1199 | <title>Configuring the guest time stamp counter (TSC) to reflect guest
|
---|
1200 | execution</title>
|
---|
1201 |
|
---|
1202 | <para>By default, VirtualBox keeps all sources of time visible to the
|
---|
1203 | guest synchronized to a single time source, the monotonic host time.
|
---|
1204 | This reflects the assumptions of many guest operating systems, which
|
---|
1205 | expect all time sources to reflect "wall clock" time. In special
|
---|
1206 | circumstances it may be useful however to make the TSC (time stamp
|
---|
1207 | counter) in the guest reflect the time actually spent executing the
|
---|
1208 | guest.</para>
|
---|
1209 |
|
---|
1210 | <para>This special TSC handling mode can be enabled on a per-VM basis,
|
---|
1211 | and for best results must be used only in combination with hardware
|
---|
1212 | virtualization. To enable this mode use the following command:</para>
|
---|
1213 |
|
---|
1214 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
|
---|
1215 |
|
---|
1216 | <para>To revert to the default TSC handling mode use:</para>
|
---|
1217 |
|
---|
1218 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
|
---|
1219 |
|
---|
1220 | <para>Note that if you use the special TSC handling mode with a guest
|
---|
1221 | operating system which is very strict about the consistency of time
|
---|
1222 | sources you may get a warning or error message about the timing
|
---|
1223 | inconsistency. It may also cause clocks to become unreliable with some
|
---|
1224 | guest operating systems depending on they use the TSC.</para>
|
---|
1225 | </sect2>
|
---|
1226 |
|
---|
1227 | <sect2 id="warpguest">
|
---|
1228 | <title>Accelerate or slow down the guest clock</title>
|
---|
1229 |
|
---|
1230 | <para>For certain purposes it can be useful to accelerate or to slow
|
---|
1231 | down the (virtual) guest clock. This can be achieved as follows:</para>
|
---|
1232 |
|
---|
1233 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
|
---|
1234 |
|
---|
1235 | <para>The above example will double the speed of the guest clock
|
---|
1236 | while</para>
|
---|
1237 |
|
---|
1238 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
|
---|
1239 |
|
---|
1240 | <para>will halve the speed of the guest clock. Note that changing the
|
---|
1241 | rate of the virtual clock can confuse the guest and can even lead to
|
---|
1242 | abnormal guest behavior. For instance, a higher clock rate means shorter
|
---|
1243 | timeouts for virtual devices with the result that a slightly increased
|
---|
1244 | response time of a virtual device due to an increased host load can
|
---|
1245 | cause guest failures. Note further that any time synchronization
|
---|
1246 | mechanism will frequently try to resynchronize the guest clock with the
|
---|
1247 | reference clock (which is the host clock if the VirtualBox Guest
|
---|
1248 | Additions are active). Therefore any time synchronization should be
|
---|
1249 | disabled if the rate of the guest clock is changed as described above
|
---|
1250 | (see <xref linkend="changetimesync" />).</para>
|
---|
1251 | </sect2>
|
---|
1252 |
|
---|
1253 | <sect2 id="changetimesync">
|
---|
1254 | <title>Tuning the Guest Additions time synchronization
|
---|
1255 | parameters</title>
|
---|
1256 |
|
---|
1257 | <para>The VirtualBox Guest Additions ensure that the guest's system time
|
---|
1258 | is synchronized with the host time. There are several parameters which
|
---|
1259 | can be tuned. The parameters can be set for a specific VM using the
|
---|
1260 | following command:</para>
|
---|
1261 |
|
---|
1262 | <screen>VBoxManage guestproperty set VM_NAME "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
|
---|
1263 |
|
---|
1264 | <para>where <computeroutput>PARAMETER</computeroutput> is one of the
|
---|
1265 | following:</para>
|
---|
1266 |
|
---|
1267 | <para><glosslist>
|
---|
1268 | <glossentry>
|
---|
1269 | <glossterm><computeroutput>--timesync-interval</computeroutput></glossterm>
|
---|
1270 |
|
---|
1271 | <glossdef>
|
---|
1272 | <para>Specifies the interval at which to synchronize the time
|
---|
1273 | with the host. The default is 10000 ms (10 seconds).</para>
|
---|
1274 | </glossdef>
|
---|
1275 | </glossentry>
|
---|
1276 |
|
---|
1277 | <glossentry>
|
---|
1278 | <glossterm><computeroutput>--timesync-min-adjust</computeroutput></glossterm>
|
---|
1279 |
|
---|
1280 | <glossdef>
|
---|
1281 | <para>The minimum absolute drift value measured in milliseconds
|
---|
1282 | to make adjustments for. The default is 1000 ms on OS/2 and 100
|
---|
1283 | ms elsewhere.</para>
|
---|
1284 | </glossdef>
|
---|
1285 | </glossentry>
|
---|
1286 |
|
---|
1287 | <glossentry>
|
---|
1288 | <glossterm><computeroutput>--timesync-latency-factor</computeroutput></glossterm>
|
---|
1289 |
|
---|
1290 | <glossdef>
|
---|
1291 | <para>The factor to multiply the time query latency with to
|
---|
1292 | calculate the dynamic minimum adjust time. The default is 8
|
---|
1293 | times, that means in detail: Measure the time it takes to
|
---|
1294 | determine the host time (the guest has to contact the VM host
|
---|
1295 | service which may take some time), multiply this value by 8 and
|
---|
1296 | do an adjustment only if the time difference between host and
|
---|
1297 | guest is bigger than this value. Don't do any time adjustment
|
---|
1298 | otherwise.</para>
|
---|
1299 | </glossdef>
|
---|
1300 | </glossentry>
|
---|
1301 |
|
---|
1302 | <glossentry>
|
---|
1303 | <glossterm><computeroutput>--timesync-max-latency</computeroutput></glossterm>
|
---|
1304 |
|
---|
1305 | <glossdef>
|
---|
1306 | <para>The max host timer query latency to accept. The default is
|
---|
1307 | 250 ms.</para>
|
---|
1308 | </glossdef>
|
---|
1309 | </glossentry>
|
---|
1310 |
|
---|
1311 | <glossentry>
|
---|
1312 | <glossterm><computeroutput>--timesync-set-threshold</computeroutput></glossterm>
|
---|
1313 |
|
---|
1314 | <glossdef>
|
---|
1315 | <para>The absolute drift threshold, given as milliseconds where
|
---|
1316 | to start setting the time instead of trying to smoothly adjust
|
---|
1317 | it. The default is 20 minutes.</para>
|
---|
1318 | </glossdef>
|
---|
1319 | </glossentry>
|
---|
1320 |
|
---|
1321 | <glossentry>
|
---|
1322 | <glossterm><computeroutput>--timesync-set-start</computeroutput></glossterm>
|
---|
1323 |
|
---|
1324 | <glossdef>
|
---|
1325 | <para>Set the time when starting the time sync service.</para>
|
---|
1326 | </glossdef>
|
---|
1327 | </glossentry>
|
---|
1328 |
|
---|
1329 | <glossentry>
|
---|
1330 | <glossterm><computeroutput>--timesync-set-on-restore
|
---|
1331 | 0|1</computeroutput></glossterm>
|
---|
1332 |
|
---|
1333 | <glossdef>
|
---|
1334 | <para>Set the time after the VM was restored from a saved state
|
---|
1335 | when passing 1 as parameter (default). Disable by passing 0. In
|
---|
1336 | the latter case, the time will be adjusted smoothly which can
|
---|
1337 | take a long time.</para>
|
---|
1338 | </glossdef>
|
---|
1339 | </glossentry>
|
---|
1340 | </glosslist></para>
|
---|
1341 |
|
---|
1342 | <para>All these parameters can be specified as command line parameters
|
---|
1343 | to VBoxService as well.</para>
|
---|
1344 | </sect2>
|
---|
1345 | </sect1>
|
---|
1346 |
|
---|
1347 | <sect1 id="addhostonlysolaris">
|
---|
1348 | <title>Configuring multiple host-only network interfaces on Solaris
|
---|
1349 | hosts</title>
|
---|
1350 |
|
---|
1351 | <para>By default VirtualBox provides you with one host-only network
|
---|
1352 | interface. Adding more host-only network interfaces on Solaris hosts
|
---|
1353 | requires manual configuration. Here's how to add two more host-only
|
---|
1354 | network interfaces.</para>
|
---|
1355 |
|
---|
1356 | <para>You first need to stop all running VMs and unplumb all existing
|
---|
1357 | "vboxnet" interfaces. Execute the following commands as root:</para>
|
---|
1358 |
|
---|
1359 | <screen>ifconfig vboxnet0 unplumb</screen>
|
---|
1360 |
|
---|
1361 | <para>Once you make sure all vboxnet interfaces are unplumbed, remove the
|
---|
1362 | driver using:</para>
|
---|
1363 |
|
---|
1364 | <para><screen>rem_drv vboxnet</screen>then edit the file
|
---|
1365 | <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
|
---|
1366 | and add a line for the new interfaces:</para>
|
---|
1367 |
|
---|
1368 | <para><screen>name="vboxnet" parent="pseudo" instance=1;
|
---|
1369 | name="vboxnet" parent="pseudo" instance=2;</screen>Add as many of these lines
|
---|
1370 | as required and make sure "instance" number is uniquely incremented. Next
|
---|
1371 | reload the vboxnet driver using:</para>
|
---|
1372 |
|
---|
1373 | <para><screen>add_drv vboxnet</screen>Now plumb all the interfaces using
|
---|
1374 | <computeroutput>ifconfig vboxnetX plumb</computeroutput> (where X can be
|
---|
1375 | 0, 1 or 2 in this case) and once plumbed you can then configure the
|
---|
1376 | interface like any other network interface.</para>
|
---|
1377 |
|
---|
1378 | <para>To make your newly added interfaces' settings persistent across
|
---|
1379 | reboots you will need to edit the files
|
---|
1380 | <computeroutput>/etc/netmasks</computeroutput>, and if you are using NWAM
|
---|
1381 | <computeroutput>/etc/nwam/llp</computeroutput> and add the appropriate
|
---|
1382 | entries to set the netmask and static IP for each of those interfaces. The
|
---|
1383 | VirtualBox installer only updates these configuration files for the one
|
---|
1384 | "vboxnet0" interface it creates by default.</para>
|
---|
1385 | </sect1>
|
---|
1386 |
|
---|
1387 | <sect1 id="solariscodedumper">
|
---|
1388 | <title>Configuring the VirtualBox CoreDumper on Solaris hosts</title>
|
---|
1389 |
|
---|
1390 | <para>VirtualBox is capable of producing its own core files when things go
|
---|
1391 | wrong and for more extensive debugging. Currently this is only available
|
---|
1392 | on Solaris hosts.</para>
|
---|
1393 |
|
---|
1394 | <para>The VirtualBox CoreDumper can be enabled using the following
|
---|
1395 | command:</para>
|
---|
1396 |
|
---|
1397 | <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen></para>
|
---|
1398 |
|
---|
1399 | <para>You can specify which directory to use for core dumps with this
|
---|
1400 | command:</para>
|
---|
1401 |
|
---|
1402 | <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir <path-to-directory></screen>Make
|
---|
1403 | sure the directory you specify is on a volume with sufficient free space
|
---|
1404 | and that the VirtualBox process has sufficient permissions to write files
|
---|
1405 | to this directory. If you skip this command and don't specify any core
|
---|
1406 | dump directory, the current directory of the VirtualBox executable will be
|
---|
1407 | used (which would most likely fail when writing cores as they are
|
---|
1408 | protected with root permissions). It is recommended you explicity set a
|
---|
1409 | core dump directory.</para>
|
---|
1410 |
|
---|
1411 | <para>You must specify when the VirtualBox CoreDumper should be triggered.
|
---|
1412 | This is done using the following commands:</para>
|
---|
1413 |
|
---|
1414 | <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
|
---|
1415 | VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>At
|
---|
1416 | least one of the above two commands will have to be provided if you have
|
---|
1417 | enabled the VirtualBox CoreDumper.</para>
|
---|
1418 |
|
---|
1419 | <para>Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
|
---|
1420 | sets up the VM to override the host's core dumping mechanism and in the
|
---|
1421 | event of any crash only the VirtualBox CoreDumper would produce the core
|
---|
1422 | file.</para>
|
---|
1423 |
|
---|
1424 | <para>Setting <computeroutput>CoreDumpLive</computeroutput> sets up the VM
|
---|
1425 | to produce cores whenever the VM receives a
|
---|
1426 | <computeroutput>SIGUSR2</computeroutput> signal. After producing the core
|
---|
1427 | file, the VM will not be terminated and will continue to run. You can then
|
---|
1428 | take cores of the VM process using:</para>
|
---|
1429 |
|
---|
1430 | <para><screen>kill -s SIGUSR2 <VM-process-id></screen></para>
|
---|
1431 |
|
---|
1432 | <para>Core files produced by the VirtualBox CoreDumper are of the form
|
---|
1433 | <computeroutput>core.vb.<ProcessName>.<ProcessID></computeroutput>,
|
---|
1434 | e.g.<computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.</para>
|
---|
1435 | </sect1>
|
---|
1436 |
|
---|
1437 | <sect1 id="guitweaks">
|
---|
1438 | <title>Locking down the VirtualBox manager GUI</title>
|
---|
1439 |
|
---|
1440 | <para>There are several advanced customization settings for locking down
|
---|
1441 | the VirtualBox manager, that is, removing some features that the user
|
---|
1442 | should not see.<screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen></para>
|
---|
1443 |
|
---|
1444 | <para>where <computeroutput>OPTION</computeroutput> is one of the
|
---|
1445 | following keywords:<glosslist>
|
---|
1446 | <glossentry>
|
---|
1447 | <glossterm><computeroutput>noSelector</computeroutput></glossterm>
|
---|
1448 |
|
---|
1449 | <glossdef>
|
---|
1450 | <para>Don't allow to start the VirtualBox manager. Trying to do so
|
---|
1451 | will show a window containing a proper error message.</para>
|
---|
1452 | </glossdef>
|
---|
1453 | </glossentry>
|
---|
1454 |
|
---|
1455 | <glossentry>
|
---|
1456 | <glossterm><computeroutput>noMenuBar</computeroutput></glossterm>
|
---|
1457 |
|
---|
1458 | <glossdef>
|
---|
1459 | <para>VM windows will not contain a menu bar.</para>
|
---|
1460 | </glossdef>
|
---|
1461 | </glossentry>
|
---|
1462 |
|
---|
1463 | <glossentry>
|
---|
1464 | <glossterm><computeroutput>noStatusBar</computeroutput></glossterm>
|
---|
1465 |
|
---|
1466 | <glossdef>
|
---|
1467 | <para>VM windows will not contain a status bar.</para>
|
---|
1468 | </glossdef>
|
---|
1469 | </glossentry>
|
---|
1470 | </glosslist></para>
|
---|
1471 |
|
---|
1472 | <para>To disable any GUI customization do <screen>VBoxManage setextradata global GUI/Customizations</screen></para>
|
---|
1473 |
|
---|
1474 | <para>To disable all host key combinations, open the preferences and
|
---|
1475 | change the host key to <emphasis>None</emphasis>. This might be useful
|
---|
1476 | when using VirtualBox in a kiosk mode.</para>
|
---|
1477 |
|
---|
1478 | <para>Furthermore, you can disallow certain actions when terminating a VM.
|
---|
1479 | To disallow specific actions, type:</para>
|
---|
1480 |
|
---|
1481 | <para><screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen></para>
|
---|
1482 |
|
---|
1483 | <para>where <computeroutput>OPTION</computeroutput> is one of the
|
---|
1484 | following keywords:<glosslist>
|
---|
1485 | <glossentry>
|
---|
1486 | <glossterm><computeroutput>SaveState</computeroutput></glossterm>
|
---|
1487 |
|
---|
1488 | <glossdef>
|
---|
1489 | <para>Don't allow the user to save the VM state when terminating
|
---|
1490 | the VM.</para>
|
---|
1491 | </glossdef>
|
---|
1492 | </glossentry>
|
---|
1493 |
|
---|
1494 | <glossentry>
|
---|
1495 | <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
|
---|
1496 |
|
---|
1497 | <glossdef>
|
---|
1498 | <para>Don't allow the user to shutdown the VM by sending the ACPI
|
---|
1499 | power-off event to the guest.</para>
|
---|
1500 | </glossdef>
|
---|
1501 | </glossentry>
|
---|
1502 |
|
---|
1503 | <glossentry>
|
---|
1504 | <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
|
---|
1505 |
|
---|
1506 | <glossdef>
|
---|
1507 | <para>Don't allow the user to power off the VM.</para>
|
---|
1508 | </glossdef>
|
---|
1509 | </glossentry>
|
---|
1510 |
|
---|
1511 | <glossentry>
|
---|
1512 | <glossterm><computeroutput>Restore</computeroutput></glossterm>
|
---|
1513 |
|
---|
1514 | <glossdef>
|
---|
1515 | <para>Don't allow the user to return to the last snapshot when
|
---|
1516 | powering off the VM.</para>
|
---|
1517 | </glossdef>
|
---|
1518 | </glossentry>
|
---|
1519 | </glosslist></para>
|
---|
1520 |
|
---|
1521 | <para>Any combination of the above is allowed. If all options are
|
---|
1522 | specified, the VM cannot be shut down at all.</para>
|
---|
1523 | </sect1>
|
---|
1524 |
|
---|
1525 | <sect1 id="vboxwebsrv-daemon">
|
---|
1526 | <title>Starting the VirtualBox web service automatically</title>
|
---|
1527 |
|
---|
1528 | <para>The VirtualBox web service
|
---|
1529 | (<computeroutput>vboxwebsrv</computeroutput>) is used for controlling
|
---|
1530 | VirtualBox remotely. It is documented in detail in the VirtualBox Software
|
---|
1531 | Development Kit (SDK); please see <xref linkend="VirtualBoxAPI" />. As the
|
---|
1532 | client base using this interface is growing, we added start scripts for
|
---|
1533 | the various operation systems we support. The following describes how to
|
---|
1534 | use them. <itemizedlist>
|
---|
1535 | <listitem>
|
---|
1536 | <para>On Mac OS X, launchd is used. An example configuration file
|
---|
1537 | can be found in
|
---|
1538 | <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
|
---|
1539 | It can be enabled by changing the
|
---|
1540 | <computeroutput>Disabled</computeroutput> key from
|
---|
1541 | <computeroutput>true</computeroutput> to
|
---|
1542 | <computeroutput>false</computeroutput>. To manually start the
|
---|
1543 | service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
|
---|
1544 | For additional information on how launchd services could be
|
---|
1545 | configured see <literal><ulink
|
---|
1546 | 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>
|
---|
1547 | </listitem>
|
---|
1548 | </itemizedlist></para>
|
---|
1549 | </sect1>
|
---|
1550 |
|
---|
1551 | <sect1 id="vboxballoonctrl">
|
---|
1552 | <title>Memory Ballooning Service</title>
|
---|
1553 |
|
---|
1554 | <para>Starting with VirtualBox 4.0.8 a new host executable called <computeroutput>VBoxBalloonCtrl</computeroutput> is
|
---|
1555 | available to automatically take care of a VM's configured memory balloon (see <xref linkend="guestadd-balloon" />
|
---|
1556 | for an introduction to memory ballooning). This is especially useful for server environments where VMs may dynamically
|
---|
1557 | require more or less memory during runtime.</para>
|
---|
1558 |
|
---|
1559 | <para>VBoxBalloonCtrl periodically checks a VM's current memory balloon and its free guest RAM and automatically adjusts
|
---|
1560 | the current memory balloon by inflating or deflating it accordingly. This handling only applies to running VMs having recent
|
---|
1561 | Guest Additions installed.</para>
|
---|
1562 |
|
---|
1563 | <para>To set up VBoxBalloonCtrl and adjust the maximum ballooning size a VM can reach the following parameters will be checked in the following
|
---|
1564 | order:
|
---|
1565 | <itemizedlist>
|
---|
1566 | <listitem>specified via VBoxBalloonCtrl command line parameter <computeroutput>--balloon-max</computeroutput></listitem>
|
---|
1567 | <listitem>per-VM parameter using <screen>VBoxManage setextradata "VM-Name" VBoxInternal/Guest/BalloonSizeMax <Size in MB></screen></listitem>
|
---|
1568 | <listitem>global parameter for all VMs using <screen>VBoxManage setextradata global VBoxInternal/Guest/BalloonSizeMax <Size in MB></screen></listitem>
|
---|
1569 | </itemizedlist>
|
---|
1570 | <note>
|
---|
1571 | <para>If no maximum ballooning size is specified by at least one of the parameters above, no ballooning will be performed at all.</para>
|
---|
1572 | </note>
|
---|
1573 | </para>
|
---|
1574 |
|
---|
1575 | <para>For more options and parameters check the built-in command line help accessible with <computeroutput>--help</computeroutput>.</para>
|
---|
1576 | </sect1>
|
---|
1577 | </chapter>
|
---|