I have a similar issue to
https://forum.proxmox.com/threads/proxmox-on-local-network-no-ip-for-the-containers.36353/
But my environment might be slightly different, so I decided to create a new thread.
I installed Proxmox 5.1 into VirtualBox 5.1 (nice coincidence).
I had captured screenshots of all settings and messages, but cannot post them because I'm a new member.
My VirtualBox machine's network adapter is directly bridged to physical adapter which connects to my router.
During install, I just entered root password, domain as proxmox.local, IP set to static 192.168.1.103 and clicked Next Next Finish.
Proxmox web UI shows for node Network settings:
enp0s3 - Network device; in properties has all fields empty
vmbr0 - Linux bridge; in properties has the following:
Name: vmbr0
IP Address: 192.168.1.0.3
Subnet mask: 255.255.255.0
Gateway: 192.168.1.1
Autostart: checked
VLAN aware: unchecked
Bridge ports: enp0s3
Other fields empty.
Then I downloaded ubuntu 16.04 and 17.04 container templates using pveam download command on directly on my new Proxmox server. Created a container using ubuntu 16.04 template, In network settings changed it to use DHCP instead of Static IP, other settings left default - name eth0, Bridge vmbr0, VLAN tag: no VLAN, Firewall unchecked.
The machine started fine, although I could not attach to Console for a few minutes - showed just blank screen. Then finally I attached and entered
but got only autogenerated IPv6 address and no IPv4 address.
Luckily, I got to my router's (cheap TP-LINK TL-WR740N / TL-WR740ND) system log and I did not see any new IPs in router's DHCP client list, but here's what I saw in router's log:
The MAC address is the same as for the new LXC container.
Digging deeper, I ran:
in the container console, and the result had lots of messages like
and ended with
So, clearly the container sends DHCP requests to my router and my router responds with an offer, but the container never acknowledges the offer.
But when I then stopped the container and replaced DHCP with static IP 192.168.1.101/24 and netmask 255.255.255.0, then networking started normally, and also Proxmox console was ready much faster. I suspect that with DHCP, the console is not ready while the container is stuck requesting an IP address until it gives up.
I tried also Ubuntu 17.04 - the same result. Also tried
- it hangs for long time again spamming my router with DHCPS:Recv DISCOVER.
In contrast, if I use Ubuntu 17.04 image in a new VirtualBox machine and set it to DHCP, it works immediately and my router shows:
So, in normal conditions DHCPS requests / responses are correctly routed to/from VirtualBox guests and my router. There might be something missing for Proxmox bridge itself - why does it let DHCP requests to pass from the container to my router but does not route the response OFFER back?
Most probably, I will reconfigure Proxmox to use its internal network and DHCP and NAT the host IP to internal containers, but at this point I'm not sure if that advanced setup will work at all if I'm unable to get the "simple" bridged approach router <-> physical host network adapter <-> Proxmox bridge <-> LXC container running.
https://forum.proxmox.com/threads/proxmox-on-local-network-no-ip-for-the-containers.36353/
But my environment might be slightly different, so I decided to create a new thread.
I installed Proxmox 5.1 into VirtualBox 5.1 (nice coincidence).
I had captured screenshots of all settings and messages, but cannot post them because I'm a new member.
My VirtualBox machine's network adapter is directly bridged to physical adapter which connects to my router.
During install, I just entered root password, domain as proxmox.local, IP set to static 192.168.1.103 and clicked Next Next Finish.
Proxmox web UI shows for node Network settings:
enp0s3 - Network device; in properties has all fields empty
vmbr0 - Linux bridge; in properties has the following:
Name: vmbr0
IP Address: 192.168.1.0.3
Subnet mask: 255.255.255.0
Gateway: 192.168.1.1
Autostart: checked
VLAN aware: unchecked
Bridge ports: enp0s3
Other fields empty.
Then I downloaded ubuntu 16.04 and 17.04 container templates using pveam download command on directly on my new Proxmox server. Created a container using ubuntu 16.04 template, In network settings changed it to use DHCP instead of Static IP, other settings left default - name eth0, Bridge vmbr0, VLAN tag: no VLAN, Firewall unchecked.
The machine started fine, although I could not attach to Console for a few minutes - showed just blank screen. Then finally I attached and entered
Code:
ip a
but got only autogenerated IPv6 address and no IPv4 address.
Luckily, I got to my router's (cheap TP-LINK TL-WR740N / TL-WR740ND) system log and I did not see any new IPs in router's DHCP client list, but here's what I saw in router's log:
Code:
170 Mar 5 17:49:50 DHCP NOTICE DHCPS:Send OFFER with ip 192.168.1.101
169 Mar 5 17:49:50 DHCP NOTICE DHCPS:Recv DISCOVER from 5E:BB:BE:29:E1:E5
168 Mar 5 17:49:37 DHCP NOTICE DHCPS:Send OFFER with ip 192.168.1.101
167 Mar 5 17:49:37 DHCP NOTICE DHCPS:Recv DISCOVER from 5E:BB:BE:29:E1:E5
The MAC address is the same as for the new LXC container.
Digging deeper, I ran:
Code:
journalctl | grep -Ei 'dhcp'
Code:
DHCPDISCOVER on eth0 to 255.255.255 port 67 interval (some random number each time)
Code:
No DHCPOFFERS received.
So, clearly the container sends DHCP requests to my router and my router responds with an offer, but the container never acknowledges the offer.
But when I then stopped the container and replaced DHCP with static IP 192.168.1.101/24 and netmask 255.255.255.0, then networking started normally, and also Proxmox console was ready much faster. I suspect that with DHCP, the console is not ready while the container is stuck requesting an IP address until it gives up.
I tried also Ubuntu 17.04 - the same result. Also tried
Code:
dhclient -r eth0
dhclient eth0
In contrast, if I use Ubuntu 17.04 image in a new VirtualBox machine and set it to DHCP, it works immediately and my router shows:
Code:
32 Mar 5 18:09:16 DHCP NOTICE DHCPS:Send ACK to 192.168.1.106
31 Mar 5 18:09:16 DHCP NOTICE DHCPS:Recv REQUEST from 08:00:27:DF:0A:91
30 Mar 5 18:09:16 DHCP NOTICE DHCPS:Send OFFER with ip 192.168.1.106
29 Mar 5 18:09:15 DHCP NOTICE DHCPS:Recv DISCOVER from 08:00:27:DF:0A:91
So, in normal conditions DHCPS requests / responses are correctly routed to/from VirtualBox guests and my router. There might be something missing for Proxmox bridge itself - why does it let DHCP requests to pass from the container to my router but does not route the response OFFER back?
Most probably, I will reconfigure Proxmox to use its internal network and DHCP and NAT the host IP to internal containers, but at this point I'm not sure if that advanced setup will work at all if I'm unable to get the "simple" bridged approach router <-> physical host network adapter <-> Proxmox bridge <-> LXC container running.