Data Centers

Virtualization pains: Migrating real servers to virtual with Virtual Server Migration Toolkit

The Virtual Server Migration Toolkit can be difficult to work with, but it has the potential to be a powerful tool when working with migration processes. Joshua Hoskins describes his positive experience with using the toolkit in his organization.

Virtualization is rapidly becoming a major force in IT. With Microsoft's release of Virtual Server R2 Enterprise Edition for free (available here) and VMWare's free offering of VMWare Server (formally GSX Server—available here) virtualization has become a hot topic in many shops. It came as no surprise that the virtualization wave hit my own company. When the choice to use Microsoft's product was made, we found the virtulization process itself was fairly simple (see Right Tool article here). The next step was to look at migrating our real server to our new virtualized environment.

The Job

We needed to find a way to migrate our real servers to virtual. Some of these were as simple as installing a new server and migrating the function. We had only to implement a few backend DNS changes, and users were none the wiser. Unfortunately, we could not do this with all of our servers. We wanted a way to virtualize our current environments with only a minimum of user downtime. The best way to do this was with imaging software.

The Tool

We decided to use the Virtual Server Migration Toolkit (VSMT) from Microsoft (available here). This tool managed to make it high on our list due mainly to the price (free). This tool makes use of another Microsoft tool, Automated Deployment Services, to take an image of a physical server, create the new virtual server, and then deploy the image to the virtual server. From the initial information we read this did not seem to be the best of the imaging tools, but it did meet our main requirement, price. Using the VSMT was not an easy intuitive process. This mostly command line tool required a good deal of effort to set up, and make work. It also required us to create another server to run the Automated Deployment Services and the VSMT Itself. While these could have been run from one of our Virtual Server servers, company policy prevents us from installing unneeded services on production servers.

Putting the Virtual Server Migration Toolkit to the Test

Using the VSMT consists of several steps. The first step (after properly preparing your physical server) is to gather your hardware information with the gatherhw tool. This is a simple command line tool that generates an XML file containing pertinent information regarding the physical system. You will then use the hwvalidate switch of the vmscript to validate the XML file created in the previous step. This will tell you if there are any needed patches are incompatibilities in your physical system. After correcting any issues, you will then use the vmscript command again to create a series of scripts to perform the final parts of the migration. One of the great powers of the VSMT lies in this. The scripts created are simple batch files, so you are free to edit them as you wish. This gives a LOT of power to you as the administrator in creating and customizing your virtual machines, though you must be careful as you can also cause yourself many problems if you edit settings you are unsure about. The next step you will perform is the capture of the virtual machine. You will have already created a script to do this (%sourcemachinename%_createvm.cmd). Running this step will create all of the necessary jobs in ADS to take the image of the physical computer. Once this is done, you will need to reboot your physical server, and set it up for PXE boot. Once you have taken your image, you will then create your virtual machine with another script (%sourcemachinename%_createvm.cmd). This will create your virtual machine on the target Virtual Server, and place the proper boot floppy image in the systems floppy drive. You will then run the %sourcemachinename%_deployvm.cmd script to push your image to the newly created virtual machine. As with the image capture step, this script creates all the necessary jobs within ADS to do this. After this you will need to install the Virtual Machine Additions to your newly virtualized server, along with installing any necessary drivers for the new hardware. Your new system will be identical to your old system. You can even set the system to clone the MAC address of your old system if that is needed. You can view a walkthrough of the process here.

Right Tool for the Job?

Without a doubt the Virtual Server Migration Toolkit is a difficult tool to work with, but after a few uses though the difficulty of the tool really seemed to fade away. Also, this tool does give you a lot of power in the migration processes. With the use of ADS and the created scripts you are in full control of the migration from. By the time we had migrated our first 10 servers using this tool seemed as easy as copying a file, and it never failed to the job we set it out to do. After the initial learning curve was reached, the Virtual Server Migration Toolkit really proved itself to be the Right Tool for the Job.

Editor's Picks