VMware {code} Community
schmidwi
Contributor
Contributor

How do I specify thin provisioning

In reading the API docs, it seems like I should be able to specify thin provisioning on the target disks like this:

ConverterStorageParams converterStorageParams = new ConverterStorageParams();
converterStorageParams.setCloningMode("diskBasedCloning");
ConverterStorageParamsTargetDiskParams[] targetDiskParams = new ConverterStorageParamsTargetDiskParams[1];
targetDiskParams[0] = new ConverterStorageParamsTargetDiskParams();
targetDiskParams[0].setDiskType("vmfsMonolithicFlatThinProvisioned");
converterStorageParams.setTargetDiskParams(targetDiskParams);

but this throws an error "Remote server closed connection after 0 response bytes read"

The API is confusing (to me) on the topic of diskType as it says:

The target disk type.  It must be from the  DiskControllerType enum.

If it is not specified, the backend will select the default  type for a particular target product version.

For Managed destinations valid values are:     vmfsMonolithicFlat (*default)     vmfsTwoGbFlat     vmfsMonolithicFlatThinProvisioned     vmfsTwoGbFlatThinProvisioned     monolithicSparse (Server 2.0)     monolithicFlat (Server 2.0)     twoGbSparse (Server 2.0)     twoGbFlat (Server 2.0)

For Hosted destinations valid values are:     monolithicSparse (*default)     monolithicFlat     twoGbSparse     twoGbFlat

For OVF destinations valid values are:     compressedVMDK (*default)

but the enum "DiskControllerType" specifis things like "ide", "scsiBusLogic", etc.  Even when I try to specify "ide" for the diskType, I still get the same error from the converter server.

Anyone have an idea on how I can specify thin provisioning.  Ideally, I would like to specify thin provisioning on all the disks, but I'm also not sure how to find out the number of disks in the source VM so that may be a question for another day.

Reply
0 Kudos
6 Replies
patanassov
VMware Employee
VMware Employee

There seems to be an error in the description, it should mention DiskCreateType. However what follows is correct.

What is your destination type? Does it match the disk type you set? (vmfsMonolithicFlatThinProvisioned means your destination should be ESX or VC, and IIRC at least ESX 4.0 to support thin provisioning)

HTH,

Plamen

Reply
0 Kudos
schmidwi
Contributor
Contributor

Thanks for helping.  I am specifying "vmfsMonolithicFlatThinProvisioned" and my destination is Virtual Center 4.1.  I have also tried "vmfsMonolithic" (which the doc says is the default setting), but that throws the same error.

I don't see any "DiskCreateType".  That does not appear as a property for ConverterStorageParamsTargetDiskParams

Reply
0 Kudos
tos2k
Expert
Expert

Hi!

Would like to know if you got the running finally?

Any updates?

TIA, Tos2k

Reply
0 Kudos
tos2k
Expert
Expert

Has somebody a solution on importing thin provisioned via ConverterApi?

Setting storageparams.cloningtype to diskBasedCloing fails import jobs immeditately for me...

Tos2k

Reply
0 Kudos
schmidwi
Contributor
Contributor

I was not ever able to get this working.  I finally switched to the OVFTOOL and found the parameters that would work for my specific situation.  If you are interesetd, it looked something like this:

/opt/vmware/ovftool/ovftool  --name=<targetName> --diskMode=twoGbMaxExtentSparse -tt=vmx "vi://<username>:<password>@<virtualcenter>/<DataCenter>/vm/<FOLDERPATH>"  "<full_path_to_source_vmxFile>"

Reply
0 Kudos
tos2k
Expert
Expert

ACK

Converter part concerning thin provisioning looks a little crappy, in addition to the part of the documentation you posted.

Even that there is NO documentation on linked/clones incremental P2V seems to be quite "work-is-in-progress" of the API...

Tos2k

Reply
0 Kudos