The VMware Infrastructure (VI) Client and VMware vSphere Client generate a 2gbsparse disk by default when creating a template, or when backing up a virtual machine using VMware Consolidated Backup.
However, the 2gbsparse disk cannot be used with virtual machines hosted by ESX. The disk must be converted to a supported format.
Converting virtual machine disks to a supported disk type
Note: Before performing these steps, ensure that the disk you want to access is stored on a location accessible to the ESX host (for example, on a LUN, local disk, or NFS datastore).
- Log in to the VMware ESX host as root using an SSH client.
- Change to the directory containing the disk using cd.
- Run the following command to list the contents of the directory:
ls -l disk*
A portion of the output includes lines similar to:
-rw------- 1 root root 327680 May 28 15:04 disk-s001.vmdk
-rw------- 1 root root 196608 May 28 15:04 disk-s002.vmdk
-rw------- 1 root root 359 May 28 15:04 disk.vmdk
- Run the following command to clone the disk to a datastore:
vmkfstools -i disk.vmdk -d <diskformat> /vmfs/volumes/<datastore>/newdisk.vmdk
Where /vmfs/volumes/<datastore>/newdisk.vmdk is the destination location and name for your virtual disk clone.
Note: The disk format can be thin, zeroedthick, or eagerzeroedthick. For more information about these formats, see the Additional Information section in Cannot power on a virtual machine because the virtual disk cannot be opened (1004232).
- Run the following command:
ls -l /vmfs/volumes/<datastore>/ls -l disk*
The output appears similar to:
-rw------- 1 root root 3221225472 May 28 15:05 disk-flat.vmdk
-rw------- 1 root root 307 May 28 15:05 disk.vmdk
- Connect to the ESX host with VI Client or to the vSphere Client directly or though vCenter.
- Select the virtual machine on the ESX host.
- Depends of the guest operating system capabilities, edit the virtual machine's properties to either hot add or cold add the disk.
- When the disk attached to the virtual machine, consult the guest operating system documentation for instructions on how to access the data on the newly attached disk.