Hello, I am new to Proxmox. I have some problems with obtaining IPv4 addresses from dhcp in my LXC containers.
When I reboot my LXC containers, they won't receive an IPv4 address anymore. I am not sure if this is related, but it seems this started occurring after I ran the following commands on the node:
Network interfaces on node:
Running pct config on node:
Running ip a on one of the containers:
When I run the commands below in a container, this container will receive an IPv4 address, but it will lose this IPv4 again after rebooting it. If possible, I want all containers to receive an IPv4 address automatically after rebooting, just as it worked previously.
When I reboot my LXC containers, they won't receive an IPv4 address anymore. I am not sure if this is related, but it seems this started occurring after I ran the following commands on the node:
Bash:
systemctl restart pvedaemon
systemctl restart pvestatd
systemctl restart pveproxy
systemctl restart corosync
Network interfaces on node:
Bash:
root@proxmox:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface enp3s0 inet manual
auto vmbr0
iface vmbr0 inet dhcp
address 192.168.1.100/24
gateway 192.168.1.1
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
iface wlp1s0 inet manual
Running pct config on node:
Bash:
root@proxmox:~# pct config 100
arch: amd64
cores: 4
description: USB passthrough%0A VAAPI hardware transcoding%0A
features: mount=cifs,nesting=1
hostname: plex
memory: 4096
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:39:38:AC,ip=dhcp,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-100-disk-0,size=48G
swap: 4096
tags: proxmox-helper-scripts
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
Running ip a on one of the containers:
Bash:
root@plex:~# ip a
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@if17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether bc:24:11:39:38:ac brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::be24:11ff:fe39:38ac/64 scope link
valid_lft forever preferred_lft forever
When I run the commands below in a container, this container will receive an IPv4 address, but it will lose this IPv4 again after rebooting it. If possible, I want all containers to receive an IPv4 address automatically after rebooting, just as it worked previously.
Bash:
dhclient -r eth0
dhclient eth0