Hello. I am working with the vCenter Converter Standalone Server API and have ran in to an odd issue when performing the cloning using the API that I can not replicate with the Client.
When cloning with the client I am breaking out the source physical machine's volumes to separate virtual disks: I.E. C: and D: where on one physical disk and are now being put on their own thin provisioned virtual disk.
This works no problem from the client and I get a working vm in the end.
When cloning with the API it appears I am performing the same exact task from what I have been able to compare. Based off SDK dotnet example I expanded the BuildCloningParams method under the Programs class with the following code using hardcoded values:
List<ConverterStorageParamsVolumeCloningParams> targetvolumes1 = new List<ConverterStorageParamsVolumeCloningParams>(); | |
List<ConverterStorageParamsVolumeCloningParams> targetvolumes2 = new List<ConverterStorageParamsVolumeCloningParams>(); | |
List<ConverterStorageParamsTargetDiskParams> targetdisks = new List<ConverterStorageParamsTargetDiskParams>(); |
ConverterStorageParamsVolumeCloningParams targetVolume1 = new ConverterStorageParamsVolumeCloningParams(); | |
ConverterStorageParamsTargetDiskParams targetDisk1 = new ConverterStorageParamsTargetDiskParams(); |
ConverterStorageParamsVolumeCloningParams targetVolume2 = new ConverterStorageParamsVolumeCloningParams(); | |
ConverterStorageParamsTargetDiskParams targetDisk2 = new ConverterStorageParamsTargetDiskParams(); |
targetVolume1.sourceVolumeId = "\\WindowsBitmapDriverVolumeId=[C8-BA-43-2A-00-80-00-00-00-00-00-00]"; | |
targetvolumes1.Add(targetVolume1); | |
targetDisk1.volumesToClone = targetvolumes1.ToArray(); | |
targetDisk1.sourceDiskId = "disk-1002"; |
targetVolume2.sourceVolumeId = "\\WindowsBitmapDriverVolumeId=[C8-BA-43-2A-00-80-00-00-0A-00-00-00]"; | |
targetvolumes2.Add(targetVolume2); | |
targetDisk2.volumesToClone = targetvolumes2.ToArray(); | |
targetDisk2.sourceDiskId = "disk-1002"; |
targetdisks.Add(targetDisk1); | |
targetdisks.Add(targetDisk2); |
converterStorageParams.targetDiskParams = targetdisks.ToArray(); | |
converterStorageParams.vmxDatastoreName = "********-datastore01"; |
The job is successfully created and it goes through the same steps from the client Tasks view. I also check vCenter to be sure the right volumes are broken out to separate virtual disks on the target vm.
Once the progress hits 98% the Task view shows the following errors:
Error: An error occurred during reconfiguration.
Warning: Unable to update drive letters for the destination volume layout.
Warning: Unable to update BCD on the destination machine's system volume.
I have perused vmware's KB articles and the best match I have found is this:
Exporting the logs does show a match to what that article describes. However, when checking the source machine's boot config through bcedit I get the following:
Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=C:
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {current}
displayorder {current}
toolsdisplayorder {memdiag}
timeout 30
resume No
Windows Boot Loader
-------------------
identifier {current}
device partition=C:
path \Windows\system32\winload.exe
description Microsoft Windows Server 2008
locale en-US
inherit {bootloadersettings}
osdevice partition=C:
systemroot \Windows
resumeobject {2a1e1d63-0b44-11dd-9c71-dce6a05ee2b0}
nx AlwaysOff
This looks correct. Also the cloning job issued by the client works just fine. It's just issuing what appears to be the same job from the API is causing a problem.