Contents

Moving a Virtual Machine

You can modify virtual machines created with VMware Workstation 2.0 or higher or VMware GSX Server to run on VMware ESX Server.

The virtual machine you want to migrate must be set up on a SCSI disk — either a virtual disk or a raw disk. You then migrate it to run from a virtual SCSI disk under VMware ESX Server.

Be sure you have enough space on the VMFS disk where you store virtual machines to hold the full size of the source virtual disk. In VMware ESX Server the disk’s full size is allocated at the time the virtual disk file is created. In VMware Workstation and GSX Server, the virtual disk file starts smaller and grows to the maximum size as data is added. Thus, a virtual disk defined as a 2GB disk may be contained in a 500MB file. When you migrate the virtual disk to VMware ESX Server, it occupies 2GB of disk space.

When you install VMware Tools in the VMware ESX Server virtual machine, you may set up a new network driver. If you use the vmxnet driver, keep in mind that this driver is not suitable for a virtual machine running under VMware Workstation 2.x or under VMware GSX Server on a Linux host. If you think you may want to use this virtual machine under one of those products at a later time, you may find it convenient to do one of the following:

Follow these steps to migrate a virtual machine to VMware ESX Server.

  1. Create a new configuration .cfg file in the directory where you are storing files associated with the new virtual machine — for example /home/<user>/vmware/<guestos>.

    Note the name and location of the virtual disk .dsk file created for the new virtual machine.

  2. Working from the console operating system, use vmkfstools to remove the .dsk file of the new virtual machine. You must log in as root to use vmkfstools.

    vmkfstools -r vmhba<x>:<y>:<z>:<filename>.dsk

  3. Be sure you have access to the files in the directory (in the case of a virtual disk) or partition (in the case of a raw disk) that holds the source virtual machine. You may be able to mount the source location, or you may prefer to copy the files to a temporary directory on the console operating system.

    If you are not sure where the source files are, open the virtual machine in the VMware product you used to create it, open the Configuration Editor (Settings > Configuration Editor). On a Windows host, click the name of the drive you want to migrate. The path listed under Disk file provides the location information. On a Linux host, expand the SCSI Drives tree and click the name of the drive you want to migrate. The Name field provides the location information.

  4. Use vmkfstools to import the source virtual machine to the target location. For <targetfile>.dsk, use the name of the .dsk file that you removed in step 2.

    vmkfstools -i <sourcepath>/<sourcefile>.vmdk vmhba<x>:<y>:<z>:<targetfile>.dsk

    Also note that the source filename may end in .dsk if the virtual machine was created under earlier versions of VMware products.

  5. Boot your virtual machine using VMware ESX Server and follow the instructions below for installing VMware Tools and the network driver in the virtual machine.

Some guest operating systems display messages about detecting hardware changes and require you to reboot the virtual machine. This occurs because VMware ESX Server uses an emulation for chipsets and BIOS that is slightly different from those used by other VMware products.

Note: In most cases, the most convenient way to create the VMFS file system is through the Web-based configuration wizard. However, you can also create a VMFS file system on the partition or disk using the vmkfstools command. See the vmkfstools(1) man page for details.

Back to top

© 2001-2002 VMware, Inc. All rights reserved.