How do I find the DHCP IP address for a container?

thusband

Member
Jun 30, 2022
107
5
18
I'm fairly new to Proxmox so am setting up some containers and VMs. I set up Fedora in a container with a DHCP and not static IP address. Now how do I find that address so I can access it in my browser? Is that something I do in the console?

Searching some previous threads I came across this. Does this have to do with gaining the IP address?

Thanks
 
If dns is working
Code:
ping hostname
. If not open the vm and find the ip. Then set it reserved in dhcp. Or static.
 
If you log in to your routers webUI there usually also should be a list with leases its dhcp server had allocated.
 
If dns is working
Code:
ping hostname
. If not open the vm and find the ip. Then set it reserved in dhcp. Or static.
Sorry, you say open the vm? This is a container. I must be missing something.

I could start looking through my router but there's a bunch of IP addresses and determining what goes with what is difficult. I thought there would be some text after the container was created saying what the address would be.

edit: Looks like the name of the container shows up in the router so it's easy to identify. However the IP address doesn't connect. What port should it be on?
 
Last edited:
Hostname would be the name you gave the vm without the quotes. You could also open the console for the vm and login and enter
Code:
ip address
.
 
Last edited:
Hostname would be the name you gave the vm without the quotes. You could also open the console for the vm and login and enter
Code:
ip address
.
What I get is:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether c6:ae:6a:79:76:de brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.1.80/24 metric 1024 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 48648sec preferred_lft 48648sec
    inet6 fe80::c4ae:6aff:fe79:76de/64 scope link
       valid_lft forever preferred_lft forever
I want to be able to open Fedora in my browser and be able to install a few apps.
 
Depends on the service you are running. SSH usually should be port 22.
SSH would be through the console right? I want to access Fedora through my browser. For instance I set Trilium set up in a container using a script from here and access it with http://192.168.1.107:8080/. Using the IP address for the Fedora container I found in my router doesn't open it.
 
I've wondered this too. A vm with the guest tools installed displays its IP in the summary section without having to use the console or dig through the router dhcp leases but containers don't seem to have any way to display the IP from the Web gui
 
ping fqdn should show the ip. Also nslookup fqdn should work if it is installed. If not something is wrong with your dns.
 
ping fqdn should show the ip. Also nslookup fqdn should work if it is installed. If not something is wrong with your dns.
Yeah, that's what I said - there's no way to see a ct ip from the gui the way you can for a vm running the guest tools without entering console commands.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!