gyptazy / ProxLB

ProxLB - (Re)Balance VM Workloads Across Nodes in Proxmox Clusters. A Load Balancer for Proxmox - and more!
https://proxlb.de
GNU General Public License v3.0
201 stars 9 forks source link

`Feature`: Support container (CT) for rebalancing #27

Closed gyptazy closed 3 months ago

gyptazy commented 3 months ago

General

It would be great if ProxLB also supports containers. This could lead into a new options where it can be chosen to migrate vm, ct and all for rebalancing.

Of course, we can't perform live migrations of LXC's. Just to keep in mind.

Task

gyptazy commented 3 months ago

General

Add support for Proxmox LXC (container) to be rebalanced across the nodes in a cluster. Should work technically but needs further testing. Also requires a new state in the output json, where the VM/CT type should be flagged.

Details

Output CLI

Example output of migrated VMs (type: vm):

                 VM   Current Node   Rebalanced Node   VM Type
   test06-gyptazy01         virt01            virt02        vm
             test02         virt01            virt03        vm
             test04         virt01            virt02        vm

Example output of migrated CTs (type: ct):

      VM   Current Node   Rebalanced Node   VM Type
   gyp02         virt01            virt02        ct
   gyp01         virt01            virt03        ct

Example output of migrated resources (type all):

                 VM   Current Node   Rebalanced Node   VM Type
   test06-gyptazy01         virt01            virt03        vm
             test02         virt01            virt03        vm
             ct-fat         virt01            virt02        ct

Output JSON

The vm_statistics now contains the new key type that defines the type of the object. Currently, it can be vm (qemu) or ct (LXC).