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
138 stars 6 forks source link

feature(core): Add support for LXC/Container to be rebalanced. #28

Closed gyptazy closed 1 month ago

gyptazy commented 1 month ago

feature(core): Add support for LXC/Container to be rebalanced.

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).

Fixes: #27