From 5021bad4602704d30834d281a0abfd9145376364 Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Fri, 25 Sep 2026 11:27:21 +0200 Subject: [PATCH] fix #6907: memory: allow multi-digit host nodes with hugepages When hugepages are enabled, each custom NUMA node must be bound to a single host node. This was checked with a regex that only accepts a single digit, so any host node from 10 upwards was rejected with a misleading "more than 1 hostnode value" error, making hugepages unusable on hosts with more than ten NUMA nodes. Accept any single node number instead. Ranges and lists are still rejected as before. Signed-off-by: Michal Fox --- src/PVE/QemuServer/Memory.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/QemuServer/Memory.pm b/src/PVE/QemuServer/Memory.pm index 27738cd..9b7c24f 100644 --- a/src/PVE/QemuServer/Memory.pm +++ b/src/PVE/QemuServer/Memory.pm @@ -640,7 +640,7 @@ sub hugepages_topology { my $hostnodes = print_numa_hostnodes($hostnodelists); die "more than 1 hostnode value in numa node is not supported when hugepages are enabled" - if $hostnodes !~ m/^(\d)$/; + if $hostnodes !~ m/^\d+$/; my $hugepages_size = hugepages_size($conf, $numa_memory); $hugepages_topology->{$hugepages_size}->{$hostnodes} += hugepages_nr($numa_memory, $hugepages_size);