Hi,
I'm trying to import a multi-vm vApp using PowerCLI. Obviously, I can use Import-vApp to import the vApp and put it on the correct host and datastore. However, the vApp has a lot of pre-defined OVF Environment settings (guest name, IP settings, VM Network etc) that need to be entered before deployment.
Any idea how I can pass these parameters into a PowerCLI command / script?
Thanks,
Ben
I'm afraid there are currently no cmdlets for that.
The alternative is to use the ovfManager and it's methods.
The ParseDescriptor should produce all the additional properties and once you have those you should be able to call the ImportVAPP method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I was afraid of that!
I'm trying to call ParseDescriptor with Orchestrator. Is there a way of doing it with PowerCLI?
Sure, try something like this
$ovfMgr = Get-View ovfManager[string]
$descriptor = Get-Content "C:\Temp\Orchestrator\vCO_VA-4.2.0.1-507352_OVF10.ovf"
$pdp = New-Object VMware.Vim.OvfParseDescriptorParams
$pdp.Locale = ""
$pdp.deploymentOption = ""
$result = $ovfMgr.ParseDescriptor($descriptor,$pdp)
In $result.Property you will now find all the user configurable parameters.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD.
How can I then use this to import the vApp? Can the result be piped into the Import-Vapp cmdlet, or do I need to use another API call, such as importVapp.
Yes, it can.
And I had a working script for this, but it seems that there is a flaw in the current Get-View cmdlet that doesn't allow one to read the HttpNfcLease anymore.
I'll investigate further.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have the same question.. Any findings?
I'm afraid not :smileycry:
Dev agreed it was a bug, but no solution till now.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference