diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index f9379f64..8c483e63 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -964,7 +964,8 @@ IP addresses use CIDR notation, gateways are optional but need an IP of the same The special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. -For IPv6 the special string 'auto' can be used to use stateless autoconfiguration. +For IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires +cloud-init 19.4 or newer. If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm index 3224dd08..a5474d3e 100644 --- a/PVE/QemuServer/Cloudinit.pm +++ b/PVE/QemuServer/Cloudinit.pm @@ -449,8 +449,8 @@ sub nocloud_network { if ($ip eq 'dhcp') { $content .= "${i}- type: dhcp6\n"; } elsif ($ip eq 'auto') { - # SLAAC is not supported by cloud-init, this fallback should work with an up-to-date netplan at least - $content .= "${i}- type: dhcp6\n"; + # SLAAC is only supported by cloud-init since 19.4 + $content .= "${i}- type: ipv6_slaac\n"; } else { $content .= "${i}- type: static6\n" . "${i} address: '$ip'\n";