<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font size="3" face="Times New Roman">Hi Everyone, </font><BR><font size="3" face="Times New Roman"></font> <BR><font size="3" face="Times New Roman">Merry Christmas and Happy New Year!</font><BR><font size="3" face="Times New Roman"></font> <BR><font size="3" face="Times New Roman">I'm trying to upload disk to ESX 5.0 server using the URL obtained by the server (during VM installation process); I'm using libcurl support in libvirt to upload the disk, but I get this error on file upload:</font><BR><font size="3" face="Times New Roman">----------------------</font><BR><font size="3" face="Times New Roman">* About to connect() to <ip> port 443 (#1)<br>*   Trying <ip>... * connected<br>* found 153 certificates in /etc/ssl/certs/ca-certificates.crt<br>*        server certificate verification SKIPPED<br>*        compression: NULL<br>*        cipher: AES-128-CBC<br>*        MAC: SHA1<br>> PUT /ha-nfc/52c6d592-7636-67c5-29f3-d5b373be4f42/disk-0.vmdk HTTP/1.1<br>User-Agent: libvirt-esx<br>Host: <ip><br>Accept: */*<br>Cookie: vmware_soap_session="521af33d-2bbe-38aa-21e8-13d474ccb023"<br>Content-Type: text/xml; charset=UTF-8<br>SOAPAction: "urn:vim25"<br>Content-Length: 7021568</font><BR><font size="3" face="Times New Roman">< HTTP/1.1 403 Forbidden<br>< Date: Sun, 30 Dec 2012 01:28:19 GMT<br>< Connection: close<br>< Content-Type: text; charset=plain<br>< Content-Length: 44<br>----------------------<BR><br id="FontBreak">To achieve this operation I've added a routine to support file Upload (for ESX driver as currently it only support buffer upload), I verified its functioning my uploading a file using datastore based URL:<BR>(http(s)//<ip>/file??dcPath=ha-datacenter?dsName=xxx). <BR> <BR>CURL options provided by me are;<BR> <BR>-----------<BR>   curl_easy_setopt(curl->handle, CURLOPT_UPLOAD, 1L); <br>    curl_easy_setopt(curl->handle, CURLOPT_URL, url);<br>    curl_easy_setopt(curl->handle, CURLOPT_READDATA, <data pointer>);<br>    curl_easy_setopt(curl->handle, CURLOPT_INFILESIZE_LARGE,<br>                        (curl_off_t) fileData->size);<br>    curl_easy_setopt(curl->handle, CURLOPT_READFUNCTION,<br>                        <read function>);<br>    curl_easy_setopt(curl->handle, CURLOPT_VERBOSE, 1);<BR>------------------------<BR> <BR>My understanding is there needs to be some tuning done to ESX server to accept this upload operation, please suggest if anyone has faced this issue before. <BR> <BR>Thanks!<BR>Ata<BR></font>                                      </div></body>
</html>