]> git.proxmox.com Git - pve-ha-manager.git/blobdiff - src/PVE/HA/Resources/PVECT.pm
resources: pve: avoid relying on internal configuration details
[pve-ha-manager.git] / src / PVE / HA / Resources / PVECT.pm
index e77d98ccb0227c523076b530cd8373558576e255..6e1469215975e038cb0833e006fae6211dd740bc 100644 (file)
@@ -158,8 +158,8 @@ sub get_static_stats {
     my $conf = PVE::LXC::Config->load_config($id, $service_node);
 
     return {
-       maxcpu => $conf->{cpulimit} || $conf->{cores} || 0,
-       maxmem => ($conf->{memory} || 512) * 1024 * 1024,
+       maxcpu => PVE::LXC::Config->get_derived_property($conf, 'max-cpu'),
+       maxmem => PVE::LXC::Config->get_derived_property($conf, 'max-memory'),
     };
 }