How-To Geek

What Is a Virtual Machine Hypervisor?

Hypervisors are what make virtual machines possible, and they aren’t just for servers anymore. You probably use one every day and don’t even know it. If you don’t use one now, you will in the near future.

A hypervisor is software that exists outside of a guest operating system to intercept the commands sent to the computer hardware. The term “hypervisor” comes from the different levels of an operating systems kernel; it performs actions with more authority than the “supervisor” level, hence, hyper-visor.

Image via striatic on Flickr

Hypervisor Basics

A hypervisor is also known as a Virtual Machine Manager (VMM) and its sole purpose is to allow multiple “machines” to share a single hardware platform. Operating systems are designed so that they have a one-to-one relationship with the hardware they are running on, but with multi-core, multi-threaded processors and ludicrous amounts of RAM, running multiple at once is a breeze.

The hypervisor separates the operating system (OS) from the hardware by taking the responsibility of allowing each running OS time with the underlying hardware. It acts as a traffic cop to allow time to use the CPU, memory, GPU, and other hardware. Each operating system controlled by the hypervisor is called a guest OS, and the hypervisor’s operating system, if any, is called the host OS. Because it stands between the guest OS and hardware you can have as many different guest OSs as your system can handle; you can even have different types (e.g. Windows, OS X, Linux).

Separating hardware and software turns out to be good for portability as well. Because the hypervisor acts as the go-between, it is much easier to move from computer to computer without needing to install new drivers or update your guest OS. You may have noticed this if you took your Virtualbox VMs and put them on a different computer. To the guest OS, there is no noticeable change ever though the host OS and hardware could be completely different.

Another major benefit of virtualizing an OS is security. If you want to test software that may be harmful to your computer it is recommended to test it in a virtual machine rather than your host OS. If the guest OS becomes infected and riddled with viruses, it will not affect the files on the host OS, unless shared folders or a network bridge connect the two. The two operating systems exist completely separated from each other and have no knowledge of each others existence, which makes for safe computing.

Some popular hypervisors are VMware ESXi, Xen, Microsoft Hyper-V, VMware Workstation, Oracle Virtualbox, and Microsoft VirtualPC. All of these allow a user to virtualize one or more operating systems on a single piece of hardware.

Different Hypervisor Types

Hypervisors can be broken up in two major types:

  • Type 1, a.k.a. bare metal, is a hypervisor that installs directly onto a computer. There is no host OS and the hypervisor has direct access to all hardware and features. The main reasons to install a type 1 hypervisor is to run multiple operating systems on the same computer without the overhead of a host OS or to take advantage of the portability and hardware abstraction. Bare metal is most often used for servers because of their security and portability to move from hardware to hardware in case of a crash. Good examples of type 1 hypervisors are VMware ESXi, Citrix XenServer, and Microsoft Hyper-V.
  • Type 2, a.k.a. hosted, is what most people are probably familiar with when it comes to virtualizing operating systems. Hosted hypervisors require a host OS and are often treated as installed software inside the host. Type 2 can still run multiple operating systems at a time, but it doesn’t have direct access to the hardware and therefore has more overhead when running a guest. This means that the guest OS will not run at its full potential and if your host crashes, you won’t have access to your guests either. Type 2 hypervisors are the ideal way to go when you need to test multiple operating systems within Windows, OS X, or Linux. Good examples are VMWare Workstation, VMware Parallels, Oracle Virtualbox, and Microsoft VirtualPC.

Hypervisors of the Future

Most hypervisors today are either used for large scale server deployments or for end users to run legacy apps or try out a different operating system. There has already been some change to this thinking however with current versions of Android and rumors of Windows 8.

Android uses a Linux kernel for interaction with hardware and background services, and then uses a virtual machine called Dalvik to run software that the user interacts with. Despite not allowing a user to run multiple operating systems at once, Android is very similar to a type 1 hypervisor. The underlying Linux host is completely transparent to the end user, unless you root your phone and want to interact with it.

Windows 8 is rumored to run entirely as a guest OS on top of Microsoft’s Hyper-V. Hyper-V will take the responsibility of managing your hardware and doing background tasks such as backups and file system checks. Similar to Android, this would allow you to have better portability, flexibility, and security within your OS. Not to mention, it would make your Windows 8 installation completely portable so you can take it with you from computer to computer.

Web servers will continue to take advantage of hypervisors to maximize their hardware utilization and keep costs down. If you have shared web hosting through a popular web host you most likely are on a type 1 hypervisor already and didn’t know it. With good server hardware, bare metal hypervisors can push the boundaries from typically just having one operating system installed, to literally thousands available. This not only saves money when it comes to buying hardware, but also cooling and power are reduced to a small fraction what it used to be to run the same amount of machines.

Justin Garrison is a Linux and HTPC enthusiast who loves to try new projects. He isn't scared of bricking a cell phone in the name of freedom.

  • Published 07/6/11

Comments (11)

  1. Ivan Lapis

    Interesting background about Android and Windows 8… since I rooted my android, I’ve learned some about android, but what I still didn’t know until know was that Dalvik thing…. Regarding Windows 8… I’m guessing the reason W8 will run that way is to allow a full user profile be uploaded to the cloud and be downloaded so that a user can simply “login and out” from one computer to another and have almost the same user experience every time… (as long as the programs he needs is installed that is, but I’m also guessing that’s also heading it’s way to the clouds, too?)

  2. Dave

    You might want to clarify the Hyper-V point.

    Hyper-V comes with windows server 2008 and would not be classed as a bare metal hypervisor as you have to install windows.

    “Hyper-V Server” is a bare metal hypervisor.


  3. Justin Garrison

    @Dave When the Hyper-V role is enabled on a standard Windows Sever 2008, the Hyper-V role actually becomes the main OS and server 2008 becomes a VM. It just so happens that the VM auto starts and controls Hyper-V. There will be no noticeable difference between the role enabled or not.
    Hyper-V Server is the base hypervisor without a guest VM installed.

  4. Brian Yurick

    Nice job keeping is sweet and simple. I remember many years ago playing with VMware’s first gen server (free) software and thinking “This is pretty cool!” I talk to anyone I can about virtualization when I go to business networking groups. It’s great to see the look on people’s faces when you tell them you can run dozens of separate servers on one single piece of hardware, and they’d never know the difference until they see their power bill :)

  5. scobotmosh

    Great article!

  6. Steve

    Overall the article is great. Thank you for sharing it!

    I will argue only one point. Not all hypervisors are used so multiple operating systems can be ran… Take the Xbox360 for example. The bare-metal hypervisor that is used on that hardware has one primary function: To protect that hardware from being hacked. While the Xbox360 is somewhat compromised, the HV on that unit has protected the underlying OS from being penetrated even more.

    Keep up the great work!

  7. Charlie

    @Justin Do you have any links/references regarding your comment? I’ve used Hyper-V a lot but have never heard that before, sounds interesting.

  8. Justin Garrison

    @Charlie Here is an architecture overview of Hyper-V. The PDF pretty much breaks my computer but the info you seek is in the top left corner.

  9. Jason

    Wow, I learned a lot from this article. Would like to see more articles like this.

  10. Atul Khachane

    Nice article

  11. Alendra

    @Justin Thanks for the link, gives a lot of information concerning Hyper-V !

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!