[Bug] LXC containers are not showing IPs
Describe the bug
All LXC containers are not showing an IP, only VMs. If I check it directly on the PVE UI I can see the IPs and they are discovered via the Guest Tools:
Steps to Reproduce
- Review the PegaProx UI on LXC containers
Expected behavior
Pegaprox should display the IPs of LXCs
Environment
- PegaProx Version: 0.9.6
- Installation Method: Docker
- OS: Debian 13 (Docker Host)
- Browser: Chrome, Safari
- Behind Reverse Proxy? No
- UI? Corporate
Logs
Screenshots
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
Hey, thanks for reporting. We do fetch LXC IPs via the PVE /lxc/{vmid}/interfaces endpoint, but on some setups that endpoint returns empty data — especially if the containers don't have the expected network config or the PVE API takes too long to populate the interface list after boot.
Quick question — are these DHCP or static IP containers? And what PVE version are you running? That helps narrow down whether it's a timing issue or an API behavior difference.
In the meantime I'll look into adding a fallback that pulls the IP from the container config directly.
Regards, Marcus
Hi @mkellermann97 I am running PVE 9.1.7 (latest) on all of my nodes. The LXCs are using DHCP. As already mentioned, all LXC are reporting the correct IP in the Proxmox UI.
Thanks!
Hi @mkellermann97 this issue is still not solved after updating to 0.9.7
Hey @jostrasser — sorry that 0.9.7 didn't carry the fix for your setup.
Being honest here: we've reached the limit of what the Proxmox REST API actually exposes for LXC IPs. There are exactly two public endpoints to pull IP data from:
GET /nodes/<node>/lxc/<vmid>/interfaces— whatlxcfscurrently reports. On DHCP containers this often comes back empty, even while the PVE web UI shows the IP right there.GET /nodes/<node>/lxc/<vmid>/config— only returns what's written into the container config, so it helps for staticip=...assignments and nothing else.
That's it. The PVE web UI can show richer data because it talks to pct / lxcfs in-process on the node — that path is simply not exposed through REST from outside the node, and we can't go any deeper than the public API allows.
For this to be fixable on our end, Proxmox would need to extend the REST API to expose the same data pct sees locally. I'd recommend opening a feature request on pve-devel or the Proxmox bugtracker asking for /lxc/<vmid>/agent-like info (cloud-init or lxcfs-backed). Once that lands upstream, we'll wire it up straight away.
Closing again from our side since there's no fix we can ship without a Proxmox-side API change — but feel free to reopen if you come across an API path I've missed.
Understood... I'll open a FR @ Proxmox. Thanks for your help to address this feature! BR/JO!
Hi @mkellermann97
Regarding the issue of retrieving IP addresses for LXC containers (which is reportedly a limitation of the standard Proxmox API), I've received feedback from the ProxMate developer who successfully implements this feature... also for VMs with DHCP networking backend.... is working for my environment like a charm.
The instruction for implementation is as follows:
API Endpoint: LXC container IP addresses are available via the Proxmox API endpoint: /api2/json/nodes/{node}/lxc/{vmid}/interfaces.
https://git.proxmox.com/?p=pve-manager.git;a=summary
Verification: You can verify this by inspecting the "Network" tab in the browser's developer tools while clicking on an LXC in the Proxmox Web-GUI; the API call to "interfaces" should be visible:
The ProxMate app utilizes the Proxmox API exclusively for this functionality.
Is it possible for you to reopen and take a look again?
Thanks and BR/JO!
Hi @MrMasterbay May I get an update about this issue? Is PVE 9.2 changing anything related?
Thanks JO