Containers Fail on DHCP

justahobby

Member
Jun 13, 2020
4
0
21
Hello,

I've been trying to install containers using scripts like below. However, they fail and automatically get removed. Containers I create w/ a static IP work but fail if DHCP is used. My DNS is set to 8.8.8.8 and I am able to ping lan and wan addresses in pve. I'm also able to do the same if I set a container or VM to static ip.

I had containers running, using these scripts but after a mishap while trying to get additional disks into a vm I broke proxmox and did a fresh install. Now I'm having this issue and have no clue on where to start trying to fix it.

Container script:
bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_portainer_lxc/raw/master/create_container.sh)"

```
[INFO] Using 'local-lvm' for storage location.
[INFO] Container ID is 101.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
Setting up container OS...
Updating container OS...
W: Failed to fetch http://ftp.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch http://ftp.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Installing prerequisites...
[ERROR:LXC] 100@40 Unknown failure occured.
[ERROR] 100@167 Unknown failure occured.
Logical volume "vm-101-disk-0" successfully removed
```


My /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.0.0.218 pve.lan pve

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/network/interfaces
auto lo
iface lo inet loopback

iface enx000ec6bb9a12 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.0.0.218
netmask 255.255.255.0
gateway 10.0.0.1
bridge_ports enx000ec6bb9a12
bridge_stp off
bridge_fd 0
 
put a working dns resolver into /etc/resolv.conf e.g 1.1.1.1, also check that you can ping it
 
I've tried

8.8.8.8
8.8.4.4
1.1.1.1
9.9.9.9

My node has no trouble and neither do containers and VMs I set up manually. It is only when I run a script to create one that automatically selects DHCP, which could be a coincidence for all I know.
 

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!