[pve-devel] [PATCH v2 container 4/7] start: handle pool limits
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Apr 16 14:20:40 CEST 2024
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
src/PVE/LXC.pm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 9b03a97..1856b6a 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2577,6 +2577,14 @@ sub vm_start {
update_lxc_config($vmid, $conf);
+ my $usage = PVE::LXC::Config->get_pool_usage($conf);
+ PVE::GuestHelpers::check_guest_pool_limit($vmid, {
+ absolute => 1,
+ running => 1,
+ mem => $usage->{mem},
+ cpu => $usage->{cpu},
+ });
+
eval {
my ($id_map, undef, undef) = PVE::LXC::parse_id_maps($conf);
PVE::LXC::validate_id_maps($id_map);
--
2.39.2
More information about the pve-devel
mailing list