CentOS container cannot enable network

curlingcanteen

New Member
Feb 28, 2013
27
1
1
I installed CentOS 6 Standard (also tried with minimal) via a template and cannot seem to enable eth0. Bridge mode to vmbr0 was selected during container creation, and this is the device info:
Code:
ip link 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
2: venet0: <BROADCAST,POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN 
    link/void 
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether 02:86:47:81:c0:49 brd ff:ff:ff:ff:ff:ff
I've defined /etc/sysconfig/network-scripts/ifcfg-eth0 with:
Code:
    auto eth0
    ONBOOT=yes
    allow-hotplug eth0
    iface eth0 inet dhcp

But when I try to bring the device up or restart networking, I see
Code:
# ifup eth0
/etc/sysconfig/network-scripts/ifcfg-eth0: line 1: auto: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 2: allow-hotplug: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 3: iface: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 1: auto: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 2: allow-hotplug: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 3: iface: command not found
Device does not seem to be present, delaying initialization.

Code:
# service network restart
./ifcfg-eth0: line 1: auto: command not found
./ifcfg-eth0: line 3: allow-hotplug: command not found
./ifcfg-eth0: line 4: iface: command not found
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  /etc/sysconfig/network-scripts/ifcfg-eth0: line 1: auto: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 3: allow-hotplug: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 4: iface: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 1: auto: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 3: allow-hotplug: command not found
/etc/sysconfig/network-scripts/ifcfg-eth0: line 4: iface: command not found
Device does not seem to be present, delaying initialization.
                                                           [FAILED]
 

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!