Hello All,
I was wondering is there a way to do automatic deployments (imports) of ovf/ova files with just JavaScript or with the vsphere API? I know there is a plugin but I am worried about the ongoing support so I was wondering if anybody leveraged any other solutions
Yes, assuming it is copied on the file system of vRO appliance in a directory the vRO scripting has execution permissions for, you should be able to run it using Command scripting class (check vRO API Explorer for documentation about this scripting class).
Hi,
One possible option could be the official VMware OVF Tool - https://code.vmware.com/web/tool/4.3.0/ovf
Can you call this tool from vRO?
Yes, assuming it is copied on the file system of vRO appliance in a directory the vRO scripting has execution permissions for, you should be able to run it using Command scripting class (check vRO API Explorer for documentation about this scripting class).
So just so I am understanding what you are saying could be a good solution is to use the ovftool, download the linux version, install it in a place where vRO has execution permissions for and then use the command scripting class?
Yes, something like that.
An alternative approach to using the ovftool is to try to deploy OVF from vCenter Content Library, utilizing vRO vAPI plug-in. Check for example the following thread https://communities.vmware.com/thread/558854 which could be a good starting point. But this is likely more complex approach and will require more code than the simple execution of ovftool.
Thanks a lot this will give me two options as I work with the customer. I was able to install the ovftool though and I am able to run commands so I am going to lead towards that way
Hey,
I have a question I am getting a 255 result code when I try and run the ovftool commands:
Code:
// Prepare Command line and parameters to execute:
cmd = "ovftool --help";
System.log("executing cmd: " + cmd);
// Create and execute the command:
var command = new Command(cmd);
command.execute(true);
// Display command results and output
var scriptResult = command.result;
System.log("Script Result: " + scriptResult);
var scriptOutput = command.output;
System.log("Script Output: " + scriptOutput)
Results:
[2019-10-25 11:15:32.999] [I] executing cmd: ovftool --help
[2019-10-25 11:15:33.212] [I] Script Result: 255
[2019-10-25 11:15:33.213] [I] Script Output:
Could you check if it works if the full path to ovftool is provided, that is, the command string to be something like
cmd = "/full/path/to/ovftool --help";
Update: I tried your code on one of my machines (vRO 7.6 + ovftool 4.2.0), and it seems to work - I got status code 0 and some text describing the usage of the tool.
Hello,
yea I was able to get it to work turned out there was some issue with the vRO server and I was able to fix that