Types of Virtualization

While researching platforms for hosting services I read a good deal about virtualization. For those of us who are mostly unfamiliar with the topic, virtualization, in short, is the abstraction of computing resources (which lends to the “cloud computing” concept). In more general use, it usually conjures up the idea that you can run multiple “virtual computers” on top of a smaller number of physical computers. For example, it is through virtualization that Ruth hosts Sinai and a few personal development sandboxes.

There are maybe a dozen types of virtualization, but the two of import to this discussion are “‘hardware enabled” and “operating system-level”.

We already use hardware-enabled virtualization in the form of VMWare. VMWare creates, through software, an underbelly of virtual computer hardware upon which a wide variety of operating systems can simultaneously exist. It can be a great advantage to have multiple operating system flavors running over multiple (virtual) hardware configurations on top of a single physical host computer.

However, the host must have the resources (with memory being the biggest concern) to support complete virtual hardware and complete copies of operating systems for each virtual machine. Also, in VMWare (and it seems to be the norm for hardware-enabled and similar virtualization types), the virtual machine’s filesystem is written as a virtual disk, appearing as a single file on the host’s filesystem. So the host and the virtual operating systems do not share a filesystem. This is not altogether undesirable, though it makes administration a bit more difficult.

I like to call operating system-level virtualization “user-space virtualization”, because well, that’s what it is. Instead of the virtualization of a complete physical computer, OS-level virtualization creates a user-space container.

Imagine running a web browser on a regular Linux computer. Completely quarantined from core of the operating system (kernel space), you have your own process table and pages of memory (user space). This “space” is not so much defined by the limits on resources, but by how your use of those resources are quarantined from other users’ (or the kernel’s) use of their own resources. Though partitioned, all process still share the same operating system memory table, the same process table and the same file system. Your browser might eat a lot of memory, but it will never start overwriting the memory being used by your MySQL process. This is the sort of space that operating system-level virtualization sits. For the most part it looks and feels like a complete operating system. But the downsides should be obvious: the host and virtualizations must share the same Linux kernel and the same hardware. (I.e., they’ll all be Linux but they can potentially be different Linux distributions.) One of the most popular and resource-conservative operating system-level virtualization softwares is OpenVZ.

Want to learn more? Check out Wikipedia’s virtualization main page and OpenVZ’s slightly biased take on the topic

Leave a Reply