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:
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 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 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:
3.22.61.30