image

Introduction

I was talking with a local customer the other day that was inquiring about the differences between Microsoft virtualization (Hyper-V) and VMware virtualization solutions.  This customer was hung up on putting the two vendors into a cage match and making them go at each other to see who won.  I used to work in the end user IT environment, and know people that think this is a smart approach.  Competition is great for the end user environment because it drives innovation and keeps costs in check.   But let’s take a look at the technology rather than the cage and understand what’s under the hood.  Just to set the record straight this is not a slam Microsoft Hyper-V blog post.  I don’t get wrapped up into the battle of the hypervisor conversations, if you want to go with a competitive solution have at it.  We will be talking down the road again eventually. 

This individual understood the basics of virtualization but wasn’t that clear on how the hypervisor worked in conjunction with the hardware.  I point my customers to quality blog sites to answer questions or if they need instructions on how to configure or stand something up.  I figured I would do a write-up to help shed some light on how virtual machines work, how they are handled by the hypervisor and how they are lean and mean.

Hypervisor types

First let’s set the record straight by saying that VMware, Microsoft or Citrix did not come up with the concept of virtualization.  The idea of abstraction has been around for over 50 years, and was first mastered by the smart people over at IBM on some old iron in the late 60’s.  VMware did launch the first x86 based virtualization software in May of 1999, which since has changed the open systems world greatly.

Currently there are two types of hypervisors:

Type 1 – A native or bare metal hypervisors run directly on the host’s hardware to manage and monitor the guest operating systems.  Because it has direct access to the hardware resources and doesn’t go through an operating system, it runs more efficiently than a hosted model or Type 2.

Type 2 – A hosted hypervisor that runs within a conventional operating system.  This hypervisor does not have direct access to the hardware thus traditionally has more overhead that a Type 1 hypervisor.

Examples of Type 1 hypervisors would include, VMware ESX, VMware ESXi, Microsoft Hyper-V, Citrix Xen Server.  Examples of a Type 2 hypervisor would be, VMware workstation, VMware server, Microsoft Virtual Server.  The Type 1 hypervisors run more efficiently as they are designed specifically to handle virtual workloads.  They also don’t have a host operating system to have to share, schedule and contend with resources for.  The

The VMware Architecture

Two of the most important components of the VMware Type 1 hypervisor are the VMkernel and the VMM.  The VMkernel is the actual VMware ESX hypervisor product that we all know and love.  It is responsible for interacting with the physical server hardware that you install vSphere onto.  Sounds pretty simple in concept right?  It’s not.  I disagree with people that think the hypervisor is a commodity technology because there are some very special things that VMware does differently.  VMware takes on an approach unlike other virtualization vendors in the marketplace implements a hardware compatibility list (HCL)  to ensure you will be running a supported configuration.  That means when you install the product, VMware has already QA’d the configuration and is a eliminating the guess work of a supported stable environment. 

The VMkernel doesn’t actually run the virtual machines, it invokes yet another layer of protection called the virtual machine monitor.  This “Thin candy shell” (Tommy Boy reference) is the special sauce that takes various communications from the VMkernel and translates them to the actual virtual machine, and visa versa.  I put together a diagram here to help illustrate where the thin candy shell resides in the virtualization space:

 

image

The VMM implements the virtualized CPU, memory, network and storage into the actual guest operating system that is hosted on the hypervisor or VMkernel.  It also provides each virtual machine with its own personalized custom build BIOS!  The VMM detects and understands the hardware type that the hypervisor is running on.  It examines the advanced CPU functionality and then adapts (monitor mode) to pass along those benefits to the guest. 

The VMM handles three different types of virtualization, software, hardware and paravirtualization.  Software virtualization we already discussed above.  Hardware virtualization is leveraging technologies from our x86 based server vendors such as Intel and AMD.  Intel offers advanced processor virtualization features such as Intel VT-x, while AMD offers their own solution called AMD-V.  The hardware virtualization helps offset the overhead of virtualization by offloading the binary translation (BT) to the hardware.  Paravirtualization is the concept of reducing virtualization overhead by having both the host and guest work in conjunction with each other.  A classic example of this approach is pvSCSI, if you want more detailed information check out my write up over here.

As with all great idea’s come trade off’s, the use of the VMM adds a layer of “overhead” to the virtual machine.  There is a translation that has to take place to create this isolated secured environment.  The goal of VMware is to lower this overhead to help drive efficiencies (CPU and memory) and help you consolidate more with less.  Here is a diagram that helps illustrate this concept (BTW I have heard 4.1 has taken this down to 1-3% overhead):

 image

Conclusion

Hopefully this helped shed some light on how VMware’s type 1 hypervisor works, and how it interacts with the virtual machines that is designed to support.  Remember that the VMkernel is responsible for working in conjunction with the hardware layer, and the VMM is responsible for translating that information to the virtual machine.  Overhead is a byproduct of this translation, but leveraging hardware and using VMware will help drive this overhead into complete transparency.

 

-Scott

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

  • Pingback: Tweets that mention Life as a VMware Virtual Machine | virtual insanity -- Topsy.com

  • http://twitter.com/BrandonJRiley B. Riley

    When you lay it out in graphical form like that diagram of versions, it truly is amazing how far ESX has come in such a short time.

  • http://www.virtualizetips.com/ BrianS

    Good write up Scott. Should make things clear for Mgmt and people new to virtualization.

  • Guest

    It's a very useful post for virtualization novices!
    I didn't know VMware was first to virtualize x86 architecture…

  • Jason Boche

    I'd challenge those overhead numbers for ESX2 and ESX3. They seem very high and don't match educational material & related certification exams IIRC.

    • scottdsauer

      Yea I actually agree, it seems a bit high but this came from the internal engineering group. The message I was trying to convey was the overhead is on the decline and will soon amount to nothing. Thanks for the challenge!

  • http://www.silverlottosystemscam.com silver

    Hi, I find it very helpful! Thanks