marius1
Enthusiast
Enthusiast

Importing a flat disk

A customer gave me the virtual disk of a VM.

I need to use it in my ESXi 5 host, but when I browse the datastore in order to connect it to my VM I don't see it at all.

The file name looks like:

00000_00000_<vmname>-FLAT.VMDK

It looks like a thick disk, but I don't know the exact version of the ESXi or ESX server where the disk was created.

I read the KB article  VMware KB: Recreating a missing virtual machine disk descriptor file but it looks to be related to ESX 4.

Is it valid fro ESXi 5 as well?

Regards

marius

6 Replies
kermic
Expert
Expert

Hi Marius,

The KB article 1002511 on re-creating disk descriptor applies to 5.x and 6.x as well, as you may see on the right side in "Product Version(s)" section.

continuum
Immortal
Immortal

Just post exact size in bytes - I create the descriptor for ESXi 5.
VMDKs that a customer gave you are always thick provisioned (- or garbage)

Do you need support with a recovery problem ? - call me via skype "sanbarrow"
marius1
Enthusiast
Enthusiast

The size is reported as: 209.715.200,00 KB.

Thank you for your help.

Regards

marius

0 Kudos
continuum
Immortal
Immortal

This is a valid sample-file.
Use it.
Adjust 3 parameters

$XXX = size of flat file in sectors (bytes/512) or (MB/2048)

$YYY=path to flatfile - if necessary give full path

$ZZZ=$XXX / 16065 - rounded down

Sample fits for: dd-images, esxi-flat.vmdks, workstation-flat.vmdks, bootable isohybrid cd-images that can be dd'ed to harddisk

# Disk DescriptorFile

version=1

encoding="UTF-8"

CID=12345678

parentCID=12345678

createType="vmfs"

# Extent description

RW $XXX VMFS "$YYY"

# The Disk Data Base

#DDB

ddb.adapterType = "lsilogic"

ddb.geometry.cylinders = "$ZZZ"

ddb.geometry.heads = "255"

ddb.geometry.sectors = "63"

For vmdks that you modify manually the CID-value 12345678 is unbeatable - no need to change that.
All other parameters are optional - so only add anything if ESXi fails to set the parameter himself or complains.
Adapter lsilogic serves all current vmdks you need for latest guests.
Dont worry about thin-parameter: - if somebody "gave" you a flat file it cant be thin anymore.
Dont worry about CBT: if your backup-tools needs them - it can create them - else better replace it.
Dont worry about UUIDs - if you dont have a vmx that belongs to the vmdk you rarely need to set this.
Encoding can be skipped if you specify old virtual hardware. Nowadays you better add it and keep it as it is.
The lines with # are optional - but keep them - there may be misbehaving tools that are picky here.
Quotes and blank space in lines: essential - dont change anything.

Do you need support with a recovery problem ? - call me via skype "sanbarrow"
marius1
Enthusiast
Enthusiast

Thank you for your message and your help.

I created a .vmdk file in the same folder as my original 00000_00000_<vmname>-FLAT.VMDK file with the contents you suggest but is not recognized as well.

How should it be named?

I looked at similar files on other folders but I don't see any similar file.

Can it depend on the version of ESXi (currently 5.x)?

Regards

marius

0 Kudos
a_p_
Leadership
Leadership

Please attach the .vmdk file you created to a reply post.

For the "00000_00000_<vmname>-FLAT.VMDK", the descriptor's file name should be "00000_00000_<vmname>.VMDK". Remember that file names are case-sensitive, so make sure that the flat file name within the descriptor file is correct!

André

0 Kudos