VMware Cloud Community
Murugan003
Contributor
Contributor

Unable to Upload vmdk file to Vmware datastore using HTTP in .net

Hi,

I am new to this forum. I am trying to upload the VMDK files from local system to VMWare datastore folder using Http control in C#.net. I can download the files from VMWare/ESX host using Http <e.g https://192.168.11.30/folder/Vidhya/Vidhya_3-flat.vmdk?dcPath=DCenter1&dsName=datastore1> to local system. but when i try to upload the file using same URL in http control in .net. It throws an exception " remote server return an exception (400) Bad Request". How can I Upload the file to VMware using .net:smileyplain:

Regards,

Murugan

Tags (3)
0 Kudos
3 Replies
zXi_Gamer
Virtuoso
Virtuoso

Hi and welcome to the communities,

Hmmmm.. quite an intriguing post I have to say.

I haven't seen or used to upload files to the datastore browser of the ESX server using HTTP. While downloading does support from browser, can you check if you can upload the file to the datastore using browser. Not using the .net, but just from the browser.

i dont think so that option is available.,, at least to me :smileysilly: which could explain the error message you are getting. The request is not recoginzed by the small http server running in the ESX.

What you can do is use the .net framed Powercli to upload the files in the datastores of the servers..

0 Kudos
iliyatz
Enthusiast
Enthusiast

Hi

I am also tring to upload files to data store can u pls help if u sucsseded

Thx

0 Kudos
CodeInDXY
Contributor
Contributor

  I try to upload vmdk file to datastore, but I dont kown with what method (api) to Implement it。

Do you have any good idea for me ?

thanks.

0 Kudos