[pve-devel] [PATCH qemu-server 1/12] fix #4225: qemuserver: drive: add optional required parameter

Daniel Herzig d.herzig at proxmox.com
Fri Oct 25 17:02:32 CEST 2024


Add parameter to allow for marking a drive as required.

Signed-off-by: Daniel Herzig <d.herzig at proxmox.com>
---
 PVE/QemuServer/Drive.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 6e98c095..c80c0f07 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -154,7 +154,14 @@ my %drivedesc_base = (
 	verbose_description => "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!",
 	optional => 1,
 	default => 0,
-    }
+    },
+    required => {
+	type => 'boolean',
+	description => 'Mark this iso volume as required for booting the VM.',
+	verbose_description => 'If unset or set to 1, and the iso file is unavailable, the VM will not start.\nThis parameter is considered for cdrom iso drives only.',
+	optional => 1,
+	default => 1,
+    },
 );
 
 my %iothread_fmt = ( iothread => {
-- 
2.39.5





More information about the pve-devel mailing list