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"