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

Dietmar Maurer dietmar at proxmox.com
Fri Apr 20 05:59:37 CEST 2012


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/ee66ff26/attachment.htm>


More information about the pve-devel mailing list