/* create ovf descriptor */
ovfDescriptor = escapeSpecialChars(ovfDescriptor);
//logger_.info("ovfDesc: " + ovfDescriptor);
ResourcePool rp = ((ComputeResource) host.getParent()).getResourcePool();
logger_.fine(String.format("vmname: %s\n" +
"resourcepool: %s\n" +
"host:%s\n" +
"datastore:%s\n",
newVmName,
rp.getName(),
host.getName(),
datastore.getName()));
OvfCreateImportSpecResult ovfImportResult = null;
HttpNfcLease httpNfcLease = null;
/* create import spec */
ovfImportResult =
conn_.getServiceInstance().getOvfManager().createImportSpec
(ovfDescriptor, rp, datastore, importSpecParams);
/* import execution */
try {
httpNfcLease =
rp.importVApp(ovfImportResult.getImportSpec(), vmFolder, host);
} catch (Exception e) {
logger_.warning("importVapp failed.");
throw e;
}