Jul 22, 2021
33
2
8
24
I am new to proxmox. I have created a CT having Ubuntu 18.04 template. The problem is it is not getting connected to the internet.
Code:
$ ping 8.8.8.8
connect: Network is unreachable

Code:
$ cat /etc/network/interfaces
# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown

Code:
$ 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@if26: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether f2:15:10:e9:c3:83 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::f015:10ff:fee9:c383/64 scope link 
       valid_lft forever preferred_lft forever

Code:
$ /etc/resolv.conf
# --- BEGIN PVE ---
search infra.vitwit.com
nameserver 8.8.8.8
# --- END PVE ---

Thanks in advance.
 

Moayad

Proxmox Staff Member
Staff member
Jan 2, 2020
1,795
147
68
29
Vienna
shop.maurer-it.com
2: eth0@if26: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether f2:15:10:e9:c3:83 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet6 fe80::f015:10ff:fee9:c383/64 scope link valid_lft forever preferred_lft forever
you don't set a static IP to the container, right?

Please post the network configuration cat /etc/network/interfaces of Proxmox VE and the config of that container pct config <CTID>
 
  • Like
Reactions: Tmanok
Jul 22, 2021
33
2
8
24
you don't set a static IP to the container, right?

Please post the network configuration cat /etc/network/interfaces of Proxmox VE and the config of that container pct config <CTID>
Sure @Moyad,

Code:
$  cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface eno145 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.10.2
        gateway 192.168.10.1
        bridge_ports eno145
        bridge_stp off
        bridge_fd 0

iface eno146 inet manual

iface eno3 inet manual

iface eno4 inet manual

Code:
### Config of the container 100
$ pct config 100
arch: amd64
cores: 2
hostname: ubuntu18.04
memory: 8096
net0: name=eth0,bridge=vmbr0,hwaddr=F2:15:10:E9:C3:83,ip=dhcp,ip6=dhcp,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-100-disk-0,size=100G
swap: 8096
unprivileged: 1

Best Regards,
Teja,
SDE I at Vitwit
 
Jul 22, 2021
33
2
8
24
Thanks, Moyad for helping. It is working fine now.
Solution:
I have changed the IPv4 from DHCP to static. In the network section of VM.
Updated config of VM:
Code:
arch: amd64
cores: 2
hostname: ubuntu18.04
memory: 8096
net0: name=eth0,bridge=vmbr0,gw=192.xxx.xx.1,hwaddr=F2:15:10:E9:C3:83,ip=192.xxx.xx.9/24,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-100-disk-0,size=100G
swap: 8096
unprivileged: 1
 
Last edited:
  • Like
Reactions: Moayad

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 your own in 60 seconds.

Buy now!