Physical-to-virtual server migration is not black magic. To migrate to a virtual server, you copy the bits residing on a physical disk to a virtual disk, inject some drivers, and modify some other bits to support those drivers.
Sound simple? The challenge is in knowing how to perform a physical-to-virtual (P2V) server migration -- or, more to the point, when.
For some versions of Windows operating systems and some virtual server migration tools, it is possible to run a conversion while the physical host is running. Other tools require the host to be powered off and booted off special media , such as CD-ROM or iSCSI Initiator. I would allow for some downtime for this, just in case your operating system can't perform a live P2V migration. It is critical to always plan for possible downtime.
In either case, the process is the same:
- For each local physical disk, first read the physical disk dimensions and used space by file system. Then, set the virtual disk file system dimensions, which cannot be less than the used space but can be less than the physical file system dimensions.
- Create the virtual machine configuration, including the VM name (different than the physical machine name), the network connections, the number of virtual CPUs and the amount of memory to assign to the virtual machine.
- Customize the IP address and other items as necessary using tools such as Sysprep that are embedded into the virtual server migration tool.
- Copy the bits from one file system to the target file system on a virtual disk.
- Inject the appropriate drivers into the guest operating system for the devices now in use. In general, these will be the necessary SCSI and networking drivers. In many cases, this is just a reassignment of how to access the disk.
- Reboot the VM.
Now you're done with the steps for within the virtual server migration toolkit. But there are still some necessary administration steps.
- Setup the IP address within the VM if not already done.
- Install VMware Tools if using VMware, XenTools if using Xen, etc.
- Test the application within the VM.
- When ready, power down the physical server and move the VM to a live network.
Voila! You have just learned how to migrate to a virtual server.
While a P2V migration is not necessarily difficult, it is important to fully understand the operating system you are converting because such migrations sometimes transfer all the bits but fail to boot. Usually, this is due to a driver issue that can easily be fixed by booting from operating system rescue media.
|Edward L. Haletky is the author of VMware ESX Server in the Enterprise: Planning and Securing Virtualization Servers. He recently left Hewlett-Packard Co., where he worked on the virtualization, Linux and high-performance computing teams. Haletky owns AstroArch Consulting Inc. and is a champion and moderator for the VMware Communities Forums.|
Dig deeper on Server hardware and virtualization