* [PATCH installer 0/2] align generated vlan-interface config with our docs
@ 2026-11-24 9:39 Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 1/2] network: align VLAN interface names with the documentation Stoiko Ivanov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2026-11-24 9:39 UTC (permalink / raw)
To: pve-devel
noticed that the generated config if the installer has a vlan-id provided
results in vlanX and vlan-raw-device added.
As I usually use the dot notation $iface.X I checked our docs:
https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#_vlan_on_the_host
I think the issue is mostly cosmetic - but having the generated config
aligned with our docs (and not offering multiple versions in our docs)
should help to avoid confusion (thinking of the boot-loaders, where
we actually need to have multiple versions and the resulting questions
on our support channels).
minimally tested by installing the updated proxmox-installer package
in a VM with the installer booted in debug mode.
Stoiko Ivanov (2):
network: align VLAN interface names with the documentation
network: drop unneded vlan-raw-device
Proxmox/Install.pm | 4 +--
test/generate-ifupdown2-config.pl | 52 +++++++++++++------------------
2 files changed, 23 insertions(+), 33 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH installer 1/2] network: align VLAN interface names with the documentation
2026-11-24 9:39 [PATCH installer 0/2] align generated vlan-interface config with our docs Stoiko Ivanov
@ 2026-11-24 9:39 ` Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 2/2] network: drop unneded vlan-raw-device Stoiko Ivanov
2026-11-24 10:24 ` [PATCH installer 0/2] align generated vlan-interface config with our docs Stefan Hanreich
2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2026-11-24 9:39 UTC (permalink / raw)
To: pve-devel
our documentation has relied on ifupdown(2)'s way of handling
$iface.$vid as identifier for VLAN interfaces for a long while
(looking through pve-docs commit history shows `vlan-raw-device`
only occurring in the api-viewer)
Sticking to our documentation should help reducing the different
ways that people are configuring their interfaces and thus hopefully
the potential for errors.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
Proxmox/Install.pm | 4 +--
test/generate-ifupdown2-config.pl | 42 +++++++++++++++----------------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index 76bfd04..337f0d7 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -887,9 +887,9 @@ sub generate_ifupdown2_config {
my $get_vlan_stanza = sub {
my ($raw_device) = @_;
- my $config = "auto vlan$vlan_id\niface vlan$vlan_id $ntype static\n\taddress $cidr\n";
+ my $config = "auto $raw_device.$vlan_id\niface $raw_device.$vlan_id $ntype static\n\taddress $cidr\n";
$config .= "\tgateway $gateway\n" if !$is_gateway6_from_ra;
- return [4, "vlan$vlan_id", $config . "\tvlan-raw-device $raw_device\n"];
+ return [4, "$raw_device.$vlan_id", $config . "\tvlan-raw-device $raw_device\n"];
};
if ($iso_env->{cfg}->{bridged_network} && defined($vlan_id)) {
diff --git a/test/generate-ifupdown2-config.pl b/test/generate-ifupdown2-config.pl
index a3b7bdb..b33f7a7 100755
--- a/test/generate-ifupdown2-config.pl
+++ b/test/generate-ifupdown2-config.pl
@@ -152,8 +152,8 @@ is_generated(
auto eno1
iface eno1 inet manual
-auto vlan5
-iface vlan5 inet static
+auto eno1.5
+iface eno1.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device eno1
@@ -194,8 +194,8 @@ iface bond0 inet manual
bond-miimon 100
bond-mode active-backup
-auto vlan5
-iface vlan5 inet static
+auto bond0.5
+iface bond0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device bond0
@@ -244,8 +244,8 @@ iface vmbr0 inet manual
bridge-vlan-aware yes
bridge-vids 2-4094
-auto vlan5
-iface vlan5 inet static
+auto vmbr0.5
+iface vmbr0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device vmbr0
@@ -304,8 +304,8 @@ iface vmbr0 inet manual
bridge-vlan-aware yes
bridge-vids 2-4094
-auto vlan5
-iface vlan5 inet static
+auto vmbr0.5
+iface vmbr0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device vmbr0
@@ -323,8 +323,8 @@ iface eno1 inet manual
iface eno2 inet manual
-auto vlan5
-iface vlan5 inet static
+auto eno1.5
+iface eno1.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device eno1
@@ -347,8 +347,8 @@ iface bond0 inet manual
bond-miimon 100
bond-mode active-backup
-auto vlan5
-iface vlan5 inet static
+auto bond0.5
+iface bond0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device bond0
@@ -363,8 +363,8 @@ is_generated(
auto eno1
iface eno1 inet manual
-auto vlan5
-iface vlan5 inet static
+auto eno1.5
+iface eno1.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
vlan-raw-device eno1
@@ -749,8 +749,8 @@ iface bond0 inet6 manual
bond-miimon 100
bond-mode active-backup
-auto vlan5
-iface vlan5 inet6 static
+auto bond0.5
+iface bond0.5 inet6 static
address 2001:db8::1/64
gateway fe80::1
vlan-raw-device bond0
@@ -797,8 +797,8 @@ is_generated(
auto eno1
iface eno1 inet6 manual
-auto vlan5
-iface vlan5 inet6 static
+auto eno1.5
+iface eno1.5 inet6 static
address 2001:db8::1/64
vlan-raw-device eno1
@@ -822,8 +822,8 @@ iface vmbr0 inet6 manual
bridge-vlan-aware yes
bridge-vids 2-4094
-auto vlan5
-iface vlan5 inet6 static
+auto vmbr0.5
+iface vmbr0.5 inet6 static
address 2001:db8::1/64
vlan-raw-device vmbr0
EOT
@@ -834,7 +834,7 @@ set_config(bridge => 0, bond => 0, vlan => 1);
Proxmox::Install::Config::merge({ mngmt_vlan => { enabled => 1, vid => 200 } });
like(
Proxmox::Install::generate_ifupdown2_config(),
- qr/^iface vlan200 inet6 static\n\taddress 2001:db8::1\/64\n\tgateway fe80::1\n/m,
+ qr/^iface eno1.200 inet6 static\n\taddress 2001:db8::1\/64\n\tgateway fe80::1\n/m,
'management VLAN other than the installation environment one gets the configured gateway',
);
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH installer 2/2] network: drop unneded vlan-raw-device
2026-11-24 9:39 [PATCH installer 0/2] align generated vlan-interface config with our docs Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 1/2] network: align VLAN interface names with the documentation Stoiko Ivanov
@ 2026-11-24 9:39 ` Stoiko Ivanov
2026-11-24 10:24 ` [PATCH installer 0/2] align generated vlan-interface config with our docs Stefan Hanreich
2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2026-11-24 9:39 UTC (permalink / raw)
To: pve-devel
with the previous patch using $iface.$vid the vlan-raw-device and
vlan-id setting should not be needed anymore based on my experience.
fwiw ifupdown-addons-interfaces(5) agrees, but also says, that
if you don't use the dot notation you need to provide both
vlan-raw-device _and_ vlan-id (which does not match my experience).
Sending as separate patch - on the chance that I missed some
combination where vlan-raw-device and(/or) vlan-id are needed/make
sense.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
Proxmox/Install.pm | 2 +-
test/generate-ifupdown2-config.pl | 10 ----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index 337f0d7..d20777e 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -889,7 +889,7 @@ sub generate_ifupdown2_config {
my $config = "auto $raw_device.$vlan_id\niface $raw_device.$vlan_id $ntype static\n\taddress $cidr\n";
$config .= "\tgateway $gateway\n" if !$is_gateway6_from_ra;
- return [4, "$raw_device.$vlan_id", $config . "\tvlan-raw-device $raw_device\n"];
+ return [4, "$raw_device.$vlan_id", $config];
};
if ($iso_env->{cfg}->{bridged_network} && defined($vlan_id)) {
diff --git a/test/generate-ifupdown2-config.pl b/test/generate-ifupdown2-config.pl
index b33f7a7..a76c618 100755
--- a/test/generate-ifupdown2-config.pl
+++ b/test/generate-ifupdown2-config.pl
@@ -156,7 +156,6 @@ auto eno1.5
iface eno1.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device eno1
iface eno2 inet manual
EOT
@@ -198,7 +197,6 @@ auto bond0.5
iface bond0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device bond0
auto eno1
iface eno1 inet manual
@@ -248,7 +246,6 @@ auto vmbr0.5
iface vmbr0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device vmbr0
EOT
, 'host network setup',
);
@@ -308,7 +305,6 @@ auto vmbr0.5
iface vmbr0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device vmbr0
EOT
, 'host network setup',
);
@@ -327,7 +323,6 @@ auto eno1.5
iface eno1.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device eno1
EOT
, 'interfaces ordered like the network API',
);
@@ -351,7 +346,6 @@ auto bond0.5
iface bond0.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device bond0
EOT
, 'interfaces ordered like the network API',
);
@@ -367,7 +361,6 @@ auto eno1.5
iface eno1.5 inet static
address 192.168.0.10/24
gateway 192.168.0.1
- vlan-raw-device eno1
iface eno2 inet manual
EOT
@@ -753,7 +746,6 @@ auto bond0.5
iface bond0.5 inet6 static
address 2001:db8::1/64
gateway fe80::1
- vlan-raw-device bond0
auto eno1
iface eno1 inet6 manual
@@ -800,7 +792,6 @@ iface eno1 inet6 manual
auto eno1.5
iface eno1.5 inet6 static
address 2001:db8::1/64
- vlan-raw-device eno1
iface eno2 inet6 manual
EOT
@@ -825,7 +816,6 @@ iface vmbr0 inet6 manual
auto vmbr0.5
iface vmbr0.5 inet6 static
address 2001:db8::1/64
- vlan-raw-device vmbr0
EOT
, 'gateway learned from router advertisements on the management VLAN on a bridge is not configured',
);
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH installer 0/2] align generated vlan-interface config with our docs
2026-11-24 9:39 [PATCH installer 0/2] align generated vlan-interface config with our docs Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 1/2] network: align VLAN interface names with the documentation Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 2/2] network: drop unneded vlan-raw-device Stoiko Ivanov
@ 2026-11-24 10:24 ` Stefan Hanreich
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2026-11-24 10:24 UTC (permalink / raw)
To: pve-devel
On 11/24/26 10:40 AM, Stoiko Ivanov wrote:
> noticed that the generated config if the installer has a vlan-id provided
> results in vlanX and vlan-raw-device added.
> As I usually use the dot notation $iface.X I checked our docs:
> https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#_vlan_on_the_host
strongly agree, but we also need a fallback for when the interface name is
too long!
> I think the issue is mostly cosmetic - but having the generated config
> aligned with our docs (and not offering multiple versions in our docs)
> should help to avoid confusion (thinking of the boot-loaders, where
> we actually need to have multiple versions and the resulting questions
> on our support channels).
>
> minimally tested by installing the updated proxmox-installer package
> in a VM with the installer booted in debug mode.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-24 10:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 9:39 [PATCH installer 0/2] align generated vlan-interface config with our docs Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 1/2] network: align VLAN interface names with the documentation Stoiko Ivanov
2026-11-24 9:39 ` [PATCH installer 2/2] network: drop unneded vlan-raw-device Stoiko Ivanov
2026-11-24 10:24 ` [PATCH installer 0/2] align generated vlan-interface config with our docs Stefan Hanreich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.