Oracle VM VirtualBox architecture

VirtualBox is modular and flexible by design. The hypervisor is implemented as a Ring 0 kernel service. The kernel contains a device driver called vboxsrv. This device driver takes care of activities or tasks such as allocating physical memory for the guest virtual machine, loading hypervisor modules for functions such as saving and restoring the guest process context when a host interruption occurs, turning control over to the guest OS to begin execution, and deciding when the VT-x or AMD-V events need to be handled.

The guest itself manages its OS scheduling during its execution. The guest runs as a single process and only when scheduled by a host on the host system. Apart from this, there are additional device drivers present when the guest allows the OS to access resources such as disks, network controllers, and other devices.

The following diagram depicts high-level VirtualBox architecture:

Oracle VM VirtualBox architecture

Apart from the kernel modules, there are other processes running on the host that support the running guest. When a guest VM is started from the VirtualBox GUI, the VBoxSVC process starts automatically in the background.

VBoxSVC

VBoxSVC is the first client process that starts automatically and keeps running in the background; it is responsible for tasks such as maintaining the guest VM state and bookkeeping. With the help of COM/XPCOM, it provides communication between different VirtualBox components.

VirtualBox

VirtualBox is a GUI process based on a cross-platform QT library. When a guest VM starts, this process is started automatically. It can start with a startvm option or without any option. When this process starts with no --startvm option, it plays the role of the VirtualBox manager, displaying the VMs and their settings and communicating the settings and the state changes to the VBoxSVC process. When it starts with the startvm option, it loads the actual hypervisor with the help of the VMM library and then runs the VM and provides the input and output for the guest VM.

VirtualBox also runs many internal processes and separate components. The following are a few important components:

  • IPRT: This is a portable library, this component is invoked whenever VirtualBox accesses host operating features with the help of this library for cross-platform portability.
  • VMM: This is an integral part of the hypervisor.
  • REM (recompiled execution monitor): This provides software emulation of CPU instructions.
  • EM (execution manager): This manages and controls the execution of guest VM code.
  • HWACCM (hardware acceleration manager): This provides support for VT-x and AMD-V.
  • PGM (page manager): The guest VM paging activity is taken care of by this component.
  • TM (time manager): This component handles timers and all the aspects of time inside guests.
  • CFGM (configuration manager): This component provides all the settings related to the guest VM and all emulated devices stored in a tree structure.
  • SSM (saved state manager): This component saves and loads the VM state.
  • VirtualBox: This component is responsible for emulating many devices to provide the hardware environment that various guests need.
  • Main: This is the only public API that VirtualBox provides and is responsible for tying all the preceding components together. This API is used by all the client processes because client processes cannot access the hypervisor directly.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.78.137