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.