[pve-devel] [PATCH qemu-server] partially revert 4efb58a - unquote configdrive2 ips
Mira Limbeck
m.limbeck at proxmox.com
Mon Mar 25 12:34:44 CET 2019
configdrive2 uses /etc/network/interfaces style config instead of the
official yaml one. this does not allow quoting of the ip addresses.
Tested with Windows Server 2016.
Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
This was an oversight on my part in 4efb58a. This should fix the problem
again. To reproduce it on a windows machine the 'genisoimage' call
requires an additional argument ('-iso-level', '3') for it to be
recognized.
PVE/QemuServer/Cloudinit.pm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm
index 0f8fc7a..e83c0db 100644
--- a/PVE/QemuServer/Cloudinit.pm
+++ b/PVE/QemuServer/Cloudinit.pm
@@ -174,9 +174,9 @@ sub configdrive2_network {
} else {
my ($addr, $mask) = split_ip4($net->{ip});
$content .= "iface $id inet static\n";
- $content .= " address '$addr'\n";
- $content .= " netmask '$mask'\n";
- $content .= " gateway '$net->{gw}'\n" if $net->{gw};
+ $content .= " address $addr\n";
+ $content .= " netmask $mask\n";
+ $content .= " gateway $net->{gw}\n" if $net->{gw};
}
}
if ($net->{ip6}) {
@@ -185,9 +185,9 @@ sub configdrive2_network {
} else {
my ($addr, $mask) = split('/', $net->{ip6});
$content .= "iface $id inet6 static\n";
- $content .= " address '$addr'\n";
- $content .= " netmask '$mask'\n";
- $content .= " gateway '$net->{gw6}'\n" if $net->{gw6};
+ $content .= " address $addr\n";
+ $content .= " netmask $mask\n";
+ $content .= " gateway $net->{gw6}\n" if $net->{gw6};
}
}
}
--
2.11.0
More information about the pve-devel
mailing list