[pve-devel] [PATCH container 4/7] start: handle pool limits
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Apr 10 15:13:02 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 78c0e18..08f4425 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2586,6 +2586,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