[pve-devel] Format of "ostemplate" value in Prox 2.0 API

Nathan Sullivan nathan.sullivan at netsip.com.au
Fri Apr 20 06:16:46 CEST 2012


Thanks for that, this worked perfectly.

For your info, I have started work on a PHP client to the REST/JSON API, see https://github.com/CpuID/pve2-api-php-client for the progress so far... :)

I believe all the methods should work, just need to test DELETE and PUT next...

Regards,


Nathan Sullivan
Voice Specialist
NetSIP pty ltd – An Impirical Company
Level 3, 24 Little Edward St, Spring Hill QLD 4000
t    1300 638 747
e   nathan.sullivan<mailto:nathan.sullivan at netsip.com.au>@netsip.com.au<mailto:nathan.sullivan at netsip.com.au>     www.netsip.com.au<http://www.netsip.com.au>

________________________________
From: Dietmar Maurer [dietmar at proxmox.com]
Sent: Friday, 20 April 2012 1:59 PM
To: Nathan Sullivan; pve-devel at pve.proxmox.com
Subject: RE: Format of "ostemplate" value in Prox 2.0 API

Use the following command to list templates:

# pvesm list local --content vztmpl

Format is something like: ${storageid}:vztmpl/${filename}

- Dietmar

From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-bounces at pve.proxmox.com] On Behalf Of Nathan Sullivan
Sent: Freitag, 20. April 2012 02:48
To: pve-devel at pve.proxmox.com
Subject: [pve-devel] Format of "ostemplate" value in Prox 2.0 API

Hi Guys,

Trying to utilise the Proxmox 2.0 REST API, by POSTing to /api2/json/nodes/vz1/openvz (vz1 being the node name) to create a new OpenVZ container. Cannot seem to get the correct syntax for "ostemplate", can someone please clarify the format?

See below for an example HTTP response:

HTTP/1.1 500 unable to parse directory volume name '/var/lib/vz/template/cache/debian-6.0-standard_6.0-4_amd64.tar.gz'
Date: Thu, 19 Apr 2012 23:43:36 GMT
Server: Apache
Pragma: no-cache
Cache-control: no-cache
Content-Length: 170
Connection: close
Content-Type: text/plain; charset=iso-8859-1
Expires: Thu, 19 Apr 2012 23:43:36 GMT

I have tried various formats, including "local:debian-6.0-standard_6.0-4_amd64.tar.gz" and "local:/var/lib/vz/template/cache/debian-6.0-standard_6.0-4_amd64.tar.gz" but can't quite put my finger on it. The documentation doesnt clarify the input format.

Regards,

Nathan Sullivan
Voice Specialist
NetSIP pty ltd – An Impirical Company
Level 3, 24 Little Edward St, Spring Hill QLD 4000
t    1300 638 747
e   nathan.sullivan<mailto:nathan.sullivan at netsip.com.au>@netsip.com.au<mailto:nathan.sullivan at netsip.com.au>     www.netsip.com.au<http://www.netsip.com.au>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20120420/7c16ce0b/attachment.htm>


More information about the pve-devel mailing list