10 Technical background As opposed to other virtualization software, for many usage scenarios, VirtualBox does not require hardware virtualization features to be present. Through sophisticated techniques, VirtualBox virtualizes many guest operating systems entirely in software. This means that you can run virtual machines even on older processors which do not support hardware virtualization. Even though VirtualBox does not always require hardware virtualization, enabling it is required in the following scenarios: Certain rare guest operating systems like OS/2 make use of very esoteric processor instruc- tions that are not supported with our software virtualization. For virtual machines that are configured to contain such an operating system, hardware virtualization is enabled automatically. VirtualBox’s 64-bit guest support (added with version 2.0) and multiprocessing (SMP, added with version 3.0) both require hardware virtualization to be enabled. (This is not much of a limitation since the vast majority of today’s 64-bit and multicore CPUs ship with hardware virtualization anyway the exceptions to this rule are e.g. older Intel Celeron and AMD Opteron CPUs.) Warning: Do not run other hypervisors (open-source or commercial virtualization products) together with VirtualBox! While several hypervisors can normally be installed in parallel, do not attempt to run several virtual machines from competing hypervisors at the same time. VirtualBox cannot track what another hypervisor is currently at- tempting to do on the same host, and especially if several products attempt to use hardware virtualization features such as VT-x, this can crash the entire host. Also, within VirtualBox, you can mix software and hardware virtualization when running multiple VMs. In certain cases a small performance penalty will be unavoidable when mixing VT-x and software virtualization VMs. We recommend not mixing virtualization modes if maximum performance and low overhead are essential. This does not apply to AMD-V. 10.4 Details about software virtualization Implementing virtualization on x86 CPUs with no hardware virtualization support is an extraor- dinarily complex task because the CPU architecture was not designed to be virtualized. The problems can usually be solved, but at the cost of reduced performance. Thus, there is a con- stant clash between virtualization performance and accuracy. The x86 instruction set was originally designed in the 1970s and underwent significant changes with the addition of protected mode in the 1980s with the 286 CPU architecture and then again with the Intel 386 and its 32-bit architecture. Whereas the 386 did have limited vir- tualization support for real mode operation (V86 mode, as used by the “DOS Box” of Windows 3.x and OS/2 2.x), no support was provided for virtualizing the entire architecture. In theory, software virtualization is not overly complex. In addition to the four privilege levels (“rings”) provided by the hardware (of which typically only two are used: ring 0 for kernel mode and ring 3 for user mode), one needs to differentiate between “host context” and “guest context”. In “host context”, everything is as if no hypervisor was active. This might be the active mode if another application on your host has been scheduled CPU time in that case, there is a host ring 3 mode and a host ring 0 mode. The hypervisor is not involved. In “guest context”, however, a virtual machine is active. So long as the guest code is running in ring 3, this is not much of a problem since a hypervisor can set up the page tables properly 158
Previous Page Next Page