What came first, the VM or the host?

In my recent post asking the question of, “What is a virtual machine?” a keen reader pointed out that there is an implied inventory of hardware in place beforehand.

Thanks, Will, that is the case; so let me expand on that a bit. When it comes to the virtualization platform, the VMs have to run somewhere. So, I’ll use the chicken and egg story as I’m sure we’ve all heard it.

 

So, a VM needs to run somewhere. Let’s follow the example on the previous post of the SMP server with three virtual machines on it. I’ve once again stolen this IBM graphic, which shows three virtual machines running on a server:

image The SMP server is overlooked in my previous post. Basically, the SMP server (in the case of ESXi that I highlighted before) has enough resources to run all of the virtual machines in the diagram. Now, VMware ESXi is a little special in the fact that there can be some over-subscription of resources.

Over subscription of resources

Let’s talk about that for a moment. Pretty much each of the Core Four resources can be subject to some over-subscription. Let’s explain how this works:

  • CPU – CPU resources can be over-subscribed by taking all resources, and providing them to all virtual machines. So, let’s suppose the SMP server has 2 physical CPUs that are rated at 3.00 GigaHertz (GHz). Let’s ignore cores or hyperthreading for this example, but there are 2 processors providing 2 x 3.00 GHz. This is not 6.00 GHz, but 2 times 3.00 GHz; this is an important distinction.

    Each virtual machine will definitely not need all of the processor resources all the time, so imagine a time slicing or scheduling mechanism that is implemented by the hypervisor. This allows each virtual machine to get what it needs, CPU wise, when it is needed and any idle capacity is available for other virtual machines.

  • RAM – RAM is usually not oversubscribed, the only exception is VMware ESXi and ESX. Hyper-V does not ‘over commit’ memory, but Oracle VirtualBox can do it somewhat. But, for all intensive purposes, if the SMP server has 16 GB of memory, it can provision memory to each virtual machine in smaller amounts. So in the figure above, let’s say that each of the three VMs are provisioned with 2 GB of RAM, and are using it all uniquely, it is costing the SMP server 6 GB of RAM from the host inventory. That leaves 10 GB available and for the hypervisor itself.

    This is a simple example, and I’ll explain memory overcommit  specifically done by VMware in a subsequent post.

  • Disk – There generally is not an over subscription mechanism for disk resources. The only exception is a term called deduplication on primary storage. I’m leaving shared storage and disk technologies out for now, but generally speaking; if the three VMs in the figure need 20 GB of disk space they will consume that from the disk resources provisioned to the SMP server.
  • Network – Network resources can be over subscribed. Simply put, each network interface is capable of allowing multiple virtual machines to get onto one or more networks from that single interface. Further, the concept of a virtual switch can come into play to provide additional separation and access patterns (more to come on that als0).

The virtual machines all access the Core Four resources in a pooled or aggregated fashion, whether or not any over-subscription mechanisms exist.

No free lunch

To Will’s initial comment, there has to be a physical inventory to work with before the benefits of virtualization come into play. What this means is that the virtualization host (ESXi, for example) must have some inventory of resources in place to start with before virtual machines can be added to use these resources in a virtual manner.

Does that make sense? Share your comments below!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: