Proxmox 9.0.4 doesn't get IP by DHCP

yonder

Member
Dec 17, 2022
2
0
6
After changing /etc/network/interfaces on a fresh install to:

iface vmbr0 inet dhcp

and running ifreload -a I'm receiving an error message:

vmbr0: cmd '/sbin/dhclient -pf /run/dhclient.vmbr0.pid -lf /var/lib/dhcpdhclient.vmbr0.leases vmbr0' failed([Errno 2] No such file or directory: '/sbin/dhclient')

Indeed there is no file 'dhclient' in /sbin forlder.

Strangely enough it looks like the installer runs DHCP client to pick the IP bound to MAC address up but makes it static.

It worked for sure on version 8.3 or 8.4. But not with v9. Can anyone help please?
 
"apt install isc-dhcp-client" should solve that.
 
dhcpcd 10.1.0 is giving me a segfault on a fresh install of Proxmox 9.0-1 everytime I run ifreload -a .
It is a fresh installation and I'm still investigating the error. I'll make a report if I find something out. But I figured it might be a good idea to mention it here, in case it happens to anyone else reading this.
 
  • Like
Reactions: nmpu
dhcpcd 10.1.0 is giving me a segfault on a fresh install of Proxmox 9.0-1 everytime I run ifreload -a .
It is a fresh installation and I'm still investigating the error. I'll make a report if I find something out. But I figured it might be a good idea to mention it here, in case it happens to anyone else reading this.
The above dhcpcd install got me through boot, but it appears that other commands (like ifreload) still use scripts which reference the nonexistent dhclient. I found this response from 2023:
No, all Proxmox products use /etc/network/interfaces and ifupdown2 for network configuration.
This means you can't remove ifupdown2. You could install NetworkManager or systemd-networkd as a non-deprecated DHCP companion, but those packages use their own config files, so there'd be no visibility under PM network settings. I completely removed dhcpcd and installed the deprecated isc-dhcp-client as recommended by fabian.
 
Last edited:
"apt install isc-dhcp-client" should solve that.

Following official wiki instructions for installing Proxmox 9 over Debian 13, if its being done over ssh, this results in conectivity loss if you dont actually assign an static ip address before rebooting after completing all installation steps.
If I understand it right the problem is caused by ifupdown2 relying on dhclient to raise network interfaces, which is not installed by Debian anymore by default, being replaced by dhcpcd.
I suppose ifupdown2 has to be modified to use dhcpcd on debian instead of dhclient, but for the time being maybe isc-dhcp-client should be added to the wiki instructions for debian installation.
 
I had the same problem, my server would not boot after using DHCPv6/4 and figured out using logs that dhclient was not installed. Installed dhcpcd first but it did not work so I tried with dhclient and it worked.

Please add support for dhcpcd in proxmox.

 
If it were trivial to integrate dhcpcd with ifupdown, then it would already be available. It's more likely that ifupdown will become deprecated itself. Both NetworkManager and systemd-networkd have their own bundled DHCP clients, so they sidestep this issue.
 
If it were trivial to integrate dhcpcd with ifupdown, then it would already be available. It's more likely that ifupdown will become deprecated itself. Both NetworkManager and systemd-networkd have their own bundled DHCP clients, so they sidestep this issue.
Debian's built in ifupdown works with dhcpcd AFAIK. The one that apparently does NOT is ifupdown2 which is what Proxmox uses.
Obviously its not Proxmox's devs duty to fix ifupddown2, but installing proxmox-ve package automatically replaces ifupdown with ifupdown2, that leaves you without a working dhcp configuration.

systemd-networkd seems to be installed by debian 13 by default but its service is apparently disabled, instead of installing deprecated isc-dhcp-client maybe is better to just enable networkd service, set the interface you want to configure as DHCP as manual on ifupdown interfaces file and write a simple network file for it and let netword manage it.

I'm not sure its recommended to run both network managers at the same time but for this simple task they seem to work without any conflict.
 
  • Like
Reactions: nmpu
Debian's built in ifupdown works with dhcpcd AFAIK. The one that apparently does NOT is ifupdown2 which is what Proxmox uses.
Obviously its not Proxmox's devs duty to fix ifupddown2, but installing proxmox-ve package automatically replaces ifupdown with ifupdown2, that leaves you without a working dhcp configuration.

systemd-networkd seems to be installed by debian 13 by default but its service is apparently disabled, instead of installing deprecated isc-dhcp-client maybe is better to just enable networkd service, set the interface you want to configure as DHCP as manual on ifupdown interfaces file and write a simple network file for it and let netword manage it.

I'm not sure its recommended to run both network managers at the same time but for this simple task they seem to work without any conflict.
I agree with your solution. In fact, I'd argue that you only need to use /etc/network/interfaces for whatever Proxmox requires to function.

I'm sure the purists will frown, but I use my Proxmox install as a general purpose Debian system where I can run VMs (like Home Assistant) for convenience. Some projects only receive full support if you run their turn-key environment. HA is already mostly scripted python, so who cares about another 15% loss. I actually run most stuff (custom nftables firewall, AdGuard, dnsmasq, acme.sh, nginx, file and media servers, etc.) natively under Debian.
 
we plan on adding alternative dhcp client support to ifupdown2, but yes, for now if you need dhcp you need to ensure isc-dhcp-client is installed, despite it being deprecated.
 
we plan on adding alternative dhcp client support to ifupdown2, but yes, for now if you need dhcp you need to ensure isc-dhcp-client is installed, despite it being deprecated.
Please also fix bugs related to DHCP like Proxmox refuses to start when DHCPv6 is used because somehow Proxmox is deleting the lease file.
 
I'm observing the following errors after installing isc-dhcp

Code:
[   14.613344] audit: type=1400 audit(1757326723.547:121): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1061 comm="dhclient" family="unix" sock_type="dgram" protocol=0 requested="create" denied="create" addr=none
[   14.620771] audit: type=1400 audit(1757326723.551:122): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="stream" protocol=0 requested="create" denied="create" addr=none
[   14.622623] audit: type=1400 audit(1757326723.551:123): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="stream" protocol=0 requested="create" denied="create" addr=none
[   14.651856] audit: type=1400 audit(1757326723.586:124): apparmor="DENIED" operation="capable" class="cap" profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" capability=21  capname="sys_admin"
[   14.653328] audit: type=1400 audit(1757326723.586:125): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="dgram" protocol=0 requested="create" denied="create" addr=none
[   14.654544] audit: type=1400 audit(1757326723.588:126): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="dgram" protocol=0 requested="create" denied="create" addr=none
[   14.655731] audit: type=1400 audit(1757326723.588:127): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="dgram" protocol=0 requested="create" denied="create" addr=none
[   14.658995] audit: type=1400 audit(1757326723.593:128): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="dgram" protocol=0 requested="create" denied="create" addr=none
[   14.822458] audit: type=1400 audit(1757326723.756:129): apparmor="DENIED" operation="create" class="net" info="failed protocol match" error=-13 profile="/{,usr/}sbin/dhclient" pid=1062 comm="dhclient" family="unix" sock_type="dgram" protocol=0 requested="create" denied="create" addr=none
[   15.399989] audit: type=1400 audit(1757326724.334:130): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/bin/lxc-copy" pid=1158 comm="apparmor_parser"

I was suggested to create a file called

/etc/apparmor.d/sbin.dhclient

But I'm not sure what exactly to put in it !
 
you can switch that binary into complain mode:

"aa-complain dhclient"
 
This maybe a complete noob question, but when I try to install, I get this message:

Error : Package 'isc-dhcp-client' has no installation candidate.

How can I solve this please? I'm on a fresh installation of ProxMox 9.0.3
 
This maybe a complete noob question, but when I try to install, I get this message:

Error : Package 'isc-dhcp-client' has no installation candidate.

How can I solve this please? I'm on a fresh installation of ProxMox 9.0.3
ensure your repositories are configured correctly and that you ran "apt update"
 
I've found a solution for a situation where proxmox VE (and also PBS) has to get both IPv4 and IPV6 IP addresses via DHCP/DHCP6 (not only SLAAC).

Synopsis:
In my setup the OpenWRT router serves as an integrated DNS, DHCP and DHCP6 server. And I get a dynamic IPv6 /56 prefix delegation from my ISP. It is usually the same but sometimes can change after my router is switched off for some time, so I need a robust solution with permanent IPv4 addresses and IPv6 suffixes but dynamic IPv6 prefixes. So static configuration is out of consideration. And the DNS creates and serves IPv6 A/AAAA records only if there is an active DHCP/DHCP6 lease.
So I have to use DHCP and DHCP6 simultaneously with multiple static reservations (it staples IPv4 addresses and IPv6 suffixes).

ifupdown + ISC dhclient worked fine but is out of consideration because of PVE's strict dependency on ifupdown2
ifupdown2 + ISC dhclient doesn't work for some reason (DHCP6 requests fail at boot)

Solution:
1. I removed ISC dhcp client and installed a full dhcpcd package (not only dhcpcd-base):
apt -y install dhcpcd && apt -y purge isc-dhcp-common isc-dhcp-client
This not only installs the binary but also creates a daemon in systemd tree
2. Since dhcpcd doesn't give a f..ck about /etc/network/interfaces, I marked all of the interfaces as manual (so ifupdown2 doesn't spam syslog about absent dhclient) and used the "up" parameter for vmbr0 to specify up-command as dhcpcd doesn't apply IP addresses to bridges by default
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto enp33s0f0
iface enp33s0f0 inet manual

auto enp33s0f1
iface enp33s0f1 inet manual

auto bond0
iface bond0 inet manual
    bond-slaves enp33s0f0 enp33s0f1
    bond-miimon 100
    bond-mode 802.3ad

auto vmbr0
iface vmbr0 inet manual
    bridge-ports bond0
    bridge-stp off
    bridge-fd 0
    bridge_maxwait 0
    up dhcpcd vmbr0
3. In /etc/dhcpcd.conf one line has to be added so dhcpcd doesn't try to apply IP addresses to tun, tap and physical bridged or bonded interfaces and only applies it to the bridge:
Code:
allowinterfaces vmbr0

In virtual machines I use "allowinterfaces e*" instead so it doesn't mess with docker networks and the like. And i always uncomment "slaac hwaddr" and comment out "slaac private" since I don't need this unpredictability at home.

For static IPv4 and only IPv6 via DHCP6, those parameters have to be specified in /etc/dhcpcd.conf, see its manual.
If you need DHCP4 only or DHCP IPv4 and SLAAC IPv6, the default installation should work.

Hope guys at Cumulus networks or Proxmox create an official solution soon for DHCP6 without dependency on deprecated or EOL packages.