Why should I care about virtualization?
OK, so virtualization is the latest buzzword. I don't see why I would care, since computers are getting cheaper every day...
This is a fair and often heard question.
On the other side, you'll find virtualization fanatics, who run 4 virtual machines on their desktop and feel the same about virtualization as they feel about the color monitor or the sound card years ago - they can never go back to computing without it, but they can't quite explain why somebody else should care about virtualization.
This article aims to describe why some people want virtualization, and why some other people absolutely need virtualization.
The most common use for virtualization is consolidation: combining multiple workloads on one physical computer. This allows people to run a lot of virtual machines on fewer physical computers.
But computers are cheap...
Well, computers may be cheap, but if you have enough of them the cost sure adds up.
A typical (full) data center
Lets take a look at a typical data center today. The data center is full, there is literally no more space to add extra computers and the power and air conditioning are near their limits too. However, since dual core CPUs and 1GB RAM sticks are so cheap, the vast majority of the servers only get used to 10-20% of their capacity.
In short, the data center is full, but the servers are empty.
If the IT department wants to run more server workloads, will they:
- Build a new data center, or
- use the capacity inside the existing servers?
As long as there is free space available inside a data center, adding a few computers is the easy way to go. However, once the data center is full, IT management will have a hard time convincing the higher-ups that an entire new data center should be built.
To make matters worse, there might not even be enough electricity available nearby. It's not like you can just plug a 5MW data center into the power grid, and you do not want to have to train an entire new staff in another state!
Virtualization can offer a relatively easy way out. When the datacenter fills up, you can start actually filling up the servers.
Legacy system support and hardware isolation
With dual core CPUs available cheaply, quad core CPUs hitting the market and octo-core CPUs just around the corner, any workload has enough CPU power to run fast.
Except for that critical database application, because it runs on an older operating system, that will not boot on quad core CPUs. Doh! Look around in any data center, and you'll find a critical application that's tied down to old hardware because it's running on a legacy operating system.
Wouldn't it be nice if you could magically run that old operating system on new hardware?
With full virtualization (vmware binary rewriting, or Xen or KVM with Intel VT or AMD-V capable CPUs) you can. It works because the virtualization layer emulates simple hardware, so your octo-core CPU will look like an older 8-CPU system, only with faster CPUs. Multi-core, ACPI device discovery and interrupt routing, support for 10GigE or SATA are no longer a problem.
Yes, virtualization will slow down the system from its maximum speed. In some cases quite a bit. However, because the virtualization software emulates simple hardware, it may help you run legacy OSes on way faster hardware than anything that OS could boot on natively. It may help with the power bill, too...
Whether you are a student doing software development, or the CIO of a major bank, you will have a shortage of test hardware.
Virtualization allows you to create low priority virtual machines for testing. Test out that new Fedora Rawhide or Debian Unstable on a virtual machine, before it breaks your desktop. Give your developers a bunch of virtual test machines each, instead of having them wait for each other to finish using the test systems.
With virtual machine migration - like vmware vmotion, or xen live migration - you can move a virtual machine from one system to another while it is running. Believe it or not, this is useful for more things than impressing your friends...
There are a number of situations in which you will want to migrate virtual machines to other physical machines:
- Hardware failure. Say that a CPU fan breaks down, the CPU throttles itself and runs at a glacial speed. You move the virtual machines onto healthy systems and fix the hardware, without application downtime.
- Load balancing. The virtual web server of one of your customers just got slashdotted. Move some of the other virtual machines away, so there is enough capacity to handle the load.
- Flexible maintenance window. You would like to upgrade those CPUs during the daytime, but you cannot shut down the applications used by everybody else in the office. With live migration you can move the virtual machines off each physical system before you perform your surgery.