The network configuration for configdrive2 is in the format of
/etc/network/interfaces, where the DNS settings are configured with the
'dns-nameservers' and 'dns-search' options in an interface stanza.
But they were written with an underscore instead of a dash, and right
after the stanza of the loopback interface, so cloud-init ignored them
and the configured nameservers and search domains never ended up in the
guest. Just using the correct option names would not be enough, as
cloud-init does not apply the DNS settings of the loopback interface
when rendering the configuration with netplan, for example.
Write the options with a dash and add them to the stanzas of the
statically configured interfaces, like it is already done for the
cloudbase-init configuration.
Signed-off-by: Michal Fox <me@dualfroz.com>
When the last tag of a VM gets removed, for example in the web UI, the
API gets an empty 'tags' value, which then ends up as an empty 'tags:'
line in the config and in the output of 'qm config'. As the config
parser reads that line back as a single space, it also gets written out
again on every following config change.
Skip a tag list without any tag when writing the config, which also
cleans up existing configs with such a line on their next change. The
pending section still needs to keep it, otherwise the removal of all
tags would get lost between writing the pending change and applying it.
Signed-off-by: Michal Fox <me@dualfroz.com>
When hugepages are enabled, each custom NUMA node must be bound to a
single host node. This was checked with a regex that only accepts a
single digit, so any host node from 10 upwards was rejected with a
misleading "more than 1 hostnode value" error, making hugepages
unusable on hosts with more than ten NUMA nodes.
Accept any single node number instead. Ranges and lists are still
rejected as before.
Signed-off-by: Michal Fox <me@dualfroz.com>
Reviewed-by: Max R. Carrara <m.carrara@proxmox.com>
Tested-by: Max R. Carrara <m.carrara@proxmox.com>
Link: https://lore.proxmox.com/20260926084115.7-1-me@dualfroz.com
[TL: add a multi-digit host node case to the memory tests]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
When hugepages are enabled, each custom NUMA node must be bound to a
single host node. This was checked with a regex that only accepts a
single digit, so any host node from 10 upwards was rejected with a
misleading "more than 1 hostnode value" error, making hugepages
unusable on hosts with more than ten NUMA nodes.
Accept any single node number instead. Ranges and lists are still
rejected as before.
Signed-off-by: Michal Fox <me@dualfroz.com>