[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] Snapshot Download of Slave node VMs fails .



Hi all ,

I am working on a backup solution for Xen . We use your API to create a snapshot of a VM and then we download the file using curl and the URL supplied to curl library is of the form  "http://192.168.0.248/export?uuid=439997cb-19ac-5d19-90b4-ec6a7454df8f"  . The download works fine except  in the case of a Xen Pool configuration .

That it works for The VMs of the master node . Only when snapshots of Slave nodes are encountered using the master node IP in the URL , a redirection initially takes place and then an unauthorized error  is recieved .

Code :
curl_easy_setopt(curlHandle, CURLOPT_SSL_VERIFYPEER, 0);            // No Need to verify the SSL certificate
    curl_easy_setopt(curlHandle, CURLOPT_SSL_VERIFYHOST, 0);
    curl_easy_setopt(curlHandle, CURLOPT_CUSTOMREQUEST, "GET");            //set method of getting values
    curl_easy_setopt(curlHandle, CURLOPT_URL, _urlPathName.c_str());     // Here _urlPathName="http://192.168.0.248/export?uuid=439997cb-19ac-5d19-90b4-ec6a7454df8f"
    curl_easy_setopt(curlHandle, CURLOPT_VERBOSE, 0);                    // 1- for debug
    curl_easy_setopt(curlHandle, CURLOPT_USERPWD, authKey.c_str());        // set credentials
    curl_easy_setopt(curlHandle, CURLOPT_FOLLOWLOCATION ,true);
    curl_easy_setopt(curlHandle, CURLOPT_WRITEFUNCTION, ClientBackupObject::ReadAndSendData);
    curl_easy_setopt(curlHandle, CURLOPT_WRITEDATA, this);                // fourth argument
 
   curl_easy_perform(curlHandle);
  
  Should I make any configuration changes to curl or a change to the URL ? DO you have any API calls to download the file ? please help me out on this


 

Thanks,
Shafi,
Vembu Technologies.

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.