[pve-devel] [PATCH qemu-server 3/7] add ip options to netdescr

Alexandre Derumier aderumier at odiso.com
Thu Jun 24 15:34:21 CEST 2021


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a5b6fe8..8d1f177 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -910,6 +910,38 @@ my $net_fmt = {
 	description => "Force MTU, for VirtIO only. Set to '1' to use the bridge MTU",
 	optional => 1,
     },
+    ip => {
+	type => 'string',
+	format => 'pve-ipv4-config',
+	format_description => 'IPv4Format/CIDR',
+	description => 'IPv4 address in CIDR format.',
+	optional => 1,
+	default => 'dhcp',
+    },
+    gw => {
+	type => 'string',
+	format => 'ipv4',
+	format_description => 'GatewayIPv4',
+	description => 'Default gateway for IPv4 traffic.',
+	optional => 1,
+	requires => 'ip',
+    },
+    ip6 => {
+	type => 'string',
+	format => 'pve-ipv6-config',
+	format_description => 'IPv6Format/CIDR',
+	description => 'IPv6 address in CIDR format.',
+	optional => 1,
+	default => 'dhcp',
+    },
+    gw6 => {
+	type => 'string',
+	format => 'ipv6',
+	format_description => 'GatewayIPv6',
+	description => 'Default gateway for IPv6 traffic.',
+	optional => 1,
+	requires => 'ip6',
+    },
 };
 
 my $netdesc = {
-- 
2.20.1





More information about the pve-devel mailing list