
Search the Knowledge Base: |
Search the Knowledge Base: |
You might want to move VMware ESX Server virtual disk files to or from a VMFS volume for:
For moving ESX Server virtual disk files, note that:
The tools you can use to move virtual disks include:
For ESX Server 3.x and VirtualCenter-managed ESX Server 2.5.x virtual machines, you can use VMware Virtual Machine Importer 2 to migrate virtual machines to and from ESX Server. Virtual Machine Importer 2 is a freely available, stand-alone utility to import virtual machines from a variety of source formats into most VMware product environments.
To obtain the free download of Virtual Machine Importer 2, go to http://www.vmware.com/products/vmimporter/
The following 32-bit guest operating systems are fully supported by Virtual Machine Importer 2:
Support for the following guest operating systems is Experimental. VMware Virtual Machine Importer 2 can clone source images containing these operating systems, but the destination virtual machine may or may not work without additional configuration after import. In particular, if the source image contains unsupported hardware, you may need to modify the configuration of the destination virtual machine before using it:
For operating systems and ESX Server versions not supported by Virtual Machine Importer 2, the remaining sections detail how to move virtual machines.
VirtualCenter specializes in migrating complete virtual machines, warehousing large numbers of virtual machines, and cloning virtual machines from templates. VirtualCenter is recommended for managing many virtual machines in an enterprise environment.
SCP and recent versions of FTP, unlike some other file utilities, are capable of handling files larger than 2GB. You can safely use these tools to move ESX Server virtual disks to other VMFS volumes, or to back them up on file systems capable of handling files over 2GB. However, be sure to use binary mode when transferring virtual disk files with FTP. VMware recommends that you use md5sum or a similar utility to verify file integrity after copying a virtual disk.
Note: VMware does not support the use of virtual machine disk files moved from a VMFS volume to a non-VMFS file system by SCP or FTP. When you move a virtual machine disk file to a non-VMFS file system without using the vmkfstools export command or the file manager in the VMware Management Interface, the resulting disk file is completely corrupted and is rendered unusable. This is because the file format is completely different and a non-VMFS file system does not understand how to handle a file created under a VMFS file system.
The VMware Management Interface and the vmkfstools utility are able to convert virtual disk files from the ESX Server VMFS file system format to formats compatible with other VMware products, and to store the disk files on non-VMFS file systems. These tools can be used to migrate virtual machines between ESX Server and other virtual platform products, or to file systems that limit file size to 2GB.
To use the file manager in the VMware Management Interface, click the Manage Files link to open a window showing a directory tree on the left and the current directory contents on the right. You can expand or collapse parts of the directory tree by clicking on the folder icons at the left.
To do file operations in the current directory, click the check boxes to select files in the current directory listing at the right. Then use the Delete, Edit Properties, Cut and Copy buttons at the bottom to perform file-level operations on the selected files. Refer to the ESX Server documentation for more complete information on using the file manager.
For example, to export a virtual disk using the file manager:
The file manager automatically determines when to convert between virtual disk formats. If you are moving a virtual disk from a VMFS volume to a different file system, the file is converted to a number of 2GB files which can safely be stored on all popular file system types. The destination file system can be an NFS or Samba mount, as well as a local EXT2 or EXT3 file system.
Note: VMware does not recommend exporting or importing virtual disk files to or from network shares, as the resulting files may be corrupted by network errors. It's better to use vmkfstools to move virtual disk files between a VMFS and a local file system in one step, and use FTP or SCP to move virtual disk files between the local file system and the network share in a separate step.
Follow these steps to back up virtual disk files created with ESX Server to non-VMFS file systems, or to convert ESX Server virtual disks to a format that can be used with GSX Server and Workstation:
/path/to/dest should already exist and should not contain dest.vmdk (or it will get overwritten).
Notes:
The vmkfstools command creates 2GB files on non-VMFS file systems, in the same way that the management interface file manager does.
Note on preallocated disks: If the virtual disk that you are importing is a preallocated disk, you'll have two .vmdk files that look something like this:
-rw-r--r-- 1 root root 10737418240 Dec 20 23:14 win2k3-gsx-flat.vmdk
-rw-r--r-- 1 root root 351 Dec 20 21:13 win2k3-gsx.vmdk
Run vmkfstools on the smaller file -- the one that does not include "flat" in its file name. In the example above, the correct file to choose is win2k3-gsx.vmdk.