[PATCH qemu-server 1/1] api: add a device label to disk and network interfaces

Yoann Laissus yoann.laissus at gmail.com
Wed Aug 3 21:08:24 CEST 2022


close #2672

Signed-off-by: Yoann Laissus <yoann.laissus at gmail.com>
---
 PVE/QemuServer.pm       | 7 +++++++
 PVE/QemuServer/Drive.pm | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 7d9cf22..2be6ef3 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -905,6 +905,13 @@ my $net_fmt = {
 	description => "MAC address. That address must be unique withing your network. This is"
 	    ." automatically generated if not specified.",
     }),
+    device_label => {
+	type => 'string',
+	description => "A user defined device label.",
+	typetext => 'My custom label',
+	format => 'dns-name',
+	optional => 1
+    },
     model => {
 	type => 'string',
 	description => "Network Card Model. The 'virtio' model provides the best performance with"
diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 1dc6171..38318e9 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -54,6 +54,13 @@ my %drivedesc_base = (
 	default => 'disk',
 	optional => 1
     },
+    device_label => {
+	type => 'string',
+	description => "A user defined device label.",
+	typetext => 'My custom label',
+	format => 'dns-name',
+	optional => 1
+    },
     cyls => {
 	type => 'integer',
 	description => "Force the drive's physical geometry to have a specific cylinder count.",
-- 
2.37.1





More information about the pve-devel mailing list