Rethink Virtual Machine Template: It’s Not What It Is

In the virtualization world, virtual machine template (as know as virtual machine image) is a big feature. It allows users to quickly deploy a new virtual machine without the steps to install a new operating system and other software. Because of this feature, we start to have a new problem with too many (unused or useless) virtual machines. But this is a separate topic that deserves its own discussion.

Now, thinking more about the virtual machine template, it actually does more what its name suggests. Literally speaking, a virtual machine template is a template for virtual machines which are virtual counterpart for physical machines. In theory, it should only include specification for virtual machine hardware itself, for example, number of CPUs, number and size of hard disks, NICs, etc. In reality, it also includes a preloaded hard disk with full stacks (OS, middleware, and applications) installed. Therefore, a virtual machine template is really a virtual machine system template.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

The advantage of including the system is the speed and consistency for provisioning a new virtual machine system. In several minutes a new system is ready and guaranteed to the same (almost) as the old system.

The disadvantage is that it can be huge in term of storage. A production virtual machine template can easily go above 10G. It takes time and network bandwidth to move the virtual machine around. It’s also not easy to upgrade the existing software stack – you have to turn it to a running virtual machine and then back to a virtual machine template. In a diversified environment, it’s also not flexible enough – for each type of virtual machine in 3 tier Web application, you need a corresponding template.

To avoid the real disk image, you can use metadata alternatives like Chef and Puppet with which you can write scripts. These scripts would be significantly smaller than the installed system. More importantly, you don’t need a virtual machine template for each type of virtual machine, which means a big saving on storage. For each type of virtual machine, you just need a separate set of the scripts.

The downside of using metadata is that it’s much slower than the virtual machine template approach, and it requires network connectivity and provision server like Puppet master.

Like most cases in engineering, there is no one best solution for all. A good engineer should consider both problem and technology domains for a good solution.

In most cases, a good trade-off is to have a virtual machine template with basic (least dominator of all virtual machines, mostly OS itself plus Puppet agent for example) software which can be provisioned as usual. Then the Puppet kicks in to install extra software packages.

This entry was posted in Virtualization and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. Meistermn
    Posted July 24, 2013 at 4:09 am | Permalink

    I don’t agre with you. You only need one template with per os 1 vcpu, 1 nic and 1 harddisk 40-100 GB. No Antivirus, No Agents for backup, monitoring and so on. For every application you deploy this template and a behaviour learning tool finds out how many vcpu, vdisk, vnics and so this vm needs. That is a modern deployment. Many Customers don’t known how many recources they need. A behaviour selflearning should find this out.

  2. Posted July 24, 2013 at 11:30 am | Permalink

    Thanks Meistermn, it sounds like an interesting idea to use behavior self learning for resource requirements.

    Steve

  3. Haim Chibotero
    Posted July 28, 2013 at 5:36 am | Permalink

    I also don’t tend to agree , looking that most environments today have a storage that can utilize cheap SATA big disks, you can keep all your templates there.

    Haim

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.