Quantcast
Channel: VMware Communities : All Content - VMware vCenter Converter SDK
Viewing all articles
Browse latest Browse all 706

Storage resize converterStorageParams.resizeRatio is ignored

$
0
0

Hi,

 

I am trying to use the parameters resizeRatio and minVolumeSize to increase the size of the virtual disks during the conversion process.

 

http://www.vmware.com/support/developer/converter-sdk/conv50_apireference/converter.params.StorageParams.html

 

They are in the object converterStorageParams.

 

But these parameters are ignored all the time. I do not know why. They appear in the vmware-converter-worker.log so they are submitted correctly. But the storage is not resized. In the storagemapping section resize is always on false.

The manual says:

Specifies the virtual volume resize ratio.  If a non-zero value is set and volumesToClone is unset,  all virtual volumes will be resized to  min(volume capacity,      max(minVolumeSize, volume used space * (1 + resizeRatio / 100)))

volumesToClone is not set as you see below.

I am using Windows 2003 and Windows 2008 VMs with NTFS on the VMDKs.

 

Does anyone managed to get the resizeRatio working?

 

My code:

private ConverterCloningParams
        BuildCloningParams()
        {
            ConverterCloningParams cloningParams = new ConverterCloningParams(

 

            ConverterTargetVmSpec targetVMSpec = new ConverterTargetVmSpec();
            targetVMSpec.name = _vcVMToCreate;
            targetVMSpec.location = BuildTargetVMLocation();
            targetVMSpec.productVersion = "PRODUCT_MANAGED";

 

            cloningParams.target = targetVMSpec;

 

            ConverterStorageParams converterStorageParams = new ConverterStorageParams();
            converterStorageParams.cloningMode = "volumeBasedCloning";
            converterStorageParams.vmxDatastoreName = _destdatastore;
            converterStorageParams.diskControllerType = "keepSource";
            converterStorageParams.optimizedPartitionAlignment = true;
            converterStorageParams.optimizedPartitionAlignmentSpecified = true;
         
           converterStorageParams.resizeRatio = 30;
            converterStorageParams.resizeRatioSpecified = true;
            converterStorageParams.minVolumeSize = 38162185216;
            converterStorageParams.minVolumeSizeSpecified = true;

          
            cloningParams.storageParams = converterStorageParams;
            ConverterBasicHardwareParams hardwareParams = new ConverterBasicHardwareParams();

 

            ConverterNetworkParams networkParams = new ConverterNetworkParams();
            networkParams.preserveNicCount = true;
            networkParams.preserveNicCountSpecified = true;
            networkParams.preserveNicMapping = true;
            networkParams.preserveNicMappingSpecified = true;
            cloningParams.networkParams = networkParams;

 

            cloningParams.basicHardwareParams = hardwareParams;
           

            return cloningParams;
        }

 

 

 

vmware-converter-worker.log

 

-->       storageParams = (converter.params.StorageParams) {
-->          dynamicType = <unset>,
-->          cloningMode = "volumeBasedCloning",
-->          diskControllerType = "keepSource",
-->          skipUnwantedFiles = <unset>,
-->          useBitmapDriver = <unset>,
-->          intermediateImage = <unset>,
-->          modifiedClustersOnly = <unset>,
-->          vmxDatastoreName = "_prod_vf-esx3_NFS1",
-->          resizeRatio = 30,
-->          minVolumeSize = 38162185216,

-->          optimizedPartitionAlignment = true,
-->       },

 

 

-->    storageMapping = (converter.agent.params.StorageMapping) {
-->       dynamicType = <unset>,
-->       volumeMapping = (converter.agent.params.StorageMapping.VolumeMapping) [
-->          (converter.agent.params.StorageMapping.VolumeMapping) {
-->             dynamicType = <unset>,
-->             sourceVolumeId = "3+<+3+<+00>7000000000000",
-->             targetVolumeId = "3+<+3+<+0000010000000000",
-->             resizeRequested = false,
-->             clusterSizeInBytes = <unset>,
-->          },
-->          (converter.agent.params.StorageMapping.VolumeMapping) {
-->             dynamicType = <unset>,
-->             sourceVolumeId = "44=494?4:39444:32.65249267:):)348)710*57969(4,26",
-->             targetVolumeId = ":,:4:+6-0000020000000000",
-->             resizeRequested = false,
-->             clusterSizeInBytes = <unset>,
-->          }
-->       ],
-->       diskMapping = (converter.agent.params.StorageMapping.DiskMapping) [
-->          (converter.agent.params.StorageMapping.DiskMapping) {
-->             dynamicType = <unset>,
-->             sourceDiskId = "disk-2000",
-->             targetDiskId = "disk-2000",
-->             diskCreateType = "vmfsMonolithicFlat",
-->             lvg = false,
-->          },
-->          (converter.agent.params.StorageMapping.DiskMapping) {
-->             dynamicType = <unset>,
-->             sourceDiskId = "disk-2001",
-->             targetDiskId = "disk-2001",
-->             diskCreateType = "vmfsMonolithicFlat",
-->             lvg = false,
-->          }
-->       ],
-->    },
-->    nextBitmapId = <unset>,
-->    snapshotSource = true,
-->    p2vdr = <unset>,
-->    doPersistNextBitmapId = false,
-->    cloningMode = "volumeBasedCloning",
-->    throttlingParams = (converter.params.ThrottlingParams) null,
-->    skipCopyingRestoreCheckpointData = true,
-->    skipUnwantedFiles = <unset>,
-->    doReconfig = true,
-->    helperVmNetworkParams = (converter.params.HelperVmNetworkParams) null,
-->    optimizedPartitionAlignment = true,

 

 

Thanks for any hint!

 

Jay


Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>