Thursday, August 4, 2011

Uploading the files to the VMWare ESXi server

Every now and then I need to upload the stuff like an ISO image to my ESXi server.

Since I do not use windows, my only remaining option is the CLI - which is big and clunky. However, today I digged a bit and after reading the CLI tools source realized that uploading the file onto an ESXi host is trivially simple:


  1. Browse the datastores till you get to the correct place, take that URL and append the target file name.
  2. perform the HTTP PUT request for that URL, supplying the data.


This way, the only tool you need to upload the files to VMWare ESXi really is curl:

curl -k -X PUT --data-binary @IMAGE.ISO 'https://user:pass@host/folder/FOLDERNAME/IMAGE.ISO?dcPath=DCNAME&dsName=DATASTORE'

0 comments: