VMware Cloud Community
binoche
VMware Employee
VMware Employee

how to import ovf from www using powercli?

Hi folks,

as I know Import-VApp can import existing ovf to my vc/vsphere and its ovf must be local to windows for example -Source "c:\vApps\WebServer\WebServer.ovf",

but the source could be from www for example http://www.foo.com/samplevm.ovf, so far I have to download samplevm.ovf locally to windows and them import-vapp to import it,

I learned ovftool.exe can do this job but could powercli import from www to my vsphere without downloading locally? really appreciate!

Simon

Tags (2)
0 Kudos
6 Replies
LucD
Leadership
Leadership

Afaik that is currently not possible, see also Deploy OVF template using Import-vApp -Source from Datastore?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
binoche
VMware Employee
VMware Employee

thank you sir,

when using vCenter, the import wizard can work with both local windows path and the www url, so I was wondering there could be one api powercli can use?

Simon

0 Kudos
LucD
Leadership
Leadership

Yes, that is what I mentioned in that other thread.

You will first have to obtain the OVF Descriptor, with the Descriptor you call the CreateImportSpec method.

Then you call the regular ImportVApp method. Via the Status in the returned HttpNfcLease object you can follow the progress of the import.

I have a script that uses this technique to import a local OVF file, but for an OVF via an URL I'm still struggling with certificates, proxies and firewalls I'm afraid.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

binoche
VMware Employee
VMware Employee

thank you Sir, could you please post the script importing local ovf file? it still can teach me a lot, thanks

Simon

0 Kudos
LucD
Leadership
Leadership

Drop me an email (link on my blog).
The script is still very raw, don't want to make it public yet :smileygrin:


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
binoche
VMware Employee
VMware Employee

just send it in e-mail, thank you Sir,

Simon

0 Kudos