Clone VMs in Proxmox Cluster from template simultaniously

speedgaze

Member
Sep 15, 2021
5
0
6
52
Hi

I have a 8 node cluster with a shared NFS storage for VM Templates and VM Images.
I would like to spin-off multiple VMs from a template on every node of the cluster.
Currently we are using a basic bash script with for loop to spin VM which is very sequential and time consuming.

Is there a way to spin VMs from a template on multiple nodes simultaneously. Typical scenario would be -
We have 1 VMTemplate - say with VMID - 1000, and want to spin-off say 10 VMs per node and on 8 nodes simultaneously. So there will be total of 80 VMs to spin-off.

Kindly advise.
 
To expand my question -
ON master node, i have my templates, when we have to spin VMs, we do following.
qm clone <VM ID> <New VM ID> --target <NODE02 in CLUSTER>
qm set <set parameters like CPU, RAM etc>
ssh to NODE02; qm start <New VM ID>
My question was, when templetes are on 1 NODE, how do i spin-off servers in Node 2 to 8 in a cluster concurrently?
 
My question was, when templetes are on 1 NODE, how do i spin-off servers in Node 2 to 8 in a cluster concurrently?
The answer is in the first two messages of the above mentioned thread : there is a global lock issued during clone operation, so only one clone at a time is possible.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox