Create bulk VM`s

danielt

New Member
Sep 5, 2022
16
0
1
Hi,
There is a way to create a bulk of VM`s?
Also, is a to change their IP`s via cli? like in VirtualBox using the vbmanager?
Thanks
 
There is a way to create a bulk of VM`s?
There are many ways. Details depend on your requirements.

You can use a for-loop with "qm" :
for i in {1..5}; do qm create $i [options]; done

You can utilize template and do linked clones.

You can combined the two above and add CloudInit for better control of deployment.

Also, is a to change their IP`s via cli? like in VirtualBox using the vbmanager?
Depends on how you assign the IP, if its static - best to use CloudInit. You can also utilize qemu agent and a few other ways.

In short : its Linux there are probably a thousand ways to do what you want.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Hi @bbgeek17
thanks for your replay. to create VM`s I used qm clone.
How I using cli to configure network via qemu agent? this is more important to me.
Thanks
 
i didnt see any network config
did you familiar with that?
There is no single user-friendly command to do what you want via agent, because thats not the purpose that agent is normally used for.
As I said, you'd need to get creative.
If you plan to use qemu agent that means your VM is up. If your VM is up - you can either access console via "qm terminal" or ssh into it.
If you insist on using qemu agent - look into "qm guest exec " with "--pass-stdin <boolean>" option. Find a way to pass through a sequence for execution that does what you want.

If I was doing it, I'd be using cloud-init or dhcp...


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Hi,
I installed the cloud-init. but for some reason it`s ignore the network configuriation.