Back to Virtualization and Cloud Index
I got a comment on Facebook from someone saying that they were eager to hear more about virtualization, and specifically why they should care about VM images. Now, the comment came from one of my brothers, so it is hard to know whether he was being sarcastic or not...but it did make me think that a line or two on VM images themselves might be a good idea. Here’s my attempt at explaining a virtual machine.
So, consider your PC at home. Let's assume it is running MS Windows (the operating system). Underneath Windows there are physical things that Windows communicates with - the PC's processor, disk drives, video cards, etc. Above Windows are the applications that you work with - a browser, word processor etc.
In a virtualized environment, the pieces underneath Windows are not really hardware devices, they are specialized software processes pretending to be that same hardware. “Why would this be a good idea”, you ask? Well imagine if you wanted to have three instances of Windows running in the physical world. You'd need to purchase three physical boxes. However, in the virtual world, you could just have three instances of the virtualization environment running, albeit on a more powerful physical machine. Need another instance? No need to head off to Best Buy, just launch a new instance of the virtualization software.
These “virtual machines” fool the operating system into thinking that it is running on its own physical PC. The virtual machines behave just like physical ones. For example, you can turn each one of them on and off independently, you can install any operating system on each of them and you can install applications on the operating system for you to use.
So, hopefully you can see how we could have a single big server that has multiple virtual machines running on it. Each one of these virtual machines runs independently, in fact one could be running Windows XP, one running Windows 7 and one running Linux.
Cool trick for sure, but the question that I was asked was "why should I care?" The Microsoft and VMware marketing bods could list tons of reasons I'm sure but here are a few that I find most compelling...
Utilization efficiency
The best analogy that I've heard to describe why a virtualized environment is more efficient is to compare it to having an individual generator to power your house vs. plugging into the grid.
- If you have a generator powering your house, it is on and running most of the time but not actually supplying much power. Occasionally it maxes out when the AC, stove and sump pump all turn on at the same time. You have to size the generator to cope with that peak loading, even though 99% of the time it doesn't need to be that powerful. If you need more capacity then you'll have to buy an entire new generator.
- If you plug into the power grid instead, you are taking power “on demand” i.e. if you don't need anything you don't take anything but if you need a huge amount for a few minutes then the grid can provide it on demand. The grid is efficient because when you are not demanding any power, someone else probably is so the overall usage curve is relatively flat.
The same goes for running Physical vs. Virtual servers. If you have a physical machine, you have to size it for the peak demands on the system, even though at times it might be almost completely idle. If you buy a big server and run, say, 35 virtual machines on it then the chances are that you will always have some virtual systems demanding resources and some sitting idle. This means that instead of having your machine running at 20% capacity, it might run at 80% - much more efficient.
Efficiency - turbo boosting
Along the lines above, bear in mind that now your piddling little VM image is actually running on a very powerful server along with a lot of other images. Now imagine that you have a process that does 3D rendering of engineering drawings – a very CPU-intensive process. When you ask for your line drawing to be rendered to 3D it will be running on that mega server, not some measly little PC...instead of taking hours, it could take just a few minutes if the server happens to be fairly quiet. In some cases, processes will be scheduled to run at times when the server is likely to be quiet.
Transportability
If I wanted to send you an entire enterprise solution stack to run a PoC without virtualization, then I'd have to raise a PO, buy some hardware, install the software, configure the applications and then have FedEx ship them over to you. With virtualized systems, I can simply send you the images of the systems and you load them into your existing VM system and get them up and running.
Predictability
If I create a new VM image, install the OS and the applications and then do some configuration and load some sample data I can take a snapshot of that image at that point in time. Any time in the future I can start a new instance of that snapshot and it will be an exact copy of the original. This is useful in Q&A where I want to run tests on an environment repeatedly but need to remove any environmental interference from the results. It's great for PoCs, demos and for virtualizing end user desktops (a topic for another day).
Conclusion
Hopefully these all make sense. Whether you are interested in power/cost savings, flexibility, predictability, or just using the coolest fad then this should be of interest…
The simplest explanation of virtualisaton, which I use when I explain it to my kids, is that my laptop is pretending to be three computers. It's a good enough answer for the casual question. If there's a real interest beyond that you get asked the other questions, such why and how.
Posted by: SCBickle | 04/09/2011 at 07:15 PM
One other advantage to add that, IMHO, really is significant, and that is testing future deployments (new software or upgrades, etc). This was the original motivation in 1967 for IBM to create first virtualization and it still exists today.
Reconfiguration for a new deployment or any kind of upgrade is still a constant challenge. A test VM can run in parallel to the locked down production VM. Testing can be as thorough (performance, functionality) as anyone needs so that once deployed this new configuration can go into production more smoothly.
Currently in software development environments this was one of the earliest (and still strong) benefits of VMWare (or even in your PC analogy upgrading from XP to Win7).
Posted by: Douq Millar | 04/22/2011 at 12:53 PM