[PVE-User] Clone a qemu template with API in HTTP

Kevin Lemonnier lemonnierk at ulrar.net
Thu Mar 2 16:48:48 CET 2017

> I use this command :
> curl --silent --insecure --cookie "$(<~/cookie)" --header "$(<~/csrftoken)"
> -X POST --data name=dzr-mythugvm-01 --data newid=1001 --data
> target=proxmox-03 --data pool=Infra
> https://proxmox-01:8006/api2/json/nodes/proxmox-01/qemu/1000/clone

Here is how I create a full clone, for information :

/usr/bin/pvesh create "/nodes/${NODE}/qemu/${TPLID}/clone" -full -newid "${VMID}" -name "${_NAME}" >/dev/null 2>/dev/null

Now I run that on the node directly, but it works pretty well, and
I find it easier to use ssh to control access than proxmox users, at least
for this.

Kevin Lemonnier
PGP Fingerprint : 89A5 2283 04A0 E6E9 0111
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://lists.proxmox.com/pipermail/pve-user/attachments/20170302/9513660b/attachment.sig>

More information about the pve-user mailing list