How to migrate all VMS from a Server to some host which has enough resources ?

adoII

Renowned Member
Jan 28, 2010
174
17
83
Hi,

I have some machines in a Proxmox Cluster.

Sometimes I need to take down a Proxmox Server for Maintenance or updates.

Today I do some scripting like
for vmid in 100 103 105 109;do
qm migrate $vmid someserver -online
done

This is a manual process and I would like very much a script that finds out which vms are running on the machine I want to take down and then to relocate the vms to some other hosts which have enough resources which means the script should validate how much free ram the other Proxmox Servers have.

Before I reinvent the wheel: Has anybody scripted things like that ? Will such logic be implemented in proxmox in the near future ? Does somebody have an idea how this could easily be implemented ?

Thanks
Christoph
 
+1 for the idea

NB - you'd need to also check that the server has a compatible processor as well as enough RAM - i run a mixture of AMD and intel servers each design to failover to another server with the same specifications.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!