home start up prev next
Оглавление

Procedures and tools
Categorizing and isolating problems
Сбор отладочной информации
The built-in VM debugger
VM core format
Общие вопросы
Guest shows IDE/SATA errors for file-based images on slow host file system
Responding to guest IDE/SATA flush requests
Poor performance caused by host power management
GUI: 2D Video Acceleration option is grayed out
Гостевые системы Windows
Windows bluescreens after changing VM configuration
Windows 0x101 bluescreens with SMP enabled (IPI timeout)
Невозможно установить Windows 2000
Как записать информацию "синего экрана смерти" гостя Windows
Проблемы с сетью в госте Windows Vista
Гостевые системы Windows могут вызывать высокую загрузку процессора
Long delays when accessing shared folders
USB tablet coordinates wrong in Windows 98 guests
Linux and X11 guests
Гостевые системы Linux могут вызывать сильную загрузку процессора
Процессоры AMD Barcelona
Версии ядра Linux 2.6 с ошибками
Shared clipboard, auto-resizing and seamless desktop in X11 guests
Windows хосты
Проблемы с процессом VBoxSVC
Не происходит смена CD/DVD
Медленное соединение при использовании клиента Microsoft RDP
Работа iSCSI initiator и target на одной системе
Bridged networking adapters missing
Host-only networking adapters cannot be created
Хост системы Linux
Модуль ядра не загружается
CD/DVD устройство хоста не доступно
CD/DVD устройство хоста не доступно (старые дистрибутивы)
Привод гибких дисков хоста не доступен
Необычные сообщения об ошибках для гостевого IDE при записи CD/DVD
Проблемы с VBoxSVC IPC
Проблемы с USB
PAX/grsec kernels
Linux kernel vmalloc pool exhausted
Solaris hosts
Cannot start VM, not enough contiguous memory
VM aborts with out of memory errors on Solaris 10 hosts

В этой главе даются ответы на часто задаваемые вопросы. Чтобы улучшить свои познания в VirtualBox, а также узнать о наиболее известных "подводных камнях", рекомендуется прочитать эту главу. .

Procedures and tools

Categorizing and isolating problems

More often than not, a virtualized guest behaves like a physical system. Any problems that a physical machine would encounter, a virtual machine will encounter as well. If, for example, Internet connectivity is lost due to external issues, virtual machines will be affected just as much as physical ones.

If a true VirtualBox problem is encountered, it helps to categorize and isolate the problem first. Here are some of the questions that should be answered before reporting a problem:

  1. Is the problem specific to a certain guest OS? Specific release of a guest OS? Especially with Linux guest related problems, the issue may be specific to a certain distribution and version of Linux.

  2. Is the problem specific to a certain host OS? Problems are usually not host OS specific (because most of the VirtualBox code base is shared across all supported platforms), but especially in the areas of networking and USB support, there are significant differences between host platforms. Some GUI related issues are also host specific.

  3. Is the problem specific to certain host hardware? This category of issues is typically related to the host CPU. Because of significant differences between VT-x and AMD-V, problems may be specific to one or the other technology. The exact CPU model may also make a difference (even for software virtualization) because different CPUs support different features, which may affect certain aspects of guest CPU operation.

  4. Is the problem specific to a certain virtualization mode? Some problems may only occur in software virtualization mode, others may be specific to hardware virtualization.

  5. Is the problem specific to guest SMP? That is, is it related to the number of virtual CPUs (VCPUs) in the guest? Using more than one CPU usually significantly affects the internal operation of a guest OS.

  6. Is the problem specific to the Guest Additions? In some cases, this is a given (e.g., a shared folders problem), in other cases it may be less obvious (for example, display problems). And if the problem is Guest Additions specific, is it also specific to a certain version of the Additions?

  7. Is the problem specific to a certain environment? Some problems are related to a particular environment external to the VM; this usually involves network setup. Certain configurations of external servers such as DHCP or PXE may expose problems which do not occur with other, similar servers.

  8. Is the problem a regression? Knowing that an issue is a regression usually makes it significantly easier to find the solution. In this case, it is crucial to know which version is affected and which is not.

Сбор отладочной информации

Для определения проблемы, важным делом является сбор отладочной информации, которая может быть проанализирована службой поддержки VirtualBox. Этот раздел содержит сведения о том как эта информация может быть получена.

Every time VirtualBox starts up a VM, a so-called "release log file" is created containing lots of information about the VM configuration and runtime events. The log file is called VBox.log and resides in the VM log file folder. Обычно это каталог вида:

$HOME/VirtualBox VMs/{machinename}/Logs

When starting a VM, the configuration file of the last run will be renamed to .1, up to .3. При возникновение проблем, полезно просмотреть этот журнал. Также по требованию службы поддержки VirtualBox, необходимо обязательно предоставить соответствующий журнал событий.

Для удобства, для каждой виртуальной машины, из главного окна VirtualBox возможно вызвать окно показа этого журнала. Для этого, выберите виртуальную машину из списка слева и пункт меню "Показать журнал..." из меню "Машина".

The release log file (VBox.log) contains a wealth of diagnostic information, such as Host OS type and version, VirtualBox version and build (32-bit or 64-bit), a complete dump of the guest's configuration (CFGM), detailed information about the host CPU type and supported features, whether hardware virtualization is enabled, information about VT-x/AMD-V setup, state transitions (creating, running, paused, stopping, etc.), guest BIOS messages, Guest Additions messages, device-specific log entries and, at the end of execution, final guest state and condensed statistics.

In case of crashes, it is very important to collect crash dumps. This is true for both host and guest crashes. For information about enabling core dumps on Linux, Solaris, and OS X systems, refer to the core dump article on the VirtualBox website.[42]

You can also use VBoxManage debugvm to create a dump of a complete virtual machine; see the section called “VBoxManage debugvm”.

For network related problems, it is often helpful to capture a trace of network traffic. If the traffic is routed through an adapter on the host, it is possible to use Wireshark or a similar tool to capture the traffic there. However, this often also includes a lot of traffic unrelated to the VM.

VirtualBox provides an ability to capture network traffic only on a specific VM's network adapter. Refer to the network tracing article on the VirtualBox website[43] for information on enabling this capture. The trace files created by VirtualBox are in .pcap format and can be easily analyzed with Wireshark.

The built-in VM debugger

VirtualBox includes a built-in VM debugger, which advanced users may find useful. This debugger allows for examining and, to some extent, controlling the VM state.

Предупреждение

Use the VM debugger at your own risk. There is no support for it, and the following documentation is only made available for advanced users with a very high level of familiarity with the x86/AMD64 machine instruction set, as well as detailed knowledge of the PC architecture. A degree of familiarity with the internals of the guest OS in question may also be very helpful.

The VM debugger is available in all regular production versions of VirtualBox, but it is disabled by default because the average user will have little use for it. There are two ways to access the debugger:

  • A debugger console window displayed alongside the VM

  • Via the telnet protocol at port 5000

The debugger can be enabled in three ways:

  • Start the VM directly using VirtualBox --startvm, with an additional --dbg, --debug, or --debug-command-line argument. See the VirtualBox usage help for details.

  • Set the VBOX_GUI_DBG_ENABLED or VBOX_GUI_DBG_AUTO_SHOW environment variable to true before launching the VirtualBox process. Setting these variables (only their presence is checked) is effective even when the first VirtualBox process is the VM selector window. VMs subsequently launched from the selector will have the debugger enabled.

  • Set the GUI/Dbg/Enabled extra data item to true before launching the VM. This can be set globally or on a per VM basis.

A new 'Debug' menu entry will be added to the VirtualBox application. This menu allows the user to open the debugger console.

The VM debugger command syntax is loosely modeled on Microsoft and IBM debuggers used on DOS, OS/2 and Windows. Users familiar with symdeb, CodeView, or the OS/2 kernel debugger will find the VirtualBox VM debugger familiar.

The most important command is help. This will print brief usage help for all debugger commands. The set of commands supported by the VM debugger changes frequently and the help command is always up-to-date.

A brief summary of frequently used commands follows:

  • stop -- stops the VM execution and enables single stepping

  • g -- continue VM execution

  • t -- single step an instruction

  • rg/rh/r -- print the guest/hypervisor/current registers

  • kg/kh/k -- print the guest/hypervisor/current call stack

  • da/db/dw/dd/dq -- print memory contents as ASCII/bytes/words/dwords/qwords

  • u -- unassemble memory

  • dg -- print the guest's GDT

  • di -- print the guest's IDT

  • dl -- print the guest's LDT

  • dt -- print the guest's TSS

  • dp* -- print the guest's page table structures

  • bp/br -- set a normal/recompiler breakpoint

  • bl -- list breakpoints

  • bc -- clear a breakpoint

  • writecore -- writes a VM core file to disk, refer the section called “VM core format”

See the built-in help for other available commands.

The VM debugger supports symbolic debugging, although symbols for guest code are often not available. For Solaris guests, the detect command automatically determines the guest OS version and locates kernel symbols in guest's memory. Symbolic debugging is then available. For Linux guests, the detect commands also determines the guest OS version, but there are no symbols in the guest's memory. Kernel symbols are available in the file /proc/kallsyms on Linux guests. This file must be copied to the host, for example using scp. The loadmap debugger command can be used to make the symbol information available to the VM debugger. Note that the kallsyms file contains the symbols for the currently loaded modules; if the guest's configuration changes, the symbols will change as well and must be updated.

For all guests, a simple way to verify that the correct symbols are loaded is the k command. The guest is normally idling and it should be clear from the symbolic information that the guest operating system's idle loop is being executed.

Another group of debugger commands is the set of info commands. Running info help provides complete usage information. The information commands provide ad-hoc data pertinent to various emulated devices and aspects of the VMM. There is no general guideline for using the info commands, the right command to use depends entirely on the problem being investigated. Some of the info commands are:

  • cfgm -- print a branch of the configuration tree

  • cpuid -- display the guest CPUID leaves

  • ioport -- print registered I/O port ranges

  • mmio -- print registered MMIO ranges

  • mode -- print the current paging mode

  • pit -- print the i8254 PIT state

  • pic -- print the i8259A PIC state

  • ohci/ehci -- print a subset of the OHCI/EHCI USB controller state

  • pcnet0 -- print the PCnet state

  • vgatext -- print the contents of the VGA framebuffer formatted as standard text mode

  • timers -- print all VM timers

The output of the info commands generally requires in-depth knowledge of the emulated device and/or VirtualBox VMM internals. However, when used properly, the information provided can be invaluable.

VM core format

VirtualBox uses the 64-bit ELF format for its VM core files created by VBoxManage debugvm; see the section called “VBoxManage debugvm”. The VM core file contain the memory and CPU dumps of the VM and can be useful for debugging your guest OS. The 64-bit ELF object format specficiation can be obtained here: http://downloads.openwatcom.org/ftp/devel/docs/elf-64-gen.pdf.

The overall layout of the VM core format is as follows:

[ ELF 64 Header]
[ Program Header, type PT_NOTE ]
  -> offset to COREDESCRIPTOR
[ Program Header, type PT_LOAD ] - one for each contiguous physical memory range
  -> Memory offset of range
  -> File offset
[ Note Header, type NT_VBOXCORE ]
[ COREDESCRIPTOR ]
  -> Magic
  -> VM core file version
  -> VBox version
  -> Number of vCPUs etc.
[ Note Header, type NT_VBOXCPU ] - one for each vCPU
[ vCPU 1 Note Header ]
  [ CPUMCTX - vCPU 1 dump ]
[ Additional Notes + Data ] - currently unused
[ Memory dump ]

The memory descriptors contain physical addresses relative to the guest and not virtual addresses. Regions of memory such as MMIO regions are not included in the core file.

The relevant data structures and definitions can be found in the VirtualBox sources under the following header files: include/VBox/dbgfcorefmt.h, include/VBox/cpumctx.h and src/VBox/Runtime/include/internal/ldrELFCommon.h.

The VM core file can be inspected using elfdump and GNU readelf or other similar utilities.

Общие вопросы

Guest shows IDE/SATA errors for file-based images on slow host file system

Occasionally, some host file systems provide very poor writing performance and as a consequence cause the guest to time out IDE/SATA commands. Это нормальное поведение и обычно не приводит к реальным проблемам, так как гостевая система повторяет выполнение команд в случае задержки. However some guests (e.g. some Linux versions) have severe problems if a write to an image file takes longer than about 15 seconds. Некоторым файловым системы требуется более минуты для завершения отдельной операции записи, если кеш хоста содержит большое количество данных, которые необходимо записать.

Симптомом данной проблемы является невозможность получения гостем доступа к файлам во время крупных операций записи и копирования, что обычно приводит к зависанию гостевой системы.

In order to work around this problem (the true fix is to use a faster file system that doesn't exhibit such unacceptable write performance), it is possible to flush the image file after a certain amount of data has been written. This interval is normally infinite, but can be configured individually for each disk of a VM.

For IDE disks use the following command:

VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/FlushInterval" [b]

For SATA disks use the following command:

VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/FlushInterval" [b]

The value [x] that selects the disk for IDE is 0 for the master device on the first channel, 1 for the slave device on the first channel, 2 for the master device on the second channel or 3 for the master device on the second channel. For SATA use values between 0 and 29. Only disks support this configuration option; it must not be set for CD/DVD drives.

Элемент интервала [b] является количеством записанных байтов с момента последнего сброса(записи). Это значение должно быть подобрано так, чтобы большие операции записи не вызывали задержек. Так как необходимое значение интервала зависит от производительности хоста и его файловой системы, то это значение подбирается экпериментально. Хорошими отправными точками является значение между 1000000 и 10000000 (от 1 до 10 мегабайт). Уменьшение интервала вызывает проблемы производительности записи гостевой системы. Малое значение понижает производительность, не обеспечивая результата. Значение 1 будет вызывать операцию сброса данных на диск при каждой операции записи и решает эту проблему в любом случае, но вызывает серьезную потерю производительности записи.

Установка значения в 0 соответствует неограниченному интервалу сброса данных, что вызывает отключение настроек для интервала сброса. Удаление значения ключа имеет тот же самый эффект .

Responding to guest IDE/SATA flush requests

If desired, the virtual disk images can be flushed when the guest issues the IDE FLUSH CACHE command. Обычно этот запрос игнорируется для улучшения производительности. The parameters below are only accepted for disk drives. They must not be set for DVD drives.

To enable flushing for IDE disks, issue the following command:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0

Значение [x] указывает на диск, и принимает значение 0 для первичного диска на первом канале, 1 для вторичного , 2 для мастера и 3 для вторичного на втором канале IDE.

To enable flushing for SATA disks, issue the following command:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush" 0

The value [x] that selects the disk can be a value between 0 and 29.

Note that this doesn't affect the flushes performed according to the configuration described in . Восстановить значение по умолчанию, для игнорирования запросов сброса данных на диск возможно установкой значения в 1 или удалением значения ключа.

Poor performance caused by host power management

On some hardware platforms and operating systems, virtualization peformance is negatively affected by host CPU power management. The symptoms may be choppy audio in the guest or erratic guest clock behavior.

Some of the problems may be caused by firmware and/or host operating system bugs. Therefore, updating the firmware and applying operating systems fixes is recommended.

For optimal virtualization performance, the C1E power state support in the system's BIOS should be disabled, if such a setting is available (not all systems support the C1E power state). Disabling other power management settings may also improve performance. However, a balance between performance and power consumption must always be considered.

GUI: 2D Video Acceleration option is grayed out

To use 2D Video Acceleration within VirtualBox, your host's video card should support certain OpenGL extensions. On startup, VirtualBox checks for those extensions, and, if the test fails, this option is silently grayed out.

To find out why it has failed, you can manually execute the following command:

VBoxTestOGL --log "log_file_name" --test 2D

It will list the required OpenGL extensions one by one and will show you which one failed the test. This usually means that you are running an outdated or misconfigured OpenGL driver on your host. It can also mean that your video chip is lacking required functionality.

Гостевые системы Windows

Windows bluescreens after changing VM configuration

Changing certain virtual machine settings can cause Windows guests to fail during start up with a bluescreen. This may happen if you change VM settings after installing Windows, or if you copy a disk image with an already installed Windows to a newly created VM which has settings that differ from the original machine.

This applies in particular to the following settings:

  • The ACPI and I/O APIC settings should never be changed after installing Windows. Depending on the presence of these hardware features, the Windows installation program chooses special kernel and device driver versions and will fail to startup should these hardware features be removed. (Enabling them for a Windows VM which was installed without them does not cause any harm. However, Windows will not use these features in this case.)

  • Changing the storage controller hardware will cause bootup failures as well. This might also apply to you if you copy a disk image from an older version of VirtualBox to a virtual machine created with a newer VirtualBox version; the default subtype of IDE controller hardware was changed from PIIX3 to PIIX4 with VirtualBox 2.2. Make sure these settings are identical.

Windows 0x101 bluescreens with SMP enabled (IPI timeout)

If a VM is configured to have more than one processor (symmetrical multiprocessing, SMP), some configurations of Windows guests crash with an 0x101 error message, indicating a timeout for inter-processor interrupts (IPIs). These interrupts synchronize memory management between processors.

According to Microsoft, this is due to a race condition in Windows. A hotfix is available.[44] If this does not help, please reduce the number of virtual processors to 1.

Невозможно установить Windows 2000

При установке гостевой системы Windows 2000, вы можете столкнуться с одной из следующих проблем:

  • В процессе регистрации, программа установки вызывает перезагрузку(Installation reboots, usually during component registration).

  • Установщик полностью заполняет весь жесткий диск файлами журналов (логами).

  • Installation complains about a failure installing msgina.dll.

Все эти проблемы вызываются ошибкой в реализации драйвера жесткого диска Windows 2000. After issuing a hard disk request, there is a race condition in the Windows driver code which leads to corruption if the operation completes too fast, i.e. the hardware interrupt from the IDE controller arrives too soon. With physical hardware, there is a guaranteed delay in most systems so the problem is usually hidden there (however it should be possible to reproduce it on physical hardware as well). In a virtual environment, it is possible for the operation to be done immediately (especially on very fast systems with multiple CPUs) and the interrupt is signaled sooner than on a physical system. Решение состоит в том, чтобы создать искусственную задержку, до вызова этого прерывания. Эта задержка может быть установлена для ВМ следующей командой:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/piix3ide/0/Config/IRQDelay" 1

Эта команда установит задержку в одну миллисекунду. В случае если это не поможет, выбирайте это значение между 1 и 5 миллисекундами. Заметьте, что это решение замедляет производительность дисковой системы. После установки, вы должны удалить значение этого ключа (или установить его в 0).

Как записать информацию "синего экрана смерти" гостя Windows

Когда в госте Windows происходит ошибка в ядре, отображается "знаменитый синий экран смерти". В зависимости от настроек Windows, эта информация может оставаться на экране пока не перезагрузить машину или может происходить автоматическая перезагрузка системы. Во время установки, Windows обычно настроена на автоматическую перезагрузку. При этом нет возможности прочитать информацию, которая может быть полезной для решения проблемы.

VirtualBox предоставляет выбор метода выключения гостевой системы, когда ей необходимо выполнить перезагрузку. Чтобы задействовать эту возможность, выполните команду:

VBoxManage setextradata "VM name" "VBoxInternal/PDM/HaltOnReset" 1

Проблемы с сетью в госте Windows Vista

With Windows Vista, Microsoft dropped support for the AMD PCNet card that VirtualBox used to provide as the default virtual network card before version 1.6.0. For Windows Vista guests, VirtualBox now uses an Intel E1000 card by default.

If, for some reason, you still want to use the AMD card, you need to download the PCNet driver from the AMD website (available for 32-bit Windows only). You can transfer it into the virtual machine using a shared folder, see (see the section called “Shared folders”).

Гостевые системы Windows могут вызывать высокую загрузку процессора

Некоторые фоновые процессы в гостевых системах Windows, особенно антивирусы, вызывают высокую нагрузку на процессор хоста, да же если кажется, что гостевая система простаивает. Мы рекомендуем отключить антивирусные программы в гостевых системах, если это возможно.

Long delays when accessing shared folders

The performance for accesses to shared folders from a Windows guest might be decreased due to delays during the resolution of the VirtualBox shared folders name service. To fix these delays, add the following entries to the file \windows\system32\drivers\etc\lmhosts of the Windows guest:

255.255.255.255        VBOXSVR #PRE
255.255.255.255        VBOXSRV #PRE

After doing this change, a reboot of the guest is required.

USB tablet coordinates wrong in Windows 98 guests

If a Windows 98 VM is configured to use the emulated USB tablet (absolute pointing device), the coordinate translation may be incorrect and the pointer is restricted to the upper left quarter of the guest's screen.

The USB HID (Human Interface Device) drivers in Windows 98 are very old and do not handle tablets the same way all more recent operating systems do (Windows 2000 and later, Mac OS X, Solaris). To work around the problem, issue the following command:

VBoxManage setextradata "VM name" "VBoxInternal/USB/HidMouse/0/Config/CoordShift" 0

To restore the default behavior, remove the key or set its value to 1.

Linux and X11 guests

Гостевые системы Linux могут вызывать сильную загрузку процессора

Некоторые гостевые системы Linux могут вызывать высокую загрузку процессора хоста, даже если сами они находятся в состоянии простоя. Это может быть вызвано большим значением частоты таймера в ядре гостевой системы Some Linux distributions, for example Fedora, ship a Linux kernel configured for a timer frequency of 1000Hz. Мы рекомендуем скомпилировать ядро гостевой системы с установленым значением таймера в 100Hz.

Linux kernels shipped with Red Hat Enterprise Linux (RHEL) as of release 4.7 and 5.1 as well as kernels of related Linux distributions (for instance CentOS and Oracle Enterprise Linux) support a kernel parameter divider=N. Hence, such kernels support a lower timer frequency without recompilation. We suggest to add the kernel parameter divider=10 to select a guest kernel timer frequency of 100Hz.

Процессоры AMD Barcelona

Большинство Linux гостевых систем не будут работать на AMD Phenoms или Barcelona-level Opterons, что связано с ошибкой в ядре Linux. Enable the I/O-APIC to work around the problem (see the section called “System settings”).

Версии ядра Linux 2.6 с ошибками

The following bugs in Linux kernels prevent them from executing correctly in VirtualBox, causing VM boot crashes:

  • The Linux kernel version 2.6.18 (and some 2.6.17 versions) introduced a race condition that can cause boot crashes in VirtualBox. Please use a kernel version 2.6.19 or later.

  • With hardware virtualization and the I/O APIC enabled, kernels before 2.6.24-rc6 may panic on boot with the following message:

    Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot with
    apic=debug and send a report.  Then try booting with the 'noapic' option

    If you see this message, either disable hardware virtualization or the I/O APIC (see the section called “System settings”), or upgrade the guest to a newer kernel.[45]

Shared clipboard, auto-resizing and seamless desktop in X11 guests

Guest desktop services in guests running the X11 window system (Solaris, Linux and others) are provided by a guest service called VBoxClient, which runs under the ID of the user who started the desktop session and is automatically started using the following command lines

VBoxClient --clipboard
VBoxClient --display
VBoxClient --seamless

when your X11 user session is started if you are using a common desktop environment (Gnome, KDE and others). If a particular desktop service is not working correctly, it is worth checking whether the process which should provide it is running.

The VBoxClient processes create files in the user's home directory with names of the form .vboxclient-*.pid when they are running in order to prevent a given service from being started twice. It can happen due to misconfiguration that these files are created owned by root and not deleted when the services are stopped, which will prevent them from being started in future sessions. If the services cannot be started, you may wish to check whether these files still exist.

Windows хосты

Проблемы с процессом VBoxSVC

VirtualBox использует Microsoft Component Object Model (COM) для связей с внутренними и внешними процессами. Это позволяет VirtualBox разделять общие настройки между различными процессами виртуальных машин. All global status information and configuration is maintained by the process VBoxSVC.exe, which is an out-of-process COM server. При любом запуске процесса VirtualBox, происходит запрос к COM серверу и Windows автоматически его запускает. Заметьте, что он никогда не должен запускаться пользователем.

Когда последний процесс отсоединяется от COM сервера, он завершает свою работу через несколько секунд. Файлы настроек VirtualBox блокируются при работе COM сервера.

В некоторых случаях - например когда виртуальная машина некорректно завершается - COM сервер не получает уведомление об отключении клиента и остается активным еще долго активным (10 минут или больше) , заблокировав конфигурационные файлы. В других редких случаях в COM сервере могут возникать внутренние ошибки и другие процессы не могут обратиться к нему. In these situations, it is recommended to use the Windows task manager to kill the process VBoxSVC.exe.

Не происходит смена CD/DVD

В случае если вы подключаете физический привод CD/DVD с гостевой системе и она не получает уведомлений о смене носителя, то убедитесь что функция автозапуска Windows (media change notification (MCN)) не включена. Это можно проверить по значению ключа в реестре Windows:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdrom\Autorun

Некоторые приложения могут отключать этот ключ. Если значение установлено в 0, то измените на 1 и перезагрузите вашу систему. VirtualBox полагается на уведомления Windows о сменах носителей.

Медленное соединение при использовании клиента Microsoft RDP

При подключение к виртуальной машине через клиента Microsoft RDP (Remote Desktop Connection), возможно появление больших задержек ввода/вывода (при перемещение указателя мыши по меню наиболее очевидно выявляет это). This is because this RDP client collects input for a certain time before sending it to the RDP server.

Этот интервал может быть уменьшен настройкой ключа реестра Windows значением меньшем, чем значение по умолчанию равным 100. Ключ изначально не существует и при его создании должен быть указан тип DWORD. Единицей измерения значения является миллисекунда. Значение в районе 20 подходит для медленных каналов связи между клиентом и сервером. Значение около 4 может использоваться на гигабитном Ethernet канале Вообще значения ниже 10 позволяют достичь производительности, которая близка к производительности локальных устройств ввода/вывода хоста на котором запущена виртуальная машина.

В зависимости от условий для кого должен быть изменен параметр - для пользователя или для системы, изменяется ключи

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Min Send Interval

или

HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\Min Send Interval

.

Работа iSCSI initiator и target на одной системе

Возможно возникновение блокировки (Deadlocks) на хосте Windows при попытке получения доступа к iSCSI target хоста от iSCSI initiator на гостевой виртуальной машине (Microsoft iSCSI Initiator). Это вызвано недостатком реализации компонентой менеджера кеша Windows, который вызывает вялое реагирование хост системы в течении нескольких минут, с последующим сообщением об ошибке "Delayed Write Failed". Гостевая система блокируется в течении этого периода и может появляться сообщение об ошибке или происходить сбой в его работе.

Setting the environment variable VBOX_DISABLE_HOST_DISK_CACHE to 1 will enable a workaround for this problem until Microsoft addresses the issue. Например, откройте окно командной строки и запустите VirtualBox следующим образом:

set VBOX_DISABLE_HOST_DISK_CACHE=1
VirtualBox

Это приведет к уменьшению производительности дисковой подсистемы гостя(особенно операций записи), но это не повлияет на производительность других приложений работающих на хосте.

Bridged networking adapters missing

If no bridged adapters show up in the "Networking" section of the VM settings, this typically means that the bridged networking driver was not installed properly on your host. This could be due to the following reasons:

  • The maximum allowed filter count was reached on the host. In this case, the MSI log would mention the 0x8004a029 error code returned on NetFlt network component install:

    VBoxNetCfgWinInstallComponent: Install failed, hr (0x8004a029)

    You can try to increase the maximum filter count in the Windows registry at the following key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\MaxNumFilters

    The maximum number allowed is 14. After a reboot, try to re-install VirtualBox.

  • The INF cache is corrupt. In this case, the install log (%windir%\inf\setupapi.log on XP or %windir%\inf\setupapi.dev.log on Vista or later) would typically mention the failure to find a suitable driver package for either the sun_VBoxNetFlt or sun_VBoxNetFltmp components. The solution then is to uninstall VirtualBox, remove the INF cache (%windir%\inf\INFCACHE.1), reboot and try to re-install VirtualBox

Host-only networking adapters cannot be created

If host-only adapter cannot be created (either via the Manager or VBoxManage), then the INF cache is probably corrupt. In this case, the install log (%windir%\inf\setupapi.log on XP or %windir%\inf\setupapi.dev.log on Vista or later) would typically mention the failure to find a suitable driver package for the sun_VBoxNetAdp component. Again, as with the bridged networking problem described above, the solution is to uninstall VirtualBox, remove the INF cache (%windir%\inf\INFCACHE.1), reboot and try to re-install VirtualBox.

Хост системы Linux

Модуль ядра не загружается

If the VirtualBox kernel module (vboxdrv) refuses to load, i.e. you get an "Error inserting vboxdrv: Invalid argument", check (as root) the output of the dmesg command to find out why the load failed. Most probably the kernel disagrees with the version of the gcc used to compile the module. Убедитесь, что вы используете тот же самый компилятор, что использовался для сборки ядра.

CD/DVD устройство хоста не доступно

If you have configured a virtual machine to use the host's CD/DVD drive, but this does not appear to work, make sure that the current user has permission to access the corresponding Linux device file (/dev/hdc or /dev/scd0 or /dev/cdrom or similar). On most distributions, the user must be added to a corresponding group (usually called cdrom or cdrw).

CD/DVD устройство хоста не доступно (старые дистрибутивы)

В старых дистрибутивах Linux, если ваше устройство CD/DVD имеет другое наименование, VirtualBox не в состоянии обнаружить его. На старых хостах Linux, VirtualBox выполняет следующие шаги при поиске устройств CD/DVD:

  1. VirtualBox examines if the environment variable VBOX_CDROM is defined (see below). Если она существует, VirtualBox пропускает все следующие проверки.

  2. VirtualBox tests if /dev/cdrom works.

  3. In addition, VirtualBox checks if any CD/DVD drives are currently mounted by checking /etc/mtab.

  4. In addition, VirtualBox checks if any of the entries in /etc/fstab point to CD/DVD devices.

Другими словами, вы можете попытаться прописать в VBOX_CDROM все ваши устройства CD/DVD, разделенных символом двоеточия, например:

export VBOX_CDROM='/dev/cdrom0:/dev/cdrom1'

В современных дистрибутивах Linux, VirtualBox использует hardware abstraction layer (hal) для определения устройств CD и DVD.

Привод гибких дисков хоста не доступен

The previous instructions (for CD and DVD drives) apply accordingly to floppy disks, except that on older distributions VirtualBox tests for /dev/fd* devices by default, and this can be overridden with the VBOX_FLOPPY environment variable.

Необычные сообщения об ошибках для гостевого IDE при записи CD/DVD

Если включена функция поддержки записи CD/DVD с некорректными настройками в гостевой или хост системы, то возможно что любая попытка записи CD/DVD заканчивается ошибкой и приводит к появлению сообщений об ошибках в журнале ядра (для Linux гостей) или ошибок выполнения программ (для Windows гостей). VirtualBox обычно выполняет проверку конфигураций на ошибки при запуске виртуальных машин (в данном случае выводится сообщение об ошибке если устройство CD/DVD не является пишущим), но не может обнаружить все некорректные конфигурации. Ниже перечислены правила которые, используются при работе с устройствами.

Особое внимание следует обратить на работоспособность устройств. The configured host CD/DVD device file name (in most cases /dev/cdrom) must point to the device that allows writing to the CD/DVD unit. For CD/DVD writer units connected to a SCSI controller or to a IDE controller that interfaces to the Linux SCSI subsystem (common for some SATA controllers), this must refer to the SCSI device node (e.g. /dev/scd0). Even for IDE CD/DVD writer units this must refer to the appropriate SCSI CD-ROM device node (e.g. /dev/scd0) if the ide-scsi kernel module is loaded. Этот модуль требуется для поддержки пишущих CD/DVD для всех ядер Linux 2.4 и некоторых ранних 2.6. Многие дистрибутивы Linux загружают этот модуль, когда обнаруживают пишущий привод CD/DVD в системе, даже если ядро поддерживает CD/DVD без него. VirtualBox supports the use of IDE device files (e.g. /dev/hdc), provided the kernel supports this and the ide-scsi module is not loaded.

Подобные правила (except that within the guest the CD/DVD writer is always an IDE device) применяются к гостевой конфигурации. Поскольку эта настройка очень распространена, то вероятно что настройки по умолчанию будут работать как необходимо.

Проблемы с VBoxSVC IPC

В Linux, VirtualBox использует особую версию Mozilla XPCOM (кроссплатформенную объектную модель) для связи с внутренними и внешними процессами (IPC). The process VBoxSVC serves as a communication hub between different VirtualBox processes and maintains the global configuration, i.e. the XML database. When starting a VirtualBox component, the processes VBoxSVC and VirtualBoxXPCOMIPCD are started automatically. Они доступны только для пользователя запустившего их. VBoxSVC owns the VirtualBox configuration database which normally resides in ~/.VirtualBox. Пока этот процесс выполняется, файлы конфигурации блокируются. Communication between the various VirtualBox components and VBoxSVC is performed through a local domain socket residing in /tmp/.vbox-<username>-ipc. In case there are communication problems (i.e. a VirtualBox application cannot communicate with VBoxSVC), terminate the daemons and remove the local domain socket directory.

Проблемы с USB

If USB is not working on your Linux host, make sure that the current user is a member of the vboxusers group. On older hosts, you need to make sure that the user has permission to access the USB filesystem (usbfs), which VirtualBox relies on to retrieve valid information about your host's USB devices. Остальная часть этого раздела относится только к старым системам.

As usbfs is a virtual filesystem, a chmod on /proc/bus/usb has no effect. The permissions for usbfs can therefore only be changed by editing the /etc/fstab file.

For example, most Linux distributions have a user group called usb or similar, of which the current user must be a member. Чтобы дать всем пользователем этой группы доступ к usbfs, убедитесь что в файле присутствует строка:

# 85 is the USB group
none     /proc/bus/usb     usbfs      devgid=85,devmode=664    0    0

Replace 85 with the group ID that matches your system (search /etc/group for "usb" or similar). Иначе, если вы не беспокоитесь о проблемах безопасности , дайте всем пользователям доступ к USB изменив "664" на "666".

The various distributions are very creative from which script the usbfs filesystem is mounted. Sometimes the command is hidden in unexpected places. For SuSE 10.0 the mount command is part of the udev configuration file /etc/udev/rules.d/50-udev.rules. As this distribution has no user group called usb, you may e.g. use the vboxusers group which was created by the VirtualBox installer. Since group numbers are allocated dynamically, the following example uses 85 as a placeholder. Modify the line containing (a linebreak has been inserted to improve readability)

DEVPATH="/module/usbcore", ACTION=="add",
    RUN+="/bin/mount -t usbfs usbfs /proc/bus/usb"

and add the necessary options (make sure that everything is in a single line):

DEVPATH="/module/usbcore", ACTION=="add",
    RUN+="/bin/mount -t usbfs usbfs /proc/bus/usb -o devgid=85,devmode=664"

Debian Etch has the mount command in /etc/init.d/mountkernfs.sh. Since that distribution has no group usb, it is also the easiest solution to allow all members of the group vboxusers to access the USB subsystem. Modify the line

domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev

so that it contains

domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=85,devmode=664

As usual, replace the 85 with the actual group number which should get access to USB devices.

Other distributions do similar operations in scripts stored in the /etc/init.d directory.

PAX/grsec kernels

Linux kernels including the grsec patch (see http://www.grsecurity.net/) and derivates have to disable PAX_MPROTECT for the VBox binaries to be able to start a VM. The reason is that VBox has to create executable code on anonymous memory.

Linux kernel vmalloc pool exhausted

When running a large number of VMs with a lot of RAM on a Linux system (say 20 VMs with 1GB of RAM each), additional VMs might fail to start with a kernel error saying that the vmalloc pool is exhausted and should be extended. The error message also tells you to specify vmalloc=256MB in your kernel parameter list. If adding this parameter to your GRUB or LILO configuration makes the kernel fail to boot (with a weird error message such as "failed to mount the root partition"), then you have probably run into a memory conflict of your kernel and initial RAM disk. This can be solved by adding the following parameter to your GRUB configuration:

uppermem 524288

Solaris hosts

Cannot start VM, not enough contiguous memory

The ZFS file system is known to use all available RAM as cache if the default system settings are not changed. This may lead to a heavy fragmentation of the host memory preventing VirtualBox VMs from being started. We recommend to limit the ZFS cache by adding a line

set zfs:zfs_arc_max = xxxx

to /etc/system where xxxx bytes is the amount of memory usable for the ZFS cache.

VM aborts with out of memory errors on Solaris 10 hosts

32-bit Solaris 10 hosts (bug 1225025) require swap space equal to, or greater than the host's physical memory size. For example, 8 GB physical memory would require at least 8 GB swap. This can be configured during a Solaris 10 install by choosing a 'custom install' and changing the default partitions.

Замечание

This restriction applies only to 32-bit Solaris hosts, 64-bit hosts are not affected!

For existing Solaris 10 installs, an additional swap image needs to be mounted and used as swap. Hence if you have 1 GB swap and 8 GB of physical memory, you require to add 7 GB more swap. This can be done as follows:

For ZFS (as root user):

zfs create -V 8gb /_<ZFS volume>_/swap
swap -a /dev/zvol/dsk/_<ZFS volume>_/swap

To mount if after reboot, add the following line to /etc/vfstab:

/dev/zvol/dsk/_<ZFS volume>_/swap - - swap - no -

Alternatively, you could grow the existing swap using:

zfs set volsize=8G rpool/swap

And reboot the system for the changes to take effect.

For UFS (as root user):

mkfile 7g /path/to/swapfile.img
swap -a /path/to/swapfile.img

To mount it after reboot, add the following line to /etc/vfstab:

/path/to/swap.img - - swap - no -


[42] http://www.virtualbox.org/wiki/Core_dump.

[43] http://www.virtualbox.org/wiki/Network_tips.

[44] See http://support.microsoft.com/kb/955076.

[45] See http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg30813.html for details about the kernel fix.

home start up prev next
Сайт создан в системе uCoz