CT networking setup incorrectly adds second venet0:0 interface

lifeboy

Renowned Member
I have setup a container for Ubuntu 12.04 with a single network card. The config file has:

root@dev2:~# cat /etc/pve/nodes/s1/openvz/104.conf
Code:
HOSTNAME="dev2.inhouse.abellard.com"
SEARCHDOMAIN="inhouse.abellard.com"
NAMESERVER="192.168.121.1"
NETIF="ifname=eth0,bridge=vmbr0,mac=6A:77:3B:2B:62:94,host_ifname=veth104.0,host_mac=F6:2C:5E:35:A0:91"
VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/mnt/cephfs/private/104"
OSTEMPLATE="ubuntu-12.04-minimal_amd64.tar.gz"
IP_ADDRESS="192.168.121.36"
Now, when the container boots, the following network config is created:

root@dev2:~# cat /etc/network/interfaces
Code:
# This configuration file is auto-generated.
#
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.
#

# Auto generated lo interface
auto lo
iface lo inet loopback

# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
    up ifconfig venet0 up
    up ifconfig venet0 127.0.0.2
    up route add default dev venet0
    down route del default dev venet0
    down ifconfig venet0 down


iface venet0 inet6 manual
    up route -A inet6 add default dev venet0
    down route -A inet6 del default dev venet0

auto venet0:0
iface venet0:0 inet static
    address 192.168.121.36
    netmask 255.255.255.255

Of course, this is not what is expected. Even if I delete the /etc/network/interfaces file, it's recreated exactly this way again.

The last part, that is the biggest problem, is that /etc/resolv.conf does not contain anything.

root@dev2:~# cat /etc/resolv.conf
Code:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

Now therefor this works:

root@dev2:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=561 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=56 time=19.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=56 time=18.8 ms

but this does not:

root@dev2:~# ping www.google.com
ping: unknown host www.google.com


I suppose I could remove all configuration information from proxmox (the 104.conf) file and configure the whole thing by hand, but that would defeat the whole point of having proxmox create the config automatically. Also, when the client that I'm building this for, eventually wants to create his own machines, he will have to configure those manually as well, which is not the plan.

Can someone please help here?
 
Last edited:
more information:

The openvz container resides on cephfs:

root@s2:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 799M 372K 798M 1% /run
/dev/mapper/pve-root 95G 1.4G 89G 2% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.6G 35M 1.6G 3% /run/shm
/dev/mapper/pve-data 344G 195M 344G 1% /var/lib/vz
/dev/sda2 494M 55M 414M 12% /boot
/dev/fuse 30M 24K 30M 1% /etc/pve
/dev/sdb1 927G 254G 673G 28% /var/lib/ceph/osd/ceph-13
ceph-fuse 12T 1.5T 9.7T 14% /mnt/cephfs


The proxmox network on this server is:

root@s2:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:16:36:76:0f:3d brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:16:36:76:0f:3e brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UNKNOWN qlen 1000
link/ether 00:16:36:76:0f:40 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UNKNOWN qlen 1000
link/ether 00:16:36:76:0f:40 brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:16:36:76:0f:40 brd ff:ff:ff:ff:ff:ff
7: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 00:16:36:76:0f:40 brd ff:ff:ff:ff:ff:ff
inet 192.168.121.32/24 brd 192.168.121.255 scope global vmbr0
inet6 fe80::216:36ff:fe76:f40/64 scope link
valid_lft forever preferred_lft forever
8: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
inet6 fe80::1/128 scope link
valid_lft forever preferred_lft forever

Not sure if there's more info that may be needed, but I'll gladly provide it if asked for.
 
Last edited:

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!