We have a need to programmatically upload a file (200 - 300MB range) to a particular datastore in vcenter just using vcenter credentials. We are using the publicly documented HTTP access (http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.pg.doc_50%2FPG_ChC_Http_Access.21.3.html) to achieve this and we have a functionally working and stable solution. However the problem is in the performance. Our code is taking at-least 5x times more than the same file upload done using vsphere client. For instance in one of our experiments, vsphere client UI takes a minute to upload an iso and our code takes 4+ minutes to upload the same iso to the same datastore from the same client machine.
On further investigation, we noticed that vsphere client is NOT using the same HTTP access to upload the file. They seem to be using some internal and undocumented ways to upload the file to a datastore. This is unfortunate and disappointing of vmware which I thought is platform oriented company.
Their traffic is over SSL and it’s hard to reverse engineer. So our hope is for someone to tell us if there is a better (more performant) way to achieve datastore-file-upload and more specifically if we can mimic what vsphere client is doing…
We have following constraints
Our product integrates with vcenter and we only have credentials for vcenter. We do NOT have credentials for individual hypervisors (esx, esxi)
- So we can’t do things like enable ssh or anything directly on hypervisors…
- Most of the online content is complaining about file upload performance offered by vmware tools such as vsphere client. Our problem is the realtive performance we are getting using public APIs is much worse than vsphere client. We are quite happy with vsphere client performance at the moment
- We have to achieve this programmatically
- So we can’t do things like enable ssh or anything directly on hypervisors…
Any help is greatly appreciated.