Fedora 12: Constantine

Thursday, September 4, 2008

Virtual Machines

When we describe VirtualBox as a "virtualization" product, we refer to "full virtualization", that is, the particular kind of virtualization that allows an unmodified operating system with all of its installed software to run in a special environment, on top of your existing operating system. This environment, called a "virtual machine", is created by the virtualization software by intercepting access to certain hardware components and certain features. The physical computer is then usually called the "host", while the virtual machine is often called a "guest". Most of the guest code runs unmodified, directly on the host computer, and the guest operating system "thinks" it's running on real machine.

This approach, often called "native virtualization", is different from mere emulation. With that approach, as performed by programs such as BOCHS, guest code is not allowed to run directly on the host. Instead, every single machine instruction is translated ("emulated"). While emulators theoretically allow running code written for one type of hardware on completely different hardware (say, running 64-bit code on 32-bit hardware), they are typically quite slow. Virtualizers such as VirtualBox, on the other hand, can achieve near-native performance for the guest code, but can only run guest code that was written for the same target hardware (such as 32-bit Linux on a 32-bit Windows host).

VirtualBox is also different from so-called "paravirtualization" solutions such as Xen, which require that the guest operating system be modified.

There are several scenarios that make virtualization attractive:

  • Operating system support. With a virtualizer such as VirtualBox, one can run software written for one operating system on another (say, Windows software on Linux) without having to reboot.
  • Infrastructure consolidation. Since the full performance of today's computers is rarely needed full-time, instead of running many such physical computers, one can "pack" many virtual machines onto a few powerful hosts and balance the loads between them. This can save a lot of hardware costs: e.g. by consolidating many servers into a few. VirtualBox is unique on the virtualization market in that it also allows for consolidating clients onto just a few RDP servers, with full client USB support, while "thin clients" only need to display RDP data.
  • Testing and disaster recovery. Especially with the use of snapshots?, one can mess with a computing environment by running it as a virtual machine. If something goes wrong, one can easily switch back to a previous snapshot and avoid the need of frequent backups and restores.

For a more detailed introduction, see the Wikipedia article about virtual machines.

No comments: