Recreating a missing virtual disk (VMDK) descriptor file for imported ESX 2.x virtual machines
search cancel

Recreating a missing virtual disk (VMDK) descriptor file for imported ESX 2.x virtual machines

book

Article ID: 304437

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides the instructions to recreate a virtual disk descriptor file for a VMware ESX 2.5 virtual machine that has already been imported into a VMware Infrastructure 3 datacenter or later.

Environment

VMware ESX Server 3.5.x
VMware ESXi 4.0.x Embedded
VMware ESXi 4.0.x Installable
VMware ESX 4.0.x
VMware ESX Server 3.0.x
VMware ESX 4.1.x
VMware ESXi 3.5.x Installable
VMware ESXi 4.1.x Installable
VMware ESXi 3.5.x Embedded
VMware ESXi 4.1.x Embedded

Resolution

An imported VMware ESX 2.5 virtual machine disk stored on VMFS 3 consists of a descriptor file and an additional flat file based on the default zeroedthick disk format.

Note: For more information on virtual disk format, see VMware Virtual Disks: Virtual Disk Format v1.1.
To recreate the virtual disk descriptor file:
  1. Create a virtual disk descriptor file for use as a base or template. For more information, see Recreating a missing virtual disk (VMDK) header/descriptor file (1002511).

  2. Open the descriptor file using a text editor.

  3. Modify the ddb.virtualHWVersion parameter and set it to the current hardware version of the virtual machine.

    ddb.virtualHWVersion = "7"

    Note: The configured hardware version is displayed when you edit the settings of the virtual machine. Beginning with VMware ESX 4.0, hardware version 7 is available for virtual machines. This version, however, is not backward-compatible with VMware ESX 3.5 and earlier. Use version 4 for virtual machines using such a hardware version or product.

  4. Modify the ddb.adapterType entry to:

    ddb.adapterType = "lsilogic"

    Note: legacyesx is no longer permissible for a virtual machine's hardware configuration. You may safely change this to buslogic or lsilogic, depending on what your virtual machine guest is using. For additional information, see After upgrading to VirtualCenter 2.5 Update 2, you cannot attach a VMDK disk to a virtual machine (1007142).

  5. Remove the following entry, if present, because legacy ESX virtual machines are not thin-provisioned:

    ddb.thinProvisioned = "1"

  6. Save and close the file.

Note: If the ddb.geometry cylinder calculations are required, see the Additional Information section of this article.


Additional Information

Comparison of the base descriptor file and the tailored descriptor file

The following table provides a comparison of the base descriptor file and the tailored descriptor file:

Base Descriptor File
Tailored Descriptor File
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 8388608 VMFS "vmdisk0-flat.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "buslogic"
ddb.thinProvisioned = "1"
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 8388608 VMFS "vmdisk0-flat.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "7"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"


Cylinder Calculations

If the size of the disk is less than 1GB:
  • Set ddb.geometry.heads to 64.
  • Set ddb.geometry.sectors to 32.
  • Set ddb.geometry.cylinders to the integer portion of the value obtained when the size of the disk (in bytes) is divided by 1048576.

    Note: This number (1048576) is generated by multiplying head and sector values, and 512, for the block size.
If the size of the flat file is 1GB or more but less than 2GB:
  • Set ddb.geometry.heads to 128.
  • Set ddb.geometry.sectors to 32.
  • Set ddb.geometry.cylinders to the integer portion of the value obtained when the size of the disk (in bytes) is divided by by 2097152.
If the size of the flat file is 2GB or more:
  • Set ddb.geometry.heads to 255.
  • Set ddb.geometry.sectors to 63.
  • Set ddb.geometry.cylinders to the integer portion of the value obtained when the size of the disk (in bytes) is divided by 8225280.