Adopting the Cloud? Importing vs. Building Your Enterprise VMs

This is a re-post of my article, originally published on The Ravello Blog.

Importing vs. Building Your Enterprise VMs

The cloud has brought a change in how we view and manage virtualization, especially for enterprises that need to deploy their sophisticated enterprise workloads around the world. Traditionally, the preferred method was to copy and deploy a virtual machine over a WAN. This can be a difficult and time-consuming process, especially for large VMs and complex IT environments. In recent years, deployment to the cloud has rapidly increased in popularity owing in part to its relative costs and ease of implementation.

As you contemplate the potential for moving to the cloud, inevitably one of the first decisions you will need to make is if you should build your VM from scratch or import it based on a set of templates.

Some Background

Although there is a natural tendency to assume that it would be easier to import an existing VM using one of the migration tools delivered by the cloud provider, this is not always the case.

I first encountered the use of templates for VMs around six years ago, when I became aware of VMware’s Clone or Deploy from Template option, which creates a copy of your virtual machine while leaving the original machine untouched. This approach provides a really easy way to duplicate VMs. However, if you need to deploy your VM on different platforms, which is usually what your developers are looking for, multiple templates will be needed, one for each platform. Ideally, you would try to create a template based on the lowest common denominators, and then add the applications on top of the resulting VMs as needed with your Configuration Management tool of choice. This works pretty well for deploying VMs, but will not be the same as your physical builds. You would still need to have a separate template for physical builds.

Create your Golden Image

Sometimes, it might be easier to just create the VM from scratch. For example, the process of installing a new virtual machine on Amazon, OpenStack, and other cloud providers, is fairly straightforward. If your service installation is performed in an orderly fashion, you can simply follow the instructions and build a new clean application environment.

It is important to state that the ease of rebuilding VMs in the cloud depends on the complexity of the software stack, e.g., database or network-specific configurations. Migrating a VM as part of a whole enterprise IT environment can by very challenging. If you choose to migrate from a VMware environment to take advantage of the cost benefits offered by the cloud, most cloud providers enable you to choose between creating a VM or importing an existing VM using their respective proprietary tools. Some of these tools are not mature, therefore you might hit some bumps on the way.

It is best to always start from a clean image that reflects the most basic common denominators – this will be your “golden” image – your template. This means removing everything you don’t really need from the image. For example, you probably don’t need to include the Windows Media Player or some of the other accessories that are included in a standard Windows installation.

There are tools available to help you prepare a clean installation. For example, Microsoft’s SysPrep tool will help you generalize an installation of Windows. It is important to remove passwords, drivers for default hardware not in use, and basically anything else that you don’t need. A similar tool is also available for preparing a Linux installation, virt-sysprep. Make sure you remove any MAC addresses, passwords, IDs, etc., to provide the next user with a clean installation. Once you have created and saved your clean “golden” image, make sure to configure access control, defining specific permissions for authorized users only.

Using these tools works, but not all of the time. Learn how

Building or creating an individual VM in the cloud can be easy however as noted above, migrating a whole environment including database, storage and network is a much more challenging task for the enterprise IT. The environment components’ configurations and specific enterprise-grade appliances might require great investment and efforts in order to be migrated to the cloud “as-is” with the same on-premise capabilities and performance. Or, it might not be possible at all – and then another solution must be found.

Size does matter

Two of the key factors to consider in planning your deployment are the size of your VM’s and the potential of portability between different platforms. Of course, when you create cloned copies of your VM, the size is identical. The larger the VM, the harder it is to move or the longer it takes to import.

Today, you can choose from a wide range of virtualization options and cloud providers. Unfortunately, there is no conformity between the VMs created by the different cloud providers, not to mention your on-premises images. There are no agreed upon formats or industry-wide standards in place. For example, Amazon uses the Xen, while OpenStack, Google and others are based on variations of KVM. At present, there are no clear methods to allow portability between platforms, be it a public cloud, private cloud or on-premises.

New technology players such as Ravello Systems provide the closest approximation to such a solution. By placing a layer between the VM and the hypervisor, Ravello Systems allows you clone your multi-tiers enterprise applications and deploy it on multiple platforms, using different cloud providers without requiring further modification.