As some of you may know, there’s a fairly successful company out there that’s done pretty well among people who like to make cards and scrapbooks.
Why? Well, they let normal people (i.e. don’t have to be crazy artistic) get very predictable, consistent results when they’re making cards and scrapbooks personally (without having to go to the Hallmark store for everything). They can even mix and match a bit (bigger/smaller cards and scrapbooks) while still keeping the same consistency.
Wouldn’t it be neat if we could do something like that in the datacenter? Well, it turns out we can actually — ever hear of VMware templates?
In short, you can make a virtual server (usually Windows) and stamp out (aka deploy) as many identical servers as you want from that baseline, i.e. template. If you want to mix it up a little bit, you can change the RAM, network settings, etc. during deployment.
Lots of identical servers you say….what’s the point in that? Sounds kind of boring even….well….
- Consistency – when you have to troubleshoot, having a common deployment baseline is incredibly helpful (you know that certain things can’t be related to the way the OS was installed….if it was, all your servers would be having the same issue). Beyond that, when you install Windows from scratch time (much less by different people), how consistent are the results? (everyone has their own little tweaks after all)
- Deployment Time – How long does it take to install Windows? How about 15-20 minutes to deploy a virtual server from a template instead? And remember those tweaks? When you do them on each server individually, that’s a lot of time (and sometimes not even worth it). When you can tweak a single template and have all servers deployed from that template benefit, it’s worth the time.
That does bring me to a bit of a finer point though — use the “template” object type in vCenter. It’s just an extra click to turn a VM into a template….but it keeps anyone from just starting up the template and using it as a regular system. It’s a small difference…but if it keeps your template clean, it’s worth it.
I also recommend that customers update their template when deploying a new VM. That is….
- convert the template to a VM
- run any Windows updates/update backup clients/anything else
- convert back to a template
- deploy a VM or three from the template
This takes no more time than deploying from the template and updating the resulting VM afterwards but gives you the benefit of an updated template (and saves you time if doing more than one VM).
The last point (and one that sometimes raises…well…concerns) is P2V conversions, aka Physical to Virtual Conversions (using something like VMware Converter or Quest vCounter to migrate a physical machine directly into a virtual machine). In short, I don’t recommend P2V as an implementation strategy and instead recommend treating moving into a virtualized environment just the same as you would any other hardware upgrade…..but using templates instead. Let’s think about this….
- versions of Windows — how many different minor/major versions of Windows are in the datacenter?
- patch levels — ditto
- virtual floppies/serial/usb/com ports — P2V brings these across….and often they don’t get cleaned up. These actually consume additional RAM/CPU on the ESX host which can add up across a lot of VMs.
- general server “crud” — you know and I know….servers get crud over the years. Do we really want to migrate all that “crud” into our nice new and shiny virtualized server environment?
Given those factors, I strongly recommend building a good template (or multiple — i.e. 2003R2 vs. 2008R2 for instance), installing the application (or build a template with the application if you have multiple servers running the app), and migrating the data over. This gets you all the benefits of templates and also accomplishes a good bit of cleanup on the existing environment. More time? Absolutely. But what I’ve seen overall is that whether you P2V or migrate into a “template-based deployment” you spend the same amount of time at the end of the day….and if you P2V, you have fun troubleshooting issues in the meantime.
Now, I do recognize that sometimes this isn’t feasible — you have a finicky app running in Windows 2000 that’s business critical and no one knows how to migrate it (much less install it). If you have no choice, P2V is a good “get out of jail free” card. BUT….for those scenarios, P2V only delays the pain…it’s a very tactical tool and not strategic.
In short, templates are all about operational efficiency — they’re a built-in feature of vCenter — go use them!
Note: there’s definitely a lot more nuance to this topic….comments and suggestions are more than welcome.