Clone multiple vms from a template at the same time (Proxmox API)

silenzer

New Member
May 31, 2023
13
0
1
Is it possible that you can clone a vm or a template multiple times at the same time?

And if yes what parameter must i use in this python request.

HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/clone

And if no what would be the best way to achieve to clone a template or a vm multiple times? with a loop?

A code snippet would really help in both case.
 
No, unfortunately it's not possible.

You could allways write a simple bash script like
Code:
#!/bin/bash
for i in "${@:2}"
do
    qm clone $1 $i
done

then you could clone like
Code:
./myscript.sh <original_vmid> <copy_id_1> <copy_id_2> ....
 
Last edited:
  • Like
Reactions: thiagotgc