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="Troubleshooting">
|
---|
5 | <title>Troubleshooting</title>
|
---|
6 |
|
---|
7 | <para>This chapter provides answers to commonly asked questions. In order to
|
---|
8 | improve your user experience with VirtualBox, it is recommended to read this
|
---|
9 | section to learn more about common pitfalls and get recommendations on how
|
---|
10 | to use the product.</para>
|
---|
11 |
|
---|
12 | <sect1>
|
---|
13 | <title>Procedures and tools</title>
|
---|
14 |
|
---|
15 | <sect2>
|
---|
16 | <title>Categorizing and isolating problems</title>
|
---|
17 |
|
---|
18 | <para>More often than not, a virtualized guest behaves like a physical
|
---|
19 | system. Any problems that a physical machine would encounter, a virtual
|
---|
20 | machine will encounter as well. If, for example, Internet connectivity
|
---|
21 | is lost due to external issues, virtual machines will be affected just
|
---|
22 | as much as physical ones.</para>
|
---|
23 |
|
---|
24 | <para>If a true VirtualBox problem is encountered, it helps to
|
---|
25 | categorize and isolate the problem first. Here are some of the questions
|
---|
26 | that should be answered before reporting a problem:<orderedlist>
|
---|
27 | <listitem>
|
---|
28 | <para>Is the problem specific to a certain guest OS? Specific
|
---|
29 | release of a guest OS? Especially with Linux guest related
|
---|
30 | problems, the issue may be specific to a certain distribution and
|
---|
31 | version of Linux.</para>
|
---|
32 | </listitem>
|
---|
33 |
|
---|
34 | <listitem>
|
---|
35 | <para>Is the problem specific to a certain host OS? Problems are
|
---|
36 | usually not host OS specific (because most of the VirtualBox code
|
---|
37 | base is shared across all supported platforms), but especially in
|
---|
38 | the areas of networking and USB support, there are significant
|
---|
39 | differences between host platforms. Some GUI related issues are
|
---|
40 | also host specific.</para>
|
---|
41 | </listitem>
|
---|
42 |
|
---|
43 | <listitem>
|
---|
44 | <para>Is the problem specific to certain host hardware? This
|
---|
45 | category of issues is typically related to the host CPU. Because
|
---|
46 | of significant differences between VT-x and AMD-V, problems may be
|
---|
47 | specific to one or the other technology. The exact CPU model may
|
---|
48 | also make a difference (even for software virtualization) because
|
---|
49 | different CPUs support different features, which may affect
|
---|
50 | certain aspects of guest CPU operation.</para>
|
---|
51 | </listitem>
|
---|
52 |
|
---|
53 | <listitem>
|
---|
54 | <para>Is the problem specific to a certain virtualization mode?
|
---|
55 | Some problems may only occur in software virtualization mode,
|
---|
56 | others may be specific to hardware virtualization.</para>
|
---|
57 | </listitem>
|
---|
58 |
|
---|
59 | <listitem>
|
---|
60 | <para>Is the problem specific to guest SMP? That is, is it related
|
---|
61 | to the number of virtual CPUs (VCPUs) in the guest? Using more
|
---|
62 | than one CPU usually significantly affects the internal operation
|
---|
63 | of a guest OS.</para>
|
---|
64 | </listitem>
|
---|
65 |
|
---|
66 | <listitem>
|
---|
67 | <para>Is the problem specific to the Guest Additions? In some
|
---|
68 | cases, this is a given (e.g., a shared folders problem), in other
|
---|
69 | cases it may be less obvious (for example, display problems). And
|
---|
70 | if the problem is Guest Additions specific, is it also specific to
|
---|
71 | a certain version of the Additions?</para>
|
---|
72 | </listitem>
|
---|
73 |
|
---|
74 | <listitem>
|
---|
75 | <para>Is the problem specific to a certain environment? Some
|
---|
76 | problems are related to a particular environment external to the
|
---|
77 | VM; this usually involves network setup. Certain configurations of
|
---|
78 | external servers such as DHCP or PXE may expose problems which do
|
---|
79 | not occur with other, similar servers.</para>
|
---|
80 | </listitem>
|
---|
81 |
|
---|
82 | <listitem>
|
---|
83 | <para>Is the problem a regression? Knowing that an issue is a
|
---|
84 | regression usually makes it significantly easier to find the
|
---|
85 | solution. In this case, it is crucial to know which version is
|
---|
86 | affected and which is not.</para>
|
---|
87 | </listitem>
|
---|
88 | </orderedlist></para>
|
---|
89 | </sect2>
|
---|
90 |
|
---|
91 | <sect2>
|
---|
92 | <title>Collecting debugging information</title>
|
---|
93 |
|
---|
94 | <para>For problem determination, it is often important to collect
|
---|
95 | debugging information which can be analyzed by VirtualBox support. This
|
---|
96 | section contains information about what kind of information can be
|
---|
97 | obtained.</para>
|
---|
98 |
|
---|
99 | <para>Every time VirtualBox starts up a VM, a so-called <emphasis
|
---|
100 | role="bold">"release log file"</emphasis> is created containing lots of
|
---|
101 | information about the VM configuration and runtime events. The log file
|
---|
102 | is called <computeroutput><literal>VBox.log</literal></computeroutput>
|
---|
103 | and resides in the VM log file folder. Typically this will be a
|
---|
104 | directory like this:<screen>$HOME/VirtualBox VMs/{machinename}/Logs</screen></para>
|
---|
105 |
|
---|
106 | <para>When starting a VM, the configuration file of the last run will be
|
---|
107 | renamed to <computeroutput>.1</computeroutput>, up to
|
---|
108 | <computeroutput>.3</computeroutput>. Sometimes when there is a problem,
|
---|
109 | it is useful to have a look at the logs. Also when requesting support
|
---|
110 | for VirtualBox, supplying the corresponding log file is
|
---|
111 | mandatory.</para>
|
---|
112 |
|
---|
113 | <para>For convenience, for each virtual machine, the VirtualBox main
|
---|
114 | window can show these logs in a window. To access it, select a virtual
|
---|
115 | machine from the list on the left and select "Show logs..." from the
|
---|
116 | "Machine" window.</para>
|
---|
117 |
|
---|
118 | <para>The release log file (VBox.log) contains a wealth of diagnostic
|
---|
119 | information, such as Host OS type and version, VirtualBox version and
|
---|
120 | build (32-bit or 64-bit), a complete dump of the guest's configuration
|
---|
121 | (CFGM), detailed information about the host CPU type and supported
|
---|
122 | features, whether hardware virtualization is enabled, information about
|
---|
123 | VT-x/AMD-V setup, state transitions (creating, running, paused,
|
---|
124 | stopping, etc.), guest BIOS messages, Guest Additions messages,
|
---|
125 | device-specific log entries and, at the end of execution, final guest
|
---|
126 | state and condensed statistics.</para>
|
---|
127 |
|
---|
128 | <para>In case of crashes, it is very important to collect <emphasis
|
---|
129 | role="bold">crash dumps</emphasis>. This is true for both host and guest
|
---|
130 | crashes. For information about enabling core dumps on Linux, Solaris,
|
---|
131 | and OS X systems, refer to the core dump article on the VirtualBox
|
---|
132 | website.<footnote>
|
---|
133 | <para><ulink
|
---|
134 | url="http://www.virtualbox.org/wiki/Core_dump">http://www.virtualbox.org/wiki/Core_dump</ulink>.</para>
|
---|
135 | </footnote></para>
|
---|
136 |
|
---|
137 | <para>You can also use <computeroutput>VBoxManage
|
---|
138 | debugvm</computeroutput> to create a dump of a complete virtual machine;
|
---|
139 | see <xref linkend="vboxmanage-debugvm" />.</para>
|
---|
140 |
|
---|
141 | <para>For network related problems, it is often helpful to capture a
|
---|
142 | trace of network traffic. If the traffic is routed through an adapter on
|
---|
143 | the host, it is possible to use Wireshark or a similar tool to capture
|
---|
144 | the traffic there. However, this often also includes a lot of traffic
|
---|
145 | unrelated to the VM.</para>
|
---|
146 |
|
---|
147 | <para>VirtualBox provides an ability to capture network traffic only on
|
---|
148 | a specific VM's network adapter. Refer to the network tracing article on
|
---|
149 | the VirtualBox website<footnote>
|
---|
150 | <para><ulink
|
---|
151 | url="http://www.virtualbox.org/wiki/Network_tips">http://www.virtualbox.org/wiki/Network_tips</ulink>.</para>
|
---|
152 | </footnote> for information on enabling this capture. The trace files
|
---|
153 | created by VirtualBox are in <computeroutput>.pcap</computeroutput>
|
---|
154 | format and can be easily analyzed with Wireshark.</para>
|
---|
155 | </sect2>
|
---|
156 |
|
---|
157 | <sect2 id="ts_debugger">
|
---|
158 | <title>The built-in VM debugger</title>
|
---|
159 |
|
---|
160 | <para>VirtualBox includes a built-in VM debugger, which advanced users
|
---|
161 | may find useful. This debugger allows for examining and, to some extent,
|
---|
162 | controlling the VM state.<warning>
|
---|
163 | <para>Use the VM debugger at your own risk. There is no support for
|
---|
164 | it, and the following documentation is only made available for
|
---|
165 | advanced users with a very high level of familiarity with the
|
---|
166 | x86/AMD64 machine instruction set, as well as detailed knowledge of
|
---|
167 | the PC architecture. A degree of familiarity with the internals of
|
---|
168 | the guest OS in question may also be very helpful.</para>
|
---|
169 | </warning></para>
|
---|
170 |
|
---|
171 | <para>The VM debugger is available in all regular production versions of
|
---|
172 | VirtualBox, but it is disabled by default because the average user will
|
---|
173 | have little use for it. There are two ways to access the
|
---|
174 | debugger:<itemizedlist>
|
---|
175 | <listitem>
|
---|
176 | <para>A debugger console window displayed alongside the VM</para>
|
---|
177 | </listitem>
|
---|
178 |
|
---|
179 | <listitem>
|
---|
180 | <para>Via the <computeroutput>telnet</computeroutput> protocol at
|
---|
181 | port 5000</para>
|
---|
182 | </listitem>
|
---|
183 | </itemizedlist></para>
|
---|
184 |
|
---|
185 | <para>The debugger can be enabled in three ways:<itemizedlist>
|
---|
186 | <listitem>
|
---|
187 | <para>Start the VM directly using <computeroutput>VirtualBox
|
---|
188 | --startvm</computeroutput>, with an additional
|
---|
189 | <computeroutput>--dbg</computeroutput>,
|
---|
190 | <computeroutput>--debug</computeroutput>, or
|
---|
191 | <computeroutput>--debug-command-line</computeroutput> argument.
|
---|
192 | See the VirtualBox usage help for details.</para>
|
---|
193 | </listitem>
|
---|
194 |
|
---|
195 | <listitem>
|
---|
196 | <para>Set the
|
---|
197 | <computeroutput>VBOX_GUI_DBG_ENABLED</computeroutput> or
|
---|
198 | <computeroutput>VBOX_GUI_DBG_AUTO_SHOW</computeroutput>
|
---|
199 | environment variable to <computeroutput>true</computeroutput>
|
---|
200 | before launching the VirtualBox process. Setting these variables
|
---|
201 | (only their presence is checked) is effective even when the first
|
---|
202 | VirtualBox process is the VM selector window. VMs subsequently
|
---|
203 | launched from the selector will have the debugger enabled.</para>
|
---|
204 | </listitem>
|
---|
205 |
|
---|
206 | <listitem>
|
---|
207 | <para>Set the <computeroutput>GUI/Dbg/Enabled</computeroutput>
|
---|
208 | extra data item to <computeroutput>true</computeroutput> before
|
---|
209 | launching the VM. This can be set globally or on a per VM
|
---|
210 | basis.</para>
|
---|
211 | </listitem>
|
---|
212 | </itemizedlist></para>
|
---|
213 |
|
---|
214 | <para>A new 'Debug' menu entry will be added to the VirtualBox
|
---|
215 | application. This menu allows the user to open the debugger
|
---|
216 | console.</para>
|
---|
217 |
|
---|
218 | <para>The VM debugger command syntax is loosely modeled on Microsoft and
|
---|
219 | IBM debuggers used on DOS, OS/2 and Windows. Users familiar with symdeb,
|
---|
220 | CodeView, or the OS/2 kernel debugger will find the VirtualBox VM
|
---|
221 | debugger familiar.</para>
|
---|
222 |
|
---|
223 | <para>The most important command is
|
---|
224 | <computeroutput>help</computeroutput>. This will print brief usage help
|
---|
225 | for all debugger commands. The set of commands supported by the VM
|
---|
226 | debugger changes frequently and the
|
---|
227 | <computeroutput>help</computeroutput> command is always
|
---|
228 | up-to-date.</para>
|
---|
229 |
|
---|
230 | <para>A brief summary of frequently used commands follows:<itemizedlist>
|
---|
231 | <listitem>
|
---|
232 | <para><computeroutput>stop</computeroutput> -- stops the VM
|
---|
233 | execution and enables single stepping</para>
|
---|
234 | </listitem>
|
---|
235 |
|
---|
236 | <listitem>
|
---|
237 | <para><computeroutput>g</computeroutput> -- continue VM
|
---|
238 | execution</para>
|
---|
239 | </listitem>
|
---|
240 |
|
---|
241 | <listitem>
|
---|
242 | <para><computeroutput>t</computeroutput> -- single step an
|
---|
243 | instruction</para>
|
---|
244 | </listitem>
|
---|
245 |
|
---|
246 | <listitem>
|
---|
247 | <para><computeroutput>rg/rh/r</computeroutput> -- print the
|
---|
248 | guest/hypervisor/current registers</para>
|
---|
249 | </listitem>
|
---|
250 |
|
---|
251 | <listitem>
|
---|
252 | <para><computeroutput>kg/kh/k</computeroutput> -- print the
|
---|
253 | guest/hypervisor/current call stack</para>
|
---|
254 | </listitem>
|
---|
255 |
|
---|
256 | <listitem>
|
---|
257 | <para><computeroutput>da/db/dw/dd/dq</computeroutput> -- print
|
---|
258 | memory contents as ASCII/bytes/words/dwords/qwords</para>
|
---|
259 | </listitem>
|
---|
260 |
|
---|
261 | <listitem>
|
---|
262 | <para><computeroutput>u</computeroutput> -- unassemble
|
---|
263 | memory</para>
|
---|
264 | </listitem>
|
---|
265 |
|
---|
266 | <listitem>
|
---|
267 | <para><computeroutput>dg</computeroutput> -- print the guest's
|
---|
268 | GDT</para>
|
---|
269 | </listitem>
|
---|
270 |
|
---|
271 | <listitem>
|
---|
272 | <para><computeroutput>di</computeroutput> -- print the guest's
|
---|
273 | IDT</para>
|
---|
274 | </listitem>
|
---|
275 |
|
---|
276 | <listitem>
|
---|
277 | <para><computeroutput>dl</computeroutput> -- print the guest's
|
---|
278 | LDT</para>
|
---|
279 | </listitem>
|
---|
280 |
|
---|
281 | <listitem>
|
---|
282 | <para><computeroutput>dt</computeroutput> -- print the guest's
|
---|
283 | TSS</para>
|
---|
284 | </listitem>
|
---|
285 |
|
---|
286 | <listitem>
|
---|
287 | <para><computeroutput>dp*</computeroutput> -- print the guest's
|
---|
288 | page table structures</para>
|
---|
289 | </listitem>
|
---|
290 |
|
---|
291 | <listitem>
|
---|
292 | <para><computeroutput>bp/br</computeroutput> -- set a
|
---|
293 | normal/recompiler breakpoint</para>
|
---|
294 | </listitem>
|
---|
295 |
|
---|
296 | <listitem>
|
---|
297 | <para><computeroutput>bl</computeroutput> -- list
|
---|
298 | breakpoints</para>
|
---|
299 | </listitem>
|
---|
300 |
|
---|
301 | <listitem>
|
---|
302 | <para><computeroutput>bc</computeroutput> -- clear a
|
---|
303 | breakpoint</para>
|
---|
304 | </listitem>
|
---|
305 |
|
---|
306 | <listitem>
|
---|
307 | <para><computeroutput>writecore</computeroutput> -- writes a VM
|
---|
308 | core file to disk, refer <xref linkend="ts_guest-core-format" /></para>
|
---|
309 | </listitem>
|
---|
310 | </itemizedlist></para>
|
---|
311 |
|
---|
312 | <para>See the built-in <computeroutput>help</computeroutput> for other
|
---|
313 | available commands.</para>
|
---|
314 |
|
---|
315 | <para>The VM debugger supports symbolic debugging, although symbols for
|
---|
316 | guest code are often not available. For Solaris guests, the
|
---|
317 | <computeroutput>detect</computeroutput> command automatically determines
|
---|
318 | the guest OS version and locates kernel symbols in guest's memory.
|
---|
319 | Symbolic debugging is then available. For Linux guests, the
|
---|
320 | <computeroutput>detect</computeroutput> commands also determines the
|
---|
321 | guest OS version, but there are no symbols in the guest's memory. Kernel
|
---|
322 | symbols are available in the file
|
---|
323 | <computeroutput>/proc/kallsyms</computeroutput> on Linux guests. This
|
---|
324 | file must be copied to the host, for example using
|
---|
325 | <computeroutput>scp</computeroutput>. The
|
---|
326 | <computeroutput>loadmap</computeroutput> debugger command can be used to
|
---|
327 | make the symbol information available to the VM debugger. Note that the
|
---|
328 | <computeroutput>kallsyms</computeroutput> file contains the symbols for
|
---|
329 | the currently loaded modules; if the guest's configuration changes, the
|
---|
330 | symbols will change as well and must be updated.</para>
|
---|
331 |
|
---|
332 | <para>For all guests, a simple way to verify that the correct symbols
|
---|
333 | are loaded is the <computeroutput>k</computeroutput> command. The guest
|
---|
334 | is normally idling and it should be clear from the symbolic information
|
---|
335 | that the guest operating system's idle loop is being executed.</para>
|
---|
336 |
|
---|
337 | <para>Another group of debugger commands is the set of
|
---|
338 | <computeroutput>info</computeroutput> commands. Running
|
---|
339 | <computeroutput>info help</computeroutput> provides complete usage
|
---|
340 | information. The information commands provide ad-hoc data pertinent to
|
---|
341 | various emulated devices and aspects of the VMM. There is no general
|
---|
342 | guideline for using the <computeroutput>info</computeroutput> commands,
|
---|
343 | the right command to use depends entirely on the problem being
|
---|
344 | investigated. Some of the info commands are:<itemizedlist>
|
---|
345 | <listitem>
|
---|
346 | <para><computeroutput>cfgm</computeroutput> -- print a branch of
|
---|
347 | the configuration tree</para>
|
---|
348 | </listitem>
|
---|
349 |
|
---|
350 | <listitem>
|
---|
351 | <para><computeroutput>cpuid</computeroutput> -- display the guest
|
---|
352 | CPUID leaves</para>
|
---|
353 | </listitem>
|
---|
354 |
|
---|
355 | <listitem>
|
---|
356 | <para><computeroutput>ioport</computeroutput> -- print registered
|
---|
357 | I/O port ranges</para>
|
---|
358 | </listitem>
|
---|
359 |
|
---|
360 | <listitem>
|
---|
361 | <para><computeroutput>mmio</computeroutput> -- print registered
|
---|
362 | MMIO ranges</para>
|
---|
363 | </listitem>
|
---|
364 |
|
---|
365 | <listitem>
|
---|
366 | <para><computeroutput>mode</computeroutput> -- print the current
|
---|
367 | paging mode</para>
|
---|
368 | </listitem>
|
---|
369 |
|
---|
370 | <listitem>
|
---|
371 | <para><computeroutput>pit</computeroutput> -- print the i8254 PIT
|
---|
372 | state</para>
|
---|
373 | </listitem>
|
---|
374 |
|
---|
375 | <listitem>
|
---|
376 | <para><computeroutput>pic</computeroutput> -- print the i8259A PIC
|
---|
377 | state</para>
|
---|
378 | </listitem>
|
---|
379 |
|
---|
380 | <listitem>
|
---|
381 | <para><computeroutput>ohci/ehci</computeroutput> -- print a subset
|
---|
382 | of the OHCI/EHCI USB controller state</para>
|
---|
383 | </listitem>
|
---|
384 |
|
---|
385 | <listitem>
|
---|
386 | <para><computeroutput>pcnet0</computeroutput> -- print the PCnet
|
---|
387 | state</para>
|
---|
388 | </listitem>
|
---|
389 |
|
---|
390 | <listitem>
|
---|
391 | <para><computeroutput>vgatext</computeroutput> -- print the
|
---|
392 | contents of the VGA framebuffer formatted as standard text
|
---|
393 | mode</para>
|
---|
394 | </listitem>
|
---|
395 |
|
---|
396 | <listitem>
|
---|
397 | <para><computeroutput>timers</computeroutput> -- print all VM
|
---|
398 | timers</para>
|
---|
399 | </listitem>
|
---|
400 | </itemizedlist></para>
|
---|
401 |
|
---|
402 | <para>The output of the <computeroutput>info</computeroutput> commands
|
---|
403 | generally requires in-depth knowledge of the emulated device and/or
|
---|
404 | VirtualBox VMM internals. However, when used properly, the information
|
---|
405 | provided can be invaluable.</para>
|
---|
406 | </sect2>
|
---|
407 |
|
---|
408 | <sect2 id="ts_guest-core-format">
|
---|
409 | <title>VM core format</title>
|
---|
410 |
|
---|
411 | <para>VirtualBox uses the 64-bit ELF format for its VM core files
|
---|
412 | created by <computeroutput>VBoxManage debugvm</computeroutput>; see
|
---|
413 | <xref linkend="vboxmanage-debugvm" />. The VM core file contain the
|
---|
414 | memory and CPU dumps of the VM and can be useful for debugging your
|
---|
415 | guest OS. The 64-bit ELF object format specficiation can be obtained
|
---|
416 | here: <literal><ulink
|
---|
417 | url="http://downloads.openwatcom.org/ftp/devel/docs/elf-64-gen.pdf">http://downloads.openwatcom.org/ftp/devel/docs/elf-64-gen.pdf</ulink></literal>.</para>
|
---|
418 |
|
---|
419 | <para>The overall layout of the VM core format is as follows:</para>
|
---|
420 |
|
---|
421 | <para><screen>[ ELF 64 Header]
|
---|
422 | [ Program Header, type PT_NOTE ]
|
---|
423 | -> offset to COREDESCRIPTOR
|
---|
424 | [ Program Header, type PT_LOAD ] - one for each contiguous physical memory range
|
---|
425 | -> Memory offset of range
|
---|
426 | -> File offset
|
---|
427 | [ Note Header, type NT_VBOXCORE ]
|
---|
428 | [ COREDESCRIPTOR ]
|
---|
429 | -> Magic
|
---|
430 | -> VM core file version
|
---|
431 | -> VBox version
|
---|
432 | -> Number of vCPUs etc.
|
---|
433 | [ Note Header, type NT_VBOXCPU ] - one for each vCPU
|
---|
434 | [ vCPU 1 Note Header ]
|
---|
435 | [ CPUMCTX - vCPU 1 dump ]
|
---|
436 | [ Additional Notes + Data ] - currently unused
|
---|
437 | [ Memory dump ]</screen></para>
|
---|
438 |
|
---|
439 | <para>The memory descriptors contain physical addresses relative to the
|
---|
440 | guest and not virtual addresses. Regions of memory such as MMIO regions
|
---|
441 | are not included in the core file.</para>
|
---|
442 |
|
---|
443 | <para>The relevant data structures and definitions can be found in the
|
---|
444 | VirtualBox sources under the following header files:
|
---|
445 | <computeroutput>include/VBox/dbgfcorefmt.h</computeroutput>,
|
---|
446 | <computeroutput>include/VBox/cpumctx.h</computeroutput> and
|
---|
447 | <computeroutput>src/VBox/Runtime/include/internal/ldrELFCommon.h</computeroutput>.</para>
|
---|
448 |
|
---|
449 | <para>The VM core file can be inspected using
|
---|
450 | <computeroutput>elfdump</computeroutput> and GNU
|
---|
451 | <computeroutput>readelf</computeroutput> or other similar
|
---|
452 | utilities.</para>
|
---|
453 | </sect2>
|
---|
454 | </sect1>
|
---|
455 |
|
---|
456 | <sect1>
|
---|
457 | <title>General</title>
|
---|
458 |
|
---|
459 | <sect2 id="ts_config-periodic-flush">
|
---|
460 | <title>Guest shows IDE/SATA errors for file-based images on slow host
|
---|
461 | file system</title>
|
---|
462 |
|
---|
463 | <para>Occasionally, some host file systems provide very poor writing
|
---|
464 | performance and as a consequence cause the guest to time out IDE/SATA
|
---|
465 | commands. This is normal behavior and should normally cause no real
|
---|
466 | problems, as the guest should repeat commands that have timed out.
|
---|
467 | However, some guests (e.g. some Linux versions) have severe problems if a
|
---|
468 | write to an image file takes longer than about 15 seconds. Some file
|
---|
469 | systems however require more than a minute to complete a single write,
|
---|
470 | if the host cache contains a large amount of data that needs to be
|
---|
471 | written.</para>
|
---|
472 |
|
---|
473 | <para>The symptom for this problem is that the guest can no longer
|
---|
474 | access its files during large write or copying operations, usually
|
---|
475 | leading to an immediate hang of the guest.</para>
|
---|
476 |
|
---|
477 | <para>In order to work around this problem (the true fix is to use a
|
---|
478 | faster file system that doesn't exhibit such unacceptable write
|
---|
479 | performance), it is possible to flush the image file after a certain
|
---|
480 | amount of data has been written. This interval is normally infinite, but
|
---|
481 | can be configured individually for each disk of a VM.</para>
|
---|
482 |
|
---|
483 | <para>For IDE disks use the following command:</para>
|
---|
484 |
|
---|
485 | <screen>VBoxManage setextradata "VM name"
|
---|
486 | "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/FlushInterval" [b]</screen>
|
---|
487 |
|
---|
488 | <para>For SATA disks use the following command:</para>
|
---|
489 |
|
---|
490 | <screen>VBoxManage setextradata "VM name"
|
---|
491 | "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/FlushInterval" [b]</screen>
|
---|
492 |
|
---|
493 | <para>The value [x] that selects the disk for IDE is 0 for the master
|
---|
494 | device on the first channel, 1 for the slave device on the first
|
---|
495 | channel, 2 for the master device on the second channel or 3 for the
|
---|
496 | master device on the second channel. For SATA use values between 0 and
|
---|
497 | 29. Only disks support this configuration option; it must not be set for
|
---|
498 | CD/DVD drives.</para>
|
---|
499 |
|
---|
500 | <para>The unit of the interval [b] is the number of bytes written since
|
---|
501 | the last flush. The value for it must be selected so that the occasional
|
---|
502 | long write delays do not occur. Since the proper flush interval depends
|
---|
503 | on the performance of the host and the host filesystem, finding the
|
---|
504 | optimal value that makes the problem disappear requires some
|
---|
505 | experimentation. Values between 1000000 and 10000000 (1 to 10 megabytes)
|
---|
506 | are a good starting point. Decreasing the interval both decreases the
|
---|
507 | probability of the problem and the write performance of the guest.
|
---|
508 | Setting the value unnecessarily low will cost performance without
|
---|
509 | providing any benefits. An interval of 1 will cause a flush for each
|
---|
510 | write operation and should solve the problem in any case, but has a
|
---|
511 | severe write performance penalty.</para>
|
---|
512 |
|
---|
513 | <para>Providing a value of 0 for [b] is treated as an infinite flush
|
---|
514 | interval, effectively disabling this workaround. Removing the extra data
|
---|
515 | key by specifying no value for [b] has the same effect.</para>
|
---|
516 | </sect2>
|
---|
517 |
|
---|
518 | <sect2>
|
---|
519 | <title>Responding to guest IDE/SATA flush requests</title>
|
---|
520 |
|
---|
521 | <para>If desired, the virtual disk images can be flushed when the guest
|
---|
522 | issues the IDE FLUSH CACHE command. Normally these requests are ignored
|
---|
523 | for improved performance. The parameters below are only accepted for
|
---|
524 | disk drives. They must not be set for DVD drives.</para>
|
---|
525 |
|
---|
526 | <para>To enable flushing for IDE disks, issue the following
|
---|
527 | command:</para>
|
---|
528 |
|
---|
529 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0</screen>
|
---|
530 |
|
---|
531 | <para>The value [x] that selects the disk is 0 for the master device on
|
---|
532 | the first channel, 1 for the slave device on the first channel, 2 for
|
---|
533 | the master device on the second channel or 3 for the master device on
|
---|
534 | the second channel.</para>
|
---|
535 |
|
---|
536 | <para>To enable flushing for SATA disks, issue the following
|
---|
537 | command:</para>
|
---|
538 |
|
---|
539 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush" 0</screen>
|
---|
540 |
|
---|
541 | <para>The value [x] that selects the disk can be a value between 0 and
|
---|
542 | 29.</para>
|
---|
543 |
|
---|
544 | <para>Note that this doesn't affect the flushes performed according to
|
---|
545 | the configuration described in <xref linkend="ts_config-periodic-flush"
|
---|
546 | xrefstyle="template: %n" />. Restoring the default of ignoring flush
|
---|
547 | commands is possible by setting the value to 1 or by removing the
|
---|
548 | key.</para>
|
---|
549 | </sect2>
|
---|
550 |
|
---|
551 | <sect2 id="ts_host-powermgmt">
|
---|
552 | <title>Poor performance caused by host power management</title>
|
---|
553 |
|
---|
554 | <para>On some hardware platforms and operating systems, virtualization
|
---|
555 | performance is negatively affected by host CPU power management. The
|
---|
556 | symptoms may be choppy audio in the guest or erratic guest clock
|
---|
557 | behavior.</para>
|
---|
558 |
|
---|
559 | <para>Some of the problems may be caused by firmware and/or host
|
---|
560 | operating system bugs. Therefore, updating the firmware and applying
|
---|
561 | operating systems fixes is recommended.</para>
|
---|
562 |
|
---|
563 | <para>For optimal virtualization performance, the C1E power state
|
---|
564 | support in the system's BIOS should be disabled, if such a setting is
|
---|
565 | available (not all systems support the C1E power state). On Intel
|
---|
566 | systems the <computeroutput>Intel C State</computeroutput> setting
|
---|
567 | should be disabled. Disabling other power management settings
|
---|
568 | may also improve performance. However, a balance between performance
|
---|
569 | and power consumption must always be considered.</para>
|
---|
570 | </sect2>
|
---|
571 |
|
---|
572 | <sect2 id="ts_gui-2d-grayed-out">
|
---|
573 | <title>GUI: 2D Video Acceleration option is grayed out</title>
|
---|
574 |
|
---|
575 | <para>To use 2D Video Acceleration within VirtualBox, your host's video
|
---|
576 | card should support certain OpenGL extensions. On startup, VirtualBox
|
---|
577 | checks for those extensions, and, if the test fails, this option is
|
---|
578 | silently grayed out.</para>
|
---|
579 |
|
---|
580 | <para>To find out why it has failed, you can manually execute the
|
---|
581 | following command:</para>
|
---|
582 |
|
---|
583 | <screen>VBoxTestOGL --log "log_file_name" --test 2D</screen>
|
---|
584 |
|
---|
585 | <para>It will list the required OpenGL extensions one by one and will
|
---|
586 | show you which one failed the test. This usually means that you are
|
---|
587 | running an outdated or misconfigured OpenGL driver on your host. It can
|
---|
588 | also mean that your video chip is lacking required functionality.</para>
|
---|
589 | </sect2>
|
---|
590 | </sect1>
|
---|
591 |
|
---|
592 | <sect1>
|
---|
593 | <title>Windows guests</title>
|
---|
594 |
|
---|
595 | <sect2>
|
---|
596 | <title>Windows bluescreens after changing VM configuration</title>
|
---|
597 |
|
---|
598 | <para>Changing certain virtual machine settings can cause Windows guests
|
---|
599 | to fail during start up with a bluescreen. This may happen if you change
|
---|
600 | VM settings after installing Windows, or if you copy a disk image with
|
---|
601 | an already installed Windows to a newly created VM which has settings
|
---|
602 | that differ from the original machine.</para>
|
---|
603 |
|
---|
604 | <para>This applies in particular to the following settings:<itemizedlist>
|
---|
605 | <listitem>
|
---|
606 | <para>The ACPI and I/O APIC settings should never be changed after
|
---|
607 | installing Windows. Depending on the presence of these hardware
|
---|
608 | features, the Windows installation program chooses special kernel
|
---|
609 | and device driver versions and will fail to startup should these
|
---|
610 | hardware features be removed. (Enabling them for a Windows VM
|
---|
611 | which was installed without them does not cause any harm. However,
|
---|
612 | Windows will not use these features in this case.)</para>
|
---|
613 | </listitem>
|
---|
614 |
|
---|
615 | <listitem>
|
---|
616 | <para>Changing the storage controller hardware will cause bootup
|
---|
617 | failures as well. This might also apply to you if you copy a disk
|
---|
618 | image from an older version of VirtualBox to a virtual machine
|
---|
619 | created with a newer VirtualBox version; the default subtype of
|
---|
620 | IDE controller hardware was changed from PIIX3 to PIIX4 with
|
---|
621 | VirtualBox 2.2. Make sure these settings are identical.</para>
|
---|
622 | </listitem>
|
---|
623 | </itemizedlist></para>
|
---|
624 | </sect2>
|
---|
625 |
|
---|
626 | <sect2>
|
---|
627 | <title>Windows 0x101 bluescreens with SMP enabled (IPI timeout)</title>
|
---|
628 |
|
---|
629 | <para>If a VM is configured to have more than one processor (symmetrical
|
---|
630 | multiprocessing, SMP), some configurations of Windows guests crash with
|
---|
631 | an 0x101 error message, indicating a timeout for inter-processor
|
---|
632 | interrupts (IPIs). These interrupts synchronize memory management
|
---|
633 | between processors.</para>
|
---|
634 |
|
---|
635 | <para>According to Microsoft, this is due to a race condition in
|
---|
636 | Windows. A hotfix is available.<footnote>
|
---|
637 | <para>See <ulink
|
---|
638 | url="http://support.microsoft.com/kb/955076">http://support.microsoft.com/kb/955076</ulink>.</para>
|
---|
639 | </footnote> If this does not help, please reduce the number of virtual
|
---|
640 | processors to 1.</para>
|
---|
641 | </sect2>
|
---|
642 |
|
---|
643 | <sect2>
|
---|
644 | <title>Windows 2000 installation failures</title>
|
---|
645 |
|
---|
646 | <para>When installing Windows 2000 guests, you might run into one of the
|
---|
647 | following issues:</para>
|
---|
648 |
|
---|
649 | <itemizedlist>
|
---|
650 | <listitem>
|
---|
651 | <para>Installation reboots, usually during component
|
---|
652 | registration.</para>
|
---|
653 | </listitem>
|
---|
654 |
|
---|
655 | <listitem>
|
---|
656 | <para>Installation fills the whole hard disk with empty log
|
---|
657 | files.</para>
|
---|
658 | </listitem>
|
---|
659 |
|
---|
660 | <listitem>
|
---|
661 | <para>Installation complains about a failure installing
|
---|
662 | <literal>msgina.dll</literal>.</para>
|
---|
663 | </listitem>
|
---|
664 | </itemizedlist>
|
---|
665 |
|
---|
666 | <para>These problems are all caused by a bug in the hard disk driver of
|
---|
667 | Windows 2000. After issuing a hard disk request, there is a race
|
---|
668 | condition in the Windows driver code which leads to corruption if the
|
---|
669 | operation completes too fast, i.e. the hardware interrupt from the IDE
|
---|
670 | controller arrives too soon. With physical hardware, there is a
|
---|
671 | guaranteed delay in most systems so the problem is usually hidden there
|
---|
672 | (however it should be possible to reproduce it on physical hardware as
|
---|
673 | well). In a virtual environment, it is possible for the operation to be
|
---|
674 | done immediately (especially on very fast systems with multiple CPUs)
|
---|
675 | and the interrupt is signaled sooner than on a physical system. The
|
---|
676 | solution is to introduce an artificial delay before delivering such
|
---|
677 | interrupts. This delay can be configured for a VM using the following
|
---|
678 | command:</para>
|
---|
679 |
|
---|
680 | <screen>VBoxManage setextradata "VM name" "VBoxInternal/Devices/piix3ide/0/Config/IRQDelay" 1</screen>
|
---|
681 |
|
---|
682 | <para>This sets the delay to one millisecond. In case this doesn't help,
|
---|
683 | increase it to a value between 1 and 5 milliseconds. Please note that
|
---|
684 | this slows down disk performance. After installation, you should be able
|
---|
685 | to remove the key (or set it to 0).</para>
|
---|
686 | </sect2>
|
---|
687 |
|
---|
688 | <sect2>
|
---|
689 | <title>How to record bluescreen information from Windows guests</title>
|
---|
690 |
|
---|
691 | <para>When Windows guests run into a kernel crash, they display the
|
---|
692 | infamous bluescreen. Depending on how Windows is configured, the
|
---|
693 | information will remain on the screen until the machine is restarted or
|
---|
694 | it will reboot automatically. During installation, Windows is usually
|
---|
695 | configured to reboot automatically. With automatic reboots, there is no
|
---|
696 | chance to record the bluescreen information which might be important for
|
---|
697 | problem determination.</para>
|
---|
698 |
|
---|
699 | <para>VirtualBox provides a method of halting a guest when it wants to
|
---|
700 | perform a reset. In order to enable this feature, issue the following
|
---|
701 | command:</para>
|
---|
702 |
|
---|
703 | <para><screen>VBoxManage setextradata "VM name" "VBoxInternal/PDM/HaltOnReset" 1</screen></para>
|
---|
704 | </sect2>
|
---|
705 |
|
---|
706 | <sect2>
|
---|
707 | <title>No networking in Windows Vista guests</title>
|
---|
708 |
|
---|
709 | <para>With Windows Vista, Microsoft dropped support for the AMD PCNet
|
---|
710 | card that VirtualBox used to provide as the default virtual network card
|
---|
711 | before version 1.6.0. For Windows Vista guests, VirtualBox now uses an
|
---|
712 | Intel E1000 card by default.</para>
|
---|
713 |
|
---|
714 | <para>If, for some reason, you still want to use the AMD card, you need
|
---|
715 | to download the PCNet driver from the AMD website (available for 32-bit
|
---|
716 | Windows only). You can transfer it into the virtual machine using a
|
---|
717 | shared folder, see (see <xref linkend="sharedfolders" />).</para>
|
---|
718 | </sect2>
|
---|
719 |
|
---|
720 | <sect2>
|
---|
721 | <title>Windows guests may cause a high CPU load</title>
|
---|
722 |
|
---|
723 | <para>Several background applications of Windows guests, especially
|
---|
724 | virus scanners, are known to increases the CPU load notably even if the
|
---|
725 | guest appears to be idle. We recommend to deactivate virus scanners
|
---|
726 | within virtualized guests if possible.</para>
|
---|
727 | </sect2>
|
---|
728 |
|
---|
729 | <sect2>
|
---|
730 | <title>Long delays when accessing shared folders</title>
|
---|
731 |
|
---|
732 | <para>The performance for accesses to shared folders from a Windows
|
---|
733 | guest might be decreased due to delays during the resolution of the
|
---|
734 | VirtualBox shared folders name service. To fix these delays, add the
|
---|
735 | following entries to the file
|
---|
736 | <computeroutput>\windows\system32\drivers\etc\lmhosts</computeroutput>
|
---|
737 | of the Windows guest:</para>
|
---|
738 |
|
---|
739 | <screen>255.255.255.255 VBOXSVR #PRE
|
---|
740 | 255.255.255.255 VBOXSRV #PRE</screen>
|
---|
741 |
|
---|
742 | <para>After doing this change, a reboot of the guest is required.</para>
|
---|
743 | </sect2>
|
---|
744 |
|
---|
745 | <sect2>
|
---|
746 | <title>USB tablet coordinates wrong in Windows 98 guests</title>
|
---|
747 |
|
---|
748 | <para>If a Windows 98 VM is configured to use the emulated USB tablet
|
---|
749 | (absolute pointing device), the coordinate translation may be incorrect
|
---|
750 | and the pointer is restricted to the upper left quarter of the guest's
|
---|
751 | screen.
|
---|
752 | </para>
|
---|
753 |
|
---|
754 | <para>The USB HID (Human Interface Device) drivers in Windows 98 are very
|
---|
755 | old and do not handle tablets the same way all more recent operating
|
---|
756 | systems do (Windows 2000 and later, Mac OS X, Solaris). To
|
---|
757 | work around the problem, issue the following command:
|
---|
758 | </para>
|
---|
759 |
|
---|
760 | <para><screen>VBoxManage setextradata "VM name" "VBoxInternal/USB/HidMouse/0/Config/CoordShift" 0</screen></para>
|
---|
761 |
|
---|
762 | <para>To restore the default behavior, remove the key or set its value
|
---|
763 | to 1.
|
---|
764 | </para>
|
---|
765 | </sect2>
|
---|
766 |
|
---|
767 | <sect2>
|
---|
768 | <title>Windows guests are removed from an Active Directory domain after
|
---|
769 | restoring a snapshot</title>
|
---|
770 |
|
---|
771 | <para>If a Windows guest is a member of an Active Directory domain and
|
---|
772 | the snapshot feature of VirtualBox is used, it could happen it loses
|
---|
773 | this status after you restore an older snapshot.
|
---|
774 | </para>
|
---|
775 |
|
---|
776 | <para>The reason is the automatic machine password changing performed by
|
---|
777 | Windows in regular intervals for security purposes. You can disable
|
---|
778 | this feature by following the instruction of this <ulink
|
---|
779 | url="http://support.microsoft.com/kb/154501">http://support.microsoft.com/kb/154501</ulink>
|
---|
780 | article from Microsoft.
|
---|
781 | </para>
|
---|
782 | </sect2>
|
---|
783 |
|
---|
784 | <sect2 id="ts_d3d8-d3d9-restore">
|
---|
785 | <title>Restoring d3d8.dll and d3d9.dll</title>
|
---|
786 |
|
---|
787 | <para>VirtualBox Guest Additions for Windows prior to 4.1.8 did not properly
|
---|
788 | back up the original d3d8.dll and d3d9.dll system files when selecting
|
---|
789 | and installing the experimental Direct3D support. This process replaces
|
---|
790 | both system files with files from the VirtualBox Guest Additions so that
|
---|
791 | Direct3D calls can be handled correctly. Although this issue was fixed
|
---|
792 | with VirtualBox 4.1.8, there is no way the Windows Guest Additions
|
---|
793 | installer can repair these files.</para>
|
---|
794 |
|
---|
795 | <para>Corruption of these files has no implications in case 3D acceleration
|
---|
796 | is enabled and basic Direct3D support is installed, that is, without WDDM
|
---|
797 | (on Windows Vista or higher) or on older Windows systems like Windows XP.
|
---|
798 | With the basic Direct3D support all Direct3D 8.0 and Direct3D 9.0
|
---|
799 | applications will utilize VirtualBox Direct3D files directly and thus
|
---|
800 | will run as expected.</para>
|
---|
801 |
|
---|
802 | <para>For WDDM Direct3D support however, the originally shipped d3d8.dll and
|
---|
803 | d3d9.dll files are required in order to run Direct3D 8.0
|
---|
804 | and Direct3D 9.0 applications. As a result of the above mentioned system
|
---|
805 | files corruption these applications will not work anymore. See below for
|
---|
806 | a step-by-step guide for restoring the original d3d8.dll and d3d9.dll
|
---|
807 | system files in case the VirtualBox Guest Additions installer warned
|
---|
808 | about those incorrect files or when having trouble running Direct3D
|
---|
809 | applications.</para>
|
---|
810 |
|
---|
811 | <note><para>Starting at Windows 7 the 3D desktop (aka Aero) uses DirectX 10
|
---|
812 | for rendering so that corrupted d3d8.dll and d3d9.dll system files will
|
---|
813 | have no effect on the actual rendering.</para></note>
|
---|
814 |
|
---|
815 | <para>This is why such a detected file corruption is not considered as fatal
|
---|
816 | for the basic Direct3D installation on all supported Windows guests,
|
---|
817 | and for WDDM Direct3D installation on Windows 7 and later guests.</para>
|
---|
818 |
|
---|
819 | <para>Extracting d3d8 and d3d9.dll from a Windows XP installation CD:</para>
|
---|
820 |
|
---|
821 | <orderedlist>
|
---|
822 | <listitem>
|
---|
823 | <para>Download and install the latest version of 7-Zip File Manager <ulink
|
---|
824 | url="http//www.7-zip.org">http//www.7-zip.org</ulink></para>
|
---|
825 | </listitem>
|
---|
826 |
|
---|
827 | <listitem>
|
---|
828 | <para>Browse into installation CD for example E:\i386 (or AMD64 for 64bit version)</para>
|
---|
829 | </listitem>
|
---|
830 |
|
---|
831 | <listitem>
|
---|
832 | <para>Locate file d3d8.dl_ and d3d9.dl_, double click on it and Extract d3d8.dll and d3d9.dll</para>
|
---|
833 | </listitem>
|
---|
834 |
|
---|
835 | <listitem>
|
---|
836 | <para>Reboot Windows in Safe mode</para>
|
---|
837 | </listitem>
|
---|
838 |
|
---|
839 | <listitem>
|
---|
840 | <para>Copy extracted d3d8.dll and d3d9.dll to C:\Windows\system32 and C:\Windows\system32\dllcache</para>
|
---|
841 | </listitem>
|
---|
842 |
|
---|
843 | <listitem>
|
---|
844 | <para>Reboot</para>
|
---|
845 | </listitem>
|
---|
846 | </orderedlist>
|
---|
847 |
|
---|
848 | <para>Extracting d3d8 and d3d9.dll from Windows XP Service pack </para>
|
---|
849 |
|
---|
850 | <orderedlist>
|
---|
851 | <listitem>
|
---|
852 | <para>1, 3-6 Same as installation CD</para>
|
---|
853 | </listitem>
|
---|
854 | <listitem>
|
---|
855 | <para>Use 'Open inside' to open WindowsXP-KB936929-SP3-x86.exe as archive and browse i386 directory.</para>
|
---|
856 | </listitem>
|
---|
857 | </orderedlist>
|
---|
858 |
|
---|
859 | <para>Extracting d3d8 and d3d9.dll from Vista/Windows7 installation CD or Service Pack iso</para>
|
---|
860 |
|
---|
861 | <orderedlist>
|
---|
862 | <listitem>
|
---|
863 | <para>Download and install the latest version of 7-Zip File Manager <ulink
|
---|
864 | url="http//www.7-zip.org">http//www.7-zip.org</ulink></para>
|
---|
865 | </listitem>
|
---|
866 |
|
---|
867 | <listitem>
|
---|
868 | <para>Browse into installation CD for example E:\sources</para>
|
---|
869 | </listitem>
|
---|
870 |
|
---|
871 | <listitem>
|
---|
872 | <para>Locate file install.wim and double click it. After 7-Zip utility opens the file, you'll get a few numbered folders. Each numeric subfolder represents a different version of Windows (Starter, Home Basic, and so on)</para>
|
---|
873 | </listitem>
|
---|
874 |
|
---|
875 | <listitem>
|
---|
876 | <para>After entering into the one of the numeric folders, browse into Windows\System32 (or C:\Windows\SysWOW64 for 64 bit version) directory locate d3d8.dll and d3d9.dll and extract</para>
|
---|
877 | </listitem>
|
---|
878 |
|
---|
879 | <listitem>
|
---|
880 | <para>Copy extracted d3d8.dll and d3d9.dll to C:\Windows\system32 or C:\Windows\SysWOW64 (files from system32 should go to system32, from SysWOW64 to SysWOW64)</para>
|
---|
881 | </listitem>
|
---|
882 |
|
---|
883 | <listitem>
|
---|
884 | <para>Reboot</para>
|
---|
885 | </listitem>
|
---|
886 | </orderedlist>
|
---|
887 | </sect2>
|
---|
888 |
|
---|
889 | </sect1>
|
---|
890 |
|
---|
891 | <sect1>
|
---|
892 | <title>Linux and X11 guests</title>
|
---|
893 |
|
---|
894 | <sect2>
|
---|
895 | <title>Linux guests may cause a high CPU load</title>
|
---|
896 |
|
---|
897 | <para>Some Linux guests may cause a high CPU load even if the guest
|
---|
898 | system appears to be idle. This can be caused by a high timer frequency
|
---|
899 | of the guest kernel. Some Linux distributions, for example Fedora, ship
|
---|
900 | a Linux kernel configured for a timer frequency of <emphasis
|
---|
901 | role="bold"> 1000Hz</emphasis>. We recommend to recompile the guest
|
---|
902 | kernel and to select a timer frequency of 100Hz.</para>
|
---|
903 |
|
---|
904 | <para>Linux kernels shipped with Red Hat Enterprise Linux (RHEL) as of
|
---|
905 | release 4.7 and 5.1 as well as kernels of related Linux distributions
|
---|
906 | (for instance CentOS and Oracle Linux) support a kernel
|
---|
907 | parameter <emphasis>divider=N</emphasis>. Hence, such kernels support a
|
---|
908 | lower timer frequency without recompilation. We suggest to add the
|
---|
909 | kernel parameter <emphasis>divider=10</emphasis> to select a guest
|
---|
910 | kernel timer frequency of 100Hz.</para>
|
---|
911 | </sect2>
|
---|
912 |
|
---|
913 | <sect2>
|
---|
914 | <title>AMD Barcelona CPUs</title>
|
---|
915 |
|
---|
916 | <para>Most Linux-based guests will fail with AMD Phenoms or
|
---|
917 | Barcelona-level Opterons due to a bug in the Linux kernel. Enable the
|
---|
918 | I/O-APIC to work around the problem (see <xref
|
---|
919 | linkend="settings-system" />).</para>
|
---|
920 | </sect2>
|
---|
921 |
|
---|
922 | <sect2 id="ts_linux-buggy">
|
---|
923 | <title>Buggy Linux 2.6 kernel versions</title>
|
---|
924 |
|
---|
925 | <para>The following bugs in Linux kernels prevent them from executing
|
---|
926 | correctly in VirtualBox, causing VM boot crashes:<itemizedlist>
|
---|
927 | <listitem>
|
---|
928 | <para>The Linux kernel version 2.6.18 (and some 2.6.17 versions)
|
---|
929 | introduced a race condition that can cause boot crashes in
|
---|
930 | VirtualBox. Please use a kernel version 2.6.19 or later.</para>
|
---|
931 | </listitem>
|
---|
932 |
|
---|
933 | <listitem>
|
---|
934 | <para>With hardware virtualization and the I/O APIC enabled,
|
---|
935 | kernels before 2.6.24-rc6 may panic on boot with the following
|
---|
936 | message:<screen>Kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with
|
---|
937 | apic=debug and send a report. Then try booting with the 'noapic' option</screen></para>
|
---|
938 |
|
---|
939 | <para>If you see this message, either disable hardware
|
---|
940 | virtualization or the I/O APIC (see <xref
|
---|
941 | linkend="settings-system" />), or upgrade the guest to a newer
|
---|
942 | kernel.<footnote>
|
---|
943 | <para>See <ulink
|
---|
944 | url="http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg30813.html">http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg30813.html</ulink>
|
---|
945 | for details about the kernel fix.</para>
|
---|
946 | </footnote></para>
|
---|
947 | </listitem>
|
---|
948 | </itemizedlist></para>
|
---|
949 | </sect2>
|
---|
950 |
|
---|
951 | <sect2>
|
---|
952 | <title>Shared clipboard, auto-resizing and seamless desktop in X11
|
---|
953 | guests</title>
|
---|
954 |
|
---|
955 | <para>Guest desktop services in guests running the X11 window system
|
---|
956 | (Solaris, Linux and others) are provided by a guest service called
|
---|
957 | <computeroutput>VBoxClient</computeroutput>, which runs under the ID of
|
---|
958 | the user who started the desktop session and is automatically started
|
---|
959 | using the following command lines <screen>VBoxClient --clipboard
|
---|
960 | VBoxClient --display
|
---|
961 | VBoxClient --seamless</screen> when your X11 user session is started if you
|
---|
962 | are using a common desktop environment (Gnome, KDE and others). If a
|
---|
963 | particular desktop service is not working correctly, it is worth
|
---|
964 | checking whether the process which should provide it is running.</para>
|
---|
965 |
|
---|
966 | <para>The <computeroutput>VBoxClient</computeroutput> processes create
|
---|
967 | files in the user's home directory with names of the form
|
---|
968 | <computeroutput>.vboxclient-*.pid</computeroutput> when they are running
|
---|
969 | in order to prevent a given service from being started twice. It can
|
---|
970 | happen due to misconfiguration that these files are created owned by
|
---|
971 | root and not deleted when the services are stopped, which will prevent
|
---|
972 | them from being started in future sessions. If the services cannot be
|
---|
973 | started, you may wish to check whether these files still exist.</para>
|
---|
974 | </sect2>
|
---|
975 | </sect1>
|
---|
976 |
|
---|
977 | <sect1>
|
---|
978 | <title>Solaris guests</title>
|
---|
979 |
|
---|
980 | <sect2>
|
---|
981 | <title>Older Solaris 10 releases hang in 64-bit mode</title>
|
---|
982 |
|
---|
983 | <para>Solaris 10 releases up to and including Solaris 10 8/07 ("S10U4")
|
---|
984 | incorrectly detect newer Intel processors produced since 2007. This
|
---|
985 | problem leads to the 64-bit Solaris kernel hanging or crashing almost
|
---|
986 | immediately during startup, in both virtualized and physical
|
---|
987 | environments.
|
---|
988 | </para>
|
---|
989 | <para>
|
---|
990 | The recommended solution is upgrading to at least Solaris 10 5/08
|
---|
991 | ("S10U5"). Alternative solutions include forcing Solaris to always
|
---|
992 | boot the 32-bit kernel or applying a patch for bug 6574102 (while
|
---|
993 | Solaris is using the 32-bit kernel).
|
---|
994 | </para>
|
---|
995 |
|
---|
996 | </sect2>
|
---|
997 | </sect1>
|
---|
998 |
|
---|
999 | <sect1>
|
---|
1000 | <title>Windows hosts</title>
|
---|
1001 |
|
---|
1002 | <sect2>
|
---|
1003 | <title>VBoxSVC out-of-process COM server issues</title>
|
---|
1004 |
|
---|
1005 | <para>VirtualBox makes use of the Microsoft Component Object Model (COM)
|
---|
1006 | for inter- and intra-process communication. This allows VirtualBox to
|
---|
1007 | share a common configuration among different virtual machine processes
|
---|
1008 | and provide several user interface options based on a common
|
---|
1009 | architecture. All global status information and configuration is
|
---|
1010 | maintained by the process <computeroutput>VBoxSVC.exe</computeroutput>,
|
---|
1011 | which is an out-of-process COM server. Whenever a VirtualBox process is
|
---|
1012 | started, it requests access to the COM server and Windows automatically
|
---|
1013 | starts the process. Note that it should never be started by the end
|
---|
1014 | user.</para>
|
---|
1015 |
|
---|
1016 | <para>When the last process disconnects from the COM server, it will
|
---|
1017 | terminate itself after some seconds. The VirtualBox configuration (XML
|
---|
1018 | files) is maintained and owned by the COM server and the files are
|
---|
1019 | locked whenever the server runs.</para>
|
---|
1020 |
|
---|
1021 | <para>In some cases - such as when a virtual machine is terminated
|
---|
1022 | unexpectedly - the COM server will not notice that the client is
|
---|
1023 | disconnected and stay active for a longer period (10 minutes or so)
|
---|
1024 | keeping the configuration files locked. In other rare cases the COM
|
---|
1025 | server might experience an internal error and subsequently other
|
---|
1026 | processes fail to initialize it. In these situations, it is recommended
|
---|
1027 | to use the Windows task manager to kill the process
|
---|
1028 | <computeroutput>VBoxSVC.exe</computeroutput>.</para>
|
---|
1029 | </sect2>
|
---|
1030 |
|
---|
1031 | <sect2>
|
---|
1032 | <title>CD/DVD changes not recognized</title>
|
---|
1033 |
|
---|
1034 | <para>In case you have assigned a physical CD/DVD drive to a guest and
|
---|
1035 | the guest does not notice when the medium changes, make sure that the
|
---|
1036 | Windows media change notification (MCN) feature is not turned off. This
|
---|
1037 | is represented by the following key in the Windows registry:<screen><literal>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdrom\Autorun</literal></screen>Certain
|
---|
1038 | applications may disable this key against Microsoft's advice. If it is
|
---|
1039 | set to 0, change it to 1 and reboot your system. VirtualBox relies on
|
---|
1040 | Windows notifying it of media changes.</para>
|
---|
1041 | </sect2>
|
---|
1042 |
|
---|
1043 | <sect2>
|
---|
1044 | <title>Sluggish response when using Microsoft RDP client</title>
|
---|
1045 |
|
---|
1046 | <para>If connecting to a Virtual Machine via the Microsoft RDP client
|
---|
1047 | (called Remote Desktop Connection), there can be large delays between
|
---|
1048 | input (moving the mouse over a menu is the most obvious situation) and
|
---|
1049 | output. This is because this RDP client collects input for a certain
|
---|
1050 | time before sending it to the RDP server.</para>
|
---|
1051 |
|
---|
1052 | <para>The interval can be decreased by setting a Windows registry key to
|
---|
1053 | smaller values than the default of 100. The key does not exist initially
|
---|
1054 | and must be of type DWORD. The unit for its values is milliseconds.
|
---|
1055 | Values around 20 are suitable for low-bandwidth connections between the
|
---|
1056 | RDP client and server. Values around 4 can be used for a gigabit
|
---|
1057 | Ethernet connection. Generally values below 10 achieve a performance
|
---|
1058 | that is very close to that of the local input devices and screen of the
|
---|
1059 | host on which the Virtual Machine is running.</para>
|
---|
1060 |
|
---|
1061 | <para>Depending whether the setting should be changed for an individual
|
---|
1062 | user or for the system, either</para>
|
---|
1063 |
|
---|
1064 | <screen>HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Min Send Interval</screen>
|
---|
1065 |
|
---|
1066 | <para>or</para>
|
---|
1067 |
|
---|
1068 | <screen>HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\Min Send Interval</screen>
|
---|
1069 |
|
---|
1070 | <para>can be set appropriately.</para>
|
---|
1071 | </sect2>
|
---|
1072 |
|
---|
1073 | <sect2>
|
---|
1074 | <title>Running an iSCSI initiator and target on a single system</title>
|
---|
1075 |
|
---|
1076 | <para>Deadlocks can occur on a Windows host when attempting to access an
|
---|
1077 | iSCSI target running in a guest virtual machine with an iSCSI initiator
|
---|
1078 | (e.g. Microsoft iSCSI Initiator) that is running on the host. This is
|
---|
1079 | caused by a flaw in the Windows cache manager component, and causes
|
---|
1080 | sluggish host system response for several minutes, followed by a
|
---|
1081 | "Delayed Write Failed" error message in the system tray or in a separate
|
---|
1082 | message window. The guest is blocked during that period and may show
|
---|
1083 | error messages or become unstable.</para>
|
---|
1084 |
|
---|
1085 | <para>Setting the environment variable
|
---|
1086 | <computeroutput>VBOX_DISABLE_HOST_DISK_CACHE</computeroutput> to 1 will
|
---|
1087 | enable a workaround for this problem until Microsoft addresses the
|
---|
1088 | issue. For example, open a command prompt window and start VirtualBox
|
---|
1089 | like this:</para>
|
---|
1090 |
|
---|
1091 | <screen>set VBOX_DISABLE_HOST_DISK_CACHE=1
|
---|
1092 | VirtualBox</screen>
|
---|
1093 |
|
---|
1094 | <para>While this will decrease guest disk performance (especially
|
---|
1095 | writes), it does not affect the performance of other applications
|
---|
1096 | running on the host.</para>
|
---|
1097 | </sect2>
|
---|
1098 |
|
---|
1099 | <sect2>
|
---|
1100 | <title>Bridged networking adapters missing</title>
|
---|
1101 |
|
---|
1102 | <para>If no bridged adapters show up in the "Networking" section of the
|
---|
1103 | VM settings, this typically means that the bridged networking driver was
|
---|
1104 | not installed properly on your host. This could be due to the following
|
---|
1105 | reasons: <itemizedlist>
|
---|
1106 | <listitem>
|
---|
1107 | <para>The maximum allowed filter count was reached on the host. In
|
---|
1108 | this case, the MSI log would mention the
|
---|
1109 | <computeroutput>0x8004a029</computeroutput> error code returned on
|
---|
1110 | NetFlt network component install:<screen>VBoxNetCfgWinInstallComponent: Install failed, hr (0x8004a029)</screen></para>
|
---|
1111 |
|
---|
1112 | <para>You can try to increase the maximum filter count in the
|
---|
1113 | Windows registry at the following key:<screen>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\MaxNumFilters</screen>The
|
---|
1114 | maximum number allowed is 14. After a reboot, try to re-install
|
---|
1115 | VirtualBox.</para>
|
---|
1116 | </listitem>
|
---|
1117 |
|
---|
1118 | <listitem>
|
---|
1119 | <para>The INF cache is corrupt. In this case, the install log
|
---|
1120 | (<computeroutput>%windir%\inf\setupapi.log</computeroutput> on XP
|
---|
1121 | or <computeroutput>%windir%\inf\setupapi.dev.log</computeroutput>
|
---|
1122 | on Vista or later) would typically mention the failure to find a
|
---|
1123 | suitable driver package for either the
|
---|
1124 | <computeroutput>sun_VBoxNetFlt</computeroutput> or
|
---|
1125 | <computeroutput>sun_VBoxNetFltmp</computeroutput> components. The
|
---|
1126 | solution then is to uninstall VirtualBox, remove the INF cache
|
---|
1127 | (<computeroutput>%windir%\inf\INFCACHE.1</computeroutput>), reboot
|
---|
1128 | and try to re-install VirtualBox</para>
|
---|
1129 | </listitem>
|
---|
1130 | </itemizedlist></para>
|
---|
1131 | </sect2>
|
---|
1132 |
|
---|
1133 | <sect2>
|
---|
1134 | <title>Host-only networking adapters cannot be created</title>
|
---|
1135 |
|
---|
1136 | <para>If host-only adapter cannot be created (either via the Manager or
|
---|
1137 | VBoxManage), then the INF cache is probably corrupt. In this case, the
|
---|
1138 | install log (<computeroutput>%windir%\inf\setupapi.log</computeroutput>
|
---|
1139 | on XP or <computeroutput>%windir%\inf\setupapi.dev.log</computeroutput>
|
---|
1140 | on Vista or later) would typically mention the failure to find a
|
---|
1141 | suitable driver package for the
|
---|
1142 | <computeroutput>sun_VBoxNetAdp</computeroutput> component. Again, as
|
---|
1143 | with the bridged networking problem described above, the solution is to
|
---|
1144 | uninstall VirtualBox, remove the INF cache
|
---|
1145 | (<computeroutput>%windir%\inf\INFCACHE.1</computeroutput>), reboot and
|
---|
1146 | try to re-install VirtualBox.</para>
|
---|
1147 | </sect2>
|
---|
1148 | </sect1>
|
---|
1149 |
|
---|
1150 | <sect1>
|
---|
1151 | <title>Linux hosts</title>
|
---|
1152 |
|
---|
1153 | <sect2 id="ts_linux-kernelmodule-fails-to-load">
|
---|
1154 | <title>Linux kernel module refuses to load</title>
|
---|
1155 |
|
---|
1156 | <para>If the VirtualBox kernel module
|
---|
1157 | (<computeroutput>vboxdrv</computeroutput>) refuses to load, i.e. you get
|
---|
1158 | an "Error inserting vboxdrv: Invalid argument", check (as root) the
|
---|
1159 | output of the <computeroutput>dmesg</computeroutput> command to find out
|
---|
1160 | why the load failed. Most probably the kernel disagrees with the version
|
---|
1161 | of the gcc used to compile the module. Make sure that you use the same
|
---|
1162 | compiler as used to build the kernel.</para>
|
---|
1163 | </sect2>
|
---|
1164 |
|
---|
1165 | <sect2>
|
---|
1166 | <title>Linux host CD/DVD drive not found</title>
|
---|
1167 |
|
---|
1168 | <para>If you have configured a virtual machine to use the host's CD/DVD
|
---|
1169 | drive, but this does not appear to work, make sure that the current user
|
---|
1170 | has permission to access the corresponding Linux device file
|
---|
1171 | (<computeroutput>/dev/hdc</computeroutput> or
|
---|
1172 | <computeroutput>/dev/scd0</computeroutput> or
|
---|
1173 | <computeroutput>/dev/cdrom</computeroutput> or similar). On most
|
---|
1174 | distributions, the user must be added to a corresponding group (usually
|
---|
1175 | called <computeroutput>cdrom</computeroutput> or
|
---|
1176 | <computeroutput>cdrw</computeroutput>).</para>
|
---|
1177 | </sect2>
|
---|
1178 |
|
---|
1179 | <sect2>
|
---|
1180 | <title>Linux host CD/DVD drive not found (older distributions)</title>
|
---|
1181 |
|
---|
1182 | <para>On older Linux distributions, if your CD/DVD device has a
|
---|
1183 | different name, VirtualBox may be unable to find it. On older Linux
|
---|
1184 | hosts, VirtualBox performs the following steps to locate your CD/DVD
|
---|
1185 | drives:</para>
|
---|
1186 |
|
---|
1187 | <para><orderedlist>
|
---|
1188 | <listitem>
|
---|
1189 | <para>VirtualBox examines if the environment variable
|
---|
1190 | <computeroutput>VBOX_CDROM</computeroutput> is defined (see
|
---|
1191 | below). If so, VirtualBox omits all the following checks.</para>
|
---|
1192 | </listitem>
|
---|
1193 |
|
---|
1194 | <listitem>
|
---|
1195 | <para>VirtualBox tests if
|
---|
1196 | <computeroutput>/dev/cdrom</computeroutput> works.</para>
|
---|
1197 | </listitem>
|
---|
1198 |
|
---|
1199 | <listitem>
|
---|
1200 | <para>In addition, VirtualBox checks if any CD/DVD drives are
|
---|
1201 | currently mounted by checking
|
---|
1202 | <computeroutput>/etc/mtab</computeroutput>.</para>
|
---|
1203 | </listitem>
|
---|
1204 |
|
---|
1205 | <listitem>
|
---|
1206 | <para>In addition, VirtualBox checks if any of the entries in
|
---|
1207 | <computeroutput>/etc/fstab</computeroutput> point to CD/DVD
|
---|
1208 | devices.</para>
|
---|
1209 | </listitem>
|
---|
1210 | </orderedlist></para>
|
---|
1211 |
|
---|
1212 | <para>In other words, you can try to set VBOX_CDROM to contain a list of
|
---|
1213 | your CD/DVD devices, separated by colons, for example as follows:</para>
|
---|
1214 |
|
---|
1215 | <para><screen>export VBOX_CDROM='/dev/cdrom0:/dev/cdrom1'</screen>On
|
---|
1216 | modern Linux distributions, VirtualBox uses the hardware abstraction
|
---|
1217 | layer (hal) to locate CD and DVD hardware.</para>
|
---|
1218 | </sect2>
|
---|
1219 |
|
---|
1220 | <sect2>
|
---|
1221 | <title>Linux host floppy not found</title>
|
---|
1222 |
|
---|
1223 | <para>The previous instructions (for CD and DVD drives) apply
|
---|
1224 | accordingly to floppy disks, except that on older distributions
|
---|
1225 | VirtualBox tests for <computeroutput>/dev/fd*</computeroutput> devices
|
---|
1226 | by default, and this can be overridden with the
|
---|
1227 | <computeroutput>VBOX_FLOPPY</computeroutput> environment
|
---|
1228 | variable.</para>
|
---|
1229 | </sect2>
|
---|
1230 |
|
---|
1231 | <sect2>
|
---|
1232 | <title>Strange guest IDE error messages when writing to CD/DVD</title>
|
---|
1233 |
|
---|
1234 | <para>If the experimental CD/DVD writer support is enabled with an
|
---|
1235 | incorrect VirtualBox, host or guest configuration, it is possible that
|
---|
1236 | any attempt to access the CD/DVD writer fails and simply results in
|
---|
1237 | guest kernel error messages (for Linux guests) or application error
|
---|
1238 | messages (for Windows guests). VirtualBox performs the usual consistency
|
---|
1239 | checks when a VM is powered up (in particular it aborts with an error
|
---|
1240 | message if the device for the CD/DVD writer is not writable by the user
|
---|
1241 | starting the VM), but it cannot detect all misconfigurations. The
|
---|
1242 | necessary host and guest OS configuration is not specific for
|
---|
1243 | VirtualBox, but a few frequent problems are listed here which occurred
|
---|
1244 | in connection with VirtualBox.</para>
|
---|
1245 |
|
---|
1246 | <para>Special care must be taken to use the correct device. The
|
---|
1247 | configured host CD/DVD device file name (in most cases
|
---|
1248 | <literal>/dev/cdrom</literal>) must point to the device that allows
|
---|
1249 | writing to the CD/DVD unit. For CD/DVD writer units connected to a SCSI
|
---|
1250 | controller or to a IDE controller that interfaces to the Linux SCSI
|
---|
1251 | subsystem (common for some SATA controllers), this must refer to the
|
---|
1252 | SCSI device node (e.g. <literal>/dev/scd0</literal>). Even for IDE
|
---|
1253 | CD/DVD writer units this must refer to the appropriate SCSI CD-ROM
|
---|
1254 | device node (e.g. <literal>/dev/scd0</literal>) if the
|
---|
1255 | <literal>ide-scsi</literal> kernel module is loaded. This module is
|
---|
1256 | required for CD/DVD writer support with all Linux 2.4 kernels and some
|
---|
1257 | early 2.6 kernels. Many Linux distributions load this module whenever a
|
---|
1258 | CD/DVD writer is detected in the system, even if the kernel would
|
---|
1259 | support CD/DVD writers without the module. VirtualBox supports the use
|
---|
1260 | of IDE device files (e.g. <literal>/dev/hdc</literal>), provided the
|
---|
1261 | kernel supports this and the <literal>ide-scsi</literal> module is not
|
---|
1262 | loaded.</para>
|
---|
1263 |
|
---|
1264 | <para>Similar rules (except that within the guest the CD/DVD writer is
|
---|
1265 | always an IDE device) apply to the guest configuration. Since this setup
|
---|
1266 | is very common, it is likely that the default configuration of the guest
|
---|
1267 | works as expected.</para>
|
---|
1268 | </sect2>
|
---|
1269 |
|
---|
1270 | <sect2>
|
---|
1271 | <title>VBoxSVC IPC issues</title>
|
---|
1272 |
|
---|
1273 | <para>On Linux, VirtualBox makes use of a custom version of Mozilla
|
---|
1274 | XPCOM (cross platform component object model) for inter- and
|
---|
1275 | intra-process communication (IPC). The process
|
---|
1276 | <computeroutput>VBoxSVC</computeroutput> serves as a communication hub
|
---|
1277 | between different VirtualBox processes and maintains the global
|
---|
1278 | configuration, i.e. the XML database. When starting a VirtualBox
|
---|
1279 | component, the processes <computeroutput>VBoxSVC</computeroutput> and
|
---|
1280 | <computeroutput>VirtualBoxXPCOMIPCD</computeroutput> are started
|
---|
1281 | automatically. They are only accessible from the user account they are
|
---|
1282 | running under. <computeroutput>VBoxSVC</computeroutput> owns the
|
---|
1283 | VirtualBox configuration database which normally resides in
|
---|
1284 | <computeroutput>~/.config/VirtualBox</computeroutput>, or the appropriate configuration directory for your operating system. While it is running, the
|
---|
1285 | configuration files are locked. Communication between the various
|
---|
1286 | VirtualBox components and <computeroutput>VBoxSVC</computeroutput> is
|
---|
1287 | performed through a local domain socket residing in
|
---|
1288 | <computeroutput>/tmp/.vbox-<username>-ipc</computeroutput>. In
|
---|
1289 | case there are communication problems (i.e. a VirtualBox application
|
---|
1290 | cannot communicate with <computeroutput>VBoxSVC</computeroutput>),
|
---|
1291 | terminate the daemons and remove the local domain socket
|
---|
1292 | directory.</para>
|
---|
1293 | </sect2>
|
---|
1294 |
|
---|
1295 | <sect2 id="ts_usb-linux">
|
---|
1296 | <title>USB not working</title>
|
---|
1297 |
|
---|
1298 | <para>If USB is not working on your Linux host, make sure that the
|
---|
1299 | current user is a member of the
|
---|
1300 | <computeroutput>vboxusers</computeroutput> group. On older hosts, you
|
---|
1301 | need to make sure that the user has permission to access the USB
|
---|
1302 | filesystem (<computeroutput>usbfs</computeroutput>), which VirtualBox
|
---|
1303 | relies on to retrieve valid information about your host's USB devices.
|
---|
1304 | The rest of this section only applies to those older systems.</para>
|
---|
1305 |
|
---|
1306 | <para>As <computeroutput>usbfs</computeroutput> is a virtual filesystem,
|
---|
1307 | a <computeroutput>chmod</computeroutput> on
|
---|
1308 | <computeroutput>/proc/bus/usb</computeroutput> has no effect. The
|
---|
1309 | permissions for <computeroutput>usbfs</computeroutput> can therefore
|
---|
1310 | <emphasis>only</emphasis> be changed by editing the
|
---|
1311 | <computeroutput>/etc/fstab</computeroutput> file.</para>
|
---|
1312 |
|
---|
1313 | <para>For example, most Linux distributions have a user group called
|
---|
1314 | <computeroutput>usb</computeroutput> or similar, of which the current
|
---|
1315 | user must be a member. To give all users of that group access to usbfs,
|
---|
1316 | make sure the following line is present:<screen># 85 is the USB group
|
---|
1317 | none /proc/bus/usb usbfs devgid=85,devmode=664 0 0</screen>Replace
|
---|
1318 | 85 with the group ID that matches your system (search
|
---|
1319 | <computeroutput>/etc/group</computeroutput> for "usb" or similar).
|
---|
1320 | Alternatively, if you don't mind the security hole, give all users
|
---|
1321 | access to USB by changing "664" to "666".</para>
|
---|
1322 |
|
---|
1323 | <para>The various distributions are very creative from which script the
|
---|
1324 | <computeroutput>usbfs</computeroutput> filesystem is mounted. Sometimes
|
---|
1325 | the command is hidden in unexpected places. For SuSE 10.0 the mount
|
---|
1326 | command is part of the udev configuration file
|
---|
1327 | <computeroutput>/etc/udev/rules.d/50-udev.rules</computeroutput>. As
|
---|
1328 | this distribution has no user group called
|
---|
1329 | <computeroutput>usb</computeroutput>, you may e.g. use the
|
---|
1330 | <computeroutput>vboxusers</computeroutput> group which was created by
|
---|
1331 | the VirtualBox installer. Since group numbers are allocated dynamically,
|
---|
1332 | the following example uses 85 as a placeholder. Modify the line
|
---|
1333 | containing (a linebreak has been inserted to improve
|
---|
1334 | readability)<screen>DEVPATH="/module/usbcore", ACTION=="add",
|
---|
1335 | RUN+="/bin/mount -t usbfs usbfs /proc/bus/usb"</screen> and add the
|
---|
1336 | necessary options (make sure that everything is in a single
|
---|
1337 | line):<screen>DEVPATH="/module/usbcore", ACTION=="add",
|
---|
1338 | RUN+="/bin/mount -t usbfs usbfs /proc/bus/usb -o devgid=85,devmode=664"</screen></para>
|
---|
1339 |
|
---|
1340 | <para>Debian Etch has the mount command in
|
---|
1341 | <computeroutput>/etc/init.d/mountkernfs.sh</computeroutput>. Since that
|
---|
1342 | distribution has no group <computeroutput>usb</computeroutput>, it is
|
---|
1343 | also the easiest solution to allow all members of the group
|
---|
1344 | <computeroutput>vboxusers</computeroutput> to access the USB subsystem.
|
---|
1345 | Modify the line <screen>domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev</screen>
|
---|
1346 | so that it contains <screen>domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=85,devmode=664</screen>
|
---|
1347 | As usual, replace the 85 with the actual group number which should get
|
---|
1348 | access to USB devices.</para>
|
---|
1349 |
|
---|
1350 | <para>Other distributions do similar operations in scripts stored in the
|
---|
1351 | <computeroutput>/etc/init.d</computeroutput> directory.</para>
|
---|
1352 | </sect2>
|
---|
1353 |
|
---|
1354 | <sect2>
|
---|
1355 | <title>PAX/grsec kernels</title>
|
---|
1356 |
|
---|
1357 | <para>Linux kernels including the grsec patch (see <literal><ulink
|
---|
1358 | url="http://www.grsecurity.net/">http://www.grsecurity.net/</ulink></literal>)
|
---|
1359 | and derivates have to disable PAX_MPROTECT for the VBox binaries to be
|
---|
1360 | able to start a VM. The reason is that VBox has to create executable
|
---|
1361 | code on anonymous memory.</para>
|
---|
1362 | </sect2>
|
---|
1363 |
|
---|
1364 | <sect2>
|
---|
1365 | <title>Linux kernel vmalloc pool exhausted</title>
|
---|
1366 |
|
---|
1367 | <para>When running a large number of VMs with a lot of RAM on a Linux
|
---|
1368 | system (say 20 VMs with 1GB of RAM each), additional VMs might fail to
|
---|
1369 | start with a kernel error saying that the vmalloc pool is exhausted and
|
---|
1370 | should be extended. The error message also tells you to specify
|
---|
1371 | <computeroutput>vmalloc=256MB</computeroutput> in your kernel parameter
|
---|
1372 | list. If adding this parameter to your GRUB or LILO configuration makes
|
---|
1373 | the kernel fail to boot (with a weird error message such as "failed to
|
---|
1374 | mount the root partition"), then you have probably run into a memory
|
---|
1375 | conflict of your kernel and initial RAM disk. This can be solved by
|
---|
1376 | adding the following parameter to your GRUB configuration:</para>
|
---|
1377 |
|
---|
1378 | <screen>uppermem 524288</screen>
|
---|
1379 | </sect2>
|
---|
1380 | </sect1>
|
---|
1381 |
|
---|
1382 | <sect1>
|
---|
1383 | <title>Solaris hosts</title>
|
---|
1384 |
|
---|
1385 | <sect2>
|
---|
1386 | <title>Cannot start VM, not enough contiguous memory</title>
|
---|
1387 |
|
---|
1388 | <para>The ZFS file system is known to use nearly all available RAM as cache if
|
---|
1389 | the default system settings are not changed. This may lead to a heavy
|
---|
1390 | fragmentation of the host memory preventing VirtualBox VMs from being
|
---|
1391 | started. We recommend to limit the ZFS cache by adding a line<screen>set zfs:zfs_arc_max = xxxx</screen>
|
---|
1392 | to /etc/system where <computeroutput>xxxx</computeroutput> bytes is the
|
---|
1393 | amount of memory usable for the ZFS cache.</para>
|
---|
1394 | </sect2>
|
---|
1395 |
|
---|
1396 | <sect2>
|
---|
1397 | <title>VM aborts with out of memory errors on Solaris 10 hosts</title>
|
---|
1398 |
|
---|
1399 | <para>32-bit Solaris 10 hosts (bug 1225025) require swap space equal to,
|
---|
1400 | or greater than the host's physical memory size. For example, 8 GB
|
---|
1401 | physical memory would require at least 8 GB swap. This can be configured
|
---|
1402 | during a Solaris 10 install by choosing a 'custom install' and changing
|
---|
1403 | the default partitions.</para>
|
---|
1404 |
|
---|
1405 | <note>
|
---|
1406 | <para>This restriction applies only to 32-bit Solaris hosts, 64-bit
|
---|
1407 | hosts are not affected!</para>
|
---|
1408 | </note>
|
---|
1409 |
|
---|
1410 | <para>For existing Solaris 10 installs, an additional swap image needs
|
---|
1411 | to be mounted and used as swap. Hence if you have 1 GB swap and 8 GB of
|
---|
1412 | physical memory, you require to add 7 GB more swap. This can be done as
|
---|
1413 | follows:</para>
|
---|
1414 |
|
---|
1415 | <para>For ZFS (as root user):</para>
|
---|
1416 |
|
---|
1417 | <para><screen>zfs create -V 8gb /_<ZFS volume>_/swap
|
---|
1418 | swap -a /dev/zvol/dsk/_<ZFS volume>_/swap</screen></para>
|
---|
1419 |
|
---|
1420 | <para>To mount if after reboot, add the following line to
|
---|
1421 | /etc/vfstab:</para>
|
---|
1422 |
|
---|
1423 | <screen>/dev/zvol/dsk/_<ZFS volume>_/swap - - swap - no -</screen>
|
---|
1424 |
|
---|
1425 | <para>Alternatively, you could grow the existing swap using:</para>
|
---|
1426 |
|
---|
1427 | <screen>zfs set volsize=8G rpool/swap</screen>
|
---|
1428 |
|
---|
1429 | <para>And reboot the system for the changes to take effect.</para>
|
---|
1430 |
|
---|
1431 | <para>For UFS (as root user):</para>
|
---|
1432 |
|
---|
1433 | <screen>mkfile 7g /path/to/swapfile.img
|
---|
1434 | swap -a /path/to/swapfile.img</screen>
|
---|
1435 |
|
---|
1436 | <para>To mount it after reboot, add the following line to
|
---|
1437 | /etc/vfstab:</para>
|
---|
1438 |
|
---|
1439 | <screen>/path/to/swap.img - - swap - no -</screen>
|
---|
1440 | </sect2>
|
---|
1441 | </sect1>
|
---|
1442 | </chapter>
|
---|