[PATCH cluster] close #4369: make VMID suggestion strategy configurable
Daniel Krambrock
krambrock at hrz.uni-marburg.de
Wed May 22 14:05:51 CEST 2024
Signed-off-by: Daniel Krambrock <krambrock at hrz.uni-marburg.de>
---
src/PVE/Cluster.pm | 1 +
src/PVE/DataCenterConfig.pm | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm
index f899dbe..059c7af 100644
--- a/src/PVE/Cluster.pm
+++ b/src/PVE/Cluster.pm
@@ -84,6 +84,7 @@ my $observed = {
'virtual-guest/profiles.cfg' => 1,
'mapping/pci.cfg' => 1,
'mapping/usb.cfg' => 1,
+ 'used_vmids.list' => 1,
};
sub prepare_observed_file_basedirs {
diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index abd0bbf..1394623 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -337,6 +337,15 @@ my $datacenter_schema = {
format => $next_id_format,
description => "Control the range for the free VMID auto-selection pool.",
},
+ 'next-id-strategy' => {
+ optional => 1,
+ type => 'string',
+ enum => ['next-free', 'max+1', 'list'],
+ default => 'next-free',
+ description => "VMID allocation strategie. 'next-free' returns the lowerst free ID. "
+ ."'max+1' returns the biggerst used ID + 1. "
+ ."'list' returns the lowerst free ID that is not on the list of previously used IDs.",
+ },
migration => {
optional => 1,
type => 'string', format => $migration_format,
--
2.39.2
More information about the pve-devel
mailing list