[PVE-User] how to create a snapshot from vm via api2 ?

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Nov 18 08:38:51 CET 2016


On Thu, Nov 17, 2016 at 04:36:31PM +0000, IMMO WETZEL wrote:
> Is that function may be not described at the current api  doc ?

it is ;) are you using the online version[1]?

> I would expect at least three parameter
> node,vmid,snapshotname,description,savevmstate{Boolean}
> 
> cos qm snapshot allow such parameter
> root at prox01:~# qm help snapshot
> USAGE: qm snapshot <vmid> <snapname> [OPTIONS]
> 
>  Snapshot a VM.
> 
>   <vmid>     integer (1 - N)
>              The (unique) ID of the VM.
>   <snapname> string
>              The name of the snapshot.
>   -description string
>              A textual description or comment.
>   -vmstate   boolean
>              Save the vmstate

HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/snapshot
 
CLI: pvesh create /nodes/{node}/qemu/{vmid}/snapshot

node, snapname and vmid are required, and you have the two optional
parameters like with "qm snapshot"


1: http://pve.proxmox.com/pve-docs/api-viewer/index.html




More information about the pve-user mailing list