Tip

How to convert VMware virtual disk images to Virtual Server, part two

In part one of this tip, we discussed why administrators sometimes need an alternate method of migrating virtual machines from VMware to Virtual Server. Sometimes the available tools are inadequate for

    Requires Free Membership to View

a company's needs. We also went over how to prepare the source VM for the migration.

In part two, we will discuss preparing the FTP server, cloning the source VM and then readying the target VM to receive the source VM contents.

Preparing the FTP server

If you plan to use G4U to image the virtual disk, you will need to have an FTP server available. You will also need to create an account on the FTP server named install that has permission to create and write files to the server.

If you're looking for a quick and dirty FTP application, take a look at Cerberus FTP. While free for personal use, the commercial version of this software retails for $59.99. With the FTP server setup and an account named install, you're ready to image the source VM.

Cloning the source Virtual Machine

Follow these steps to prepare a cloned image of the source virtual machine's hard disk:

  1. Download the G4U CD-ROM ISO image and save it on the source VM's host system.
  2. Configure the VM's virtual CD-ROM to use the downloaded g4u-2.2.iso file.
  3. Boot the VM and hit ESC as the VM begins to boot. This should allow you to see the VM's boot menu. When the boot menu appears, select the CD-ROM drive.
  4. By default, the VM will attempt to obtain an IP address via DHCP. If no DHCP server is available, you can set a static IP address for the VM by following these steps:
    1. Determine the name of the network interface by running the command ifconfig –a.
    2. Now set the IP address by running the command ifconfig <ip address> netmask <subnet mask>. For example, to set the IP address on interface pcn0, you would run ifconfig pcn0 192.168.0.10 netmask 255.255.255.0.
  5. You can now start creating the image. To do this, run the command uploaddisk <ftp server> <filename.gz> [disk]. For example, to create an image named w2ksrv.gz in the images folder on the server 192.168.0.5, you would run uploaddisk 192.168.0.5 images/w2ksrv.gz.

    Note that if the virtual machine is using a virtual SCSI disk, you will need to specify which disk to clone in the command syntax. You can see all disks discovered by G4U by running the disks command. So if the last example used a virtual SCSI disk instead of an IDE disk, you would run this command: uploaddisk 192.168.0.5 images/w2ksrv.gz sd0.
  6. When prompted, enter the password for the install account on the FTP server. In a moment, the image upload should begin.
  7. Wait for the upload to complete. Once finished, power off the source VM.

You're now ready to deploy the image to the target VM.

Preparing and imaging the target VM

To prepare and image the target VM, follow these steps:

  1. On the Virtual Server (or Virtual PC) host, create a new virtual machine that includes the same hardware configuration as the source VM. Note that the virtual hard disks on the target system must be equal to or larger than the virtual hard disks on the source VM.
  2. Configure the VM's virtual CD-ROM to use the downloaded g4u-2.2.iso file.
  3. By default, the VM will attempt to obtain an IP address via DHCP. If no DHCP server is available, you can set a static IP address for the VM by following these steps:
    1. Determine the name of the network interface by running the command ifconfig –a.
    2. Now set the IP address by running the command ifconfig <interface name> <ip address> netmask <subnet mask>. For example, to set the IP address on interface tlp0, you would run ifconfig tlp0 192.168.0.10 netmask 255.255.255.0.
  4. To download the image to the VM, use the following command syntax: slurpdisk <FTP Server> <image path and file> [disk]. For example, to download an image named w2ksrv.gz in the images folder on the server 192.168.0.5, you would run slurpdisk 192.168.0.5 images/w2ksrv.gz.
  5. When prompted, enter the password for the install FTP account. Note that if an error occurs with the download, you may need to specify the target disk in the slurpdisk command syntax (example: slurpdisk 192.168.0.5 images/w2ksrv.gz wd0). To see a list of target disks for the command, run the disks command.
  6. Once the download completes, reboot the virtual machine.
  7. Once the system boots up, login to the VM. You should see that new hardware was detected and you are prompted to reboot. Click Yes to reboot.
  8. After the system reboots, log back in and then install the VM Additions. This will install the Virtual Server (or Virtual PC) compatible drivers on the new virtual machine.

I have used the process documented in this article to covert Windows 2000, Windows XP and Windows Server 2003 VMware virtual machines to Virtual Server 2005 R2 virtual machines.

When the cloned system will not start on the virtual server, the usual causes of this problem are:

  • VMware-related drivers were not uninstalled prior to the source system being cloned. This can be corrected by logging into the Recovery Console and disabling the VMware-related drivers (listed in the prepvm.vbs script).
  • Incorrect hal.dll and ntoskrnl.exe files copied to the %windir%\\system32 folder. This can be corrected by logging into the Recovery Console and copying the correct file versions to the %windir%\\system32 folder.
  • Boot.ini file from original source points to wrong OS location on the new Virtual Server disks. This can be fixed by running bootcfg /rebuild from the Recovery Console.

As a last resort, many have resorted to re-running Windows setup on the cloned VM and selecting to repair the existing OS installation. Although this can return the cloned VM back to operation, it will take considerable time and likely will require you to reinstall any previously installed applications on the VM.

For more information on troubleshooting Windows startup problems, take a look at Windows Server 2003 – Troubleshooting Startup.

When I first started performing VMware to Virtual Server migrations, the process was often very time consuming. With this process, preparing the source VM for cloning can take less than 15 minutes with the remainder of the time in the migration process taking up by the cloning software itself.

Any imaging method can be used to clone the virtual disk(s) from the source VM to the target VM, but the real key in the migration process is the preparation of the source VM. When prepared properly, as you have seen, virtual machine migration can be a relatively painless process.

About the author: Chris Wolf, MCSE, MCSE, MCT, CCNA, is a Microsoft MVP for Windows Server-File System/Storage and the Computer and Information Systems Department Head for the ECPI College of Technology online campus. He also works as an independent consultant, specializing in the areas of virtualization, enterprise storage, and network infrastructure management. Chris is the author of Virtualization: From the Desktop to the Enterprise (Apress), Troubleshooting Microsoft Technologies (Addison Wesley) and he is a contributor to the Windows Server 2003 Deployment Kit (Microsoft Press).

This was first published in October 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.