I need to upload ISO files of appliance builds to a directory on a datastore (currently from the local machine, but in the future I want to go from a network share, or even via a https GET from another server). The API for this seems to be based around a HTTP PUT which seems simple enough with VIExt::http_put_file readily available. However this appears to run very slow, with my 500MB iso only getting uploaded at around 500KB/s.
I rewrote the script entirly without the SDK (having worked out the underlaying URL and using IO::Socket::SSL directly) and got pretty much the same result. I then wrote the same thing in Python (to see if somthing perl was doing was to blame) and got the same results again.
However in the VMware vSphere Client datastore browser, I can upload these ISO's in about 10 seconds each.
So what is the vSphere Client doing differently, and how can I replicate it for my script?