VMware Cloud Community
carl1
Expert
Expert

vcplugin.importOvf() fails with certificate error

OK, took me a while to clue in that vcPlugin.importOvf() only imports ovf, not ova.  File, but how do I import an OVF that is unsigned.  I keep getting a certificate error.  Yes, I am trying to import the vRA Appliance in the below example, but the same thing happens with a VM that I export to OVF form.    I have random appliances coming from users that need to be deployed and I want to automate the process (there is lots of customization to do after the appliance is deployed).  I also want to deploy a vRA lab on-demand.

The OVF used below was created using ovftool to convert from the vRA appliance from OVA to OVF form (which looses the certificate information). 

Most of the Code:

--------

var props = [];

var key = new VcKeyValue();

key.key = "vm.name";

key.value = "myvm7306";

props.push(key);

var networkMap = [];

var map = new VcOvfNetworkMapping();

map.name = "Network 1";

map.network = vmNetwork;

networkMap.push(map);

var path="file:///storage/spool/vRAOVF/VMware-vR-Appliance-7.3.0.536-5610496_OVF10.ovf";

System.log("Importing: " + path + " to host " + vcHost.name + " as VM " + vmShortName);

vm = VcPlugin.importOvf(path, vcHost, infrastructureFolder, vmShortName, networkMap, vcDS, props);

-----------------------------

Results

-------------------

[2018-07-19 20:24:57.918] [I] Importing: file:///storage/spool/vRAOVF/VMware-vR-Appliance-7.3.0.536-5610496_OVF10.ovf to host cnpdcesxd1003 as VM myvm7306

[2018-07-19 20:24:59.403] [E] Error in (Workflow:ImportOVF / Import OVF (item1)#49) java.security.cert.CertificateException: Certificate is not in CA store.

[2018-07-19 20:24:59.415] [E] Workflow execution stack:

--------------------

vRO 7.3

Thanks,

Carl L.

Tags (2)
Reply
0 Kudos
0 Replies