Hi,
I ran into an issue where attempting to apply a customization specification from vCenter it will say it cannot decrypt the password.
I pass in a specName (string), sdkConnection (sdkConnection), and a vmToCustomize (VirtualMachine):
Header 1 |
---|
var cms = sdkConnection.customizationSpecManager; var customSpecExists = cms.doesCustomizationSpecExist(specName); if (customSpecExists){ var customSpecItem = cms.getCustomizationSpec(specName); customSpec = customSpecItem.spec; customizeTask = vmToCustomize.customizeVM_Task(customSpec); } else { throw "Customization spec not found" + specName ; }
// wait for customization to complete var progress = true; var pollRate = 10; actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(customizeTask,progress,pollRate); |
And I get back the following error:
[2014-10-02 16:58:22.875] [I] Task 'CustomizeVM_Task' error: The vCenter Server is unable to decrypt passwords stored in the customization specification. (Dynamic Script Module name : vim3WaitTaskEnd#20)
I found the workaround for vCenter itself where I use plaintext password storage (export customization spec from vcenter as xml, edit the xml plaintext=true and replace hash with a plaintext password, import it back into vcenter) which is a little kludgy because any further edits to the spec set it back to encrypted. Is there another solution that anyone knows of?
Thanks,
Clayton