[Users] Starting With OpenVZ and Having Interface Issues
Matt
matt.mailinglists at gmail.com
Wed Feb 5 16:03:31 PST 2014
> I just installed OpenVZ on CentOS 6.x 64 bit following this guide a
> few days ago.
>
> http://openvz.org/Quick_Installation_CentOS_6
>
> I am mostly interested in creating containers with veth interfaces so
> I can assign multiple public IPv4 and IPv6 addresses from inside the
> container. I noticed that when I am logged into the CentOS physical
> server with putty through ssh I can start a container that has a veth
> interface with 'vzctl start 102' and it starts just fine. I can ping
> its IPv4 and IPv6 addresses just fine. However when I issue 'vzctl
> stop 102' my putty ssh connection to the OpenVZ server is dropped and
> I must reconnect. I am able to reconnect just fine. Again, I am
> logged into the OpenVZ master not the container.
>
> Can anyone tell me what is going on here? After further testing I
> determined it does not always do it. The first time I stop a
> container after I reboot the master, physical server, it seems most
> prone to act up.
>
> ######### just did reboot 30 minutes ago or so............
>
> [root at ex1 ~]# vzlist
> CTID NPROC STATUS IP_ADDR HOSTNAME
> 103 92 running - server.example456.com
> [root at ex1 ~]# vzctl start 102
> Starting container...
> Container is mounted
> Setting CPU units: 1000
> Setting CPUs: 1
> Configure veth devices: veth102.0
> Adding interface veth102.0 to bridge vmbr0 on CT0 for CT102
> Container start in progress...
> [root at ex1 ~]# vzlist
> CTID NPROC STATUS IP_ADDR HOSTNAME
> 102 19 running - server102.example.com
> 103 92 running - server.example456.com
> [root at ex1 ~]# vzctl stop 102
> Stopping container ...
>
> ############## Here is where I get kicked off putty/ssh......
[root at ex1 ~]# rpm -qa |grep vz
e2fsprogs-resize2fs-static-1.42.3-3.2.ovz.x86_64
vzstats-0.5.2-1.noarch
vzkernel-2.6.32-042stab084.20.x86_64
vzkernel-2.6.32-042stab084.17.x86_64
vzctl-core-4.6.1-1.x86_64
vzquota-3.1-1.x86_64
vzctl-4.6.1-1.x86_64
This is how interfaces are setup.
http://openvz.org/Quick_Installation_CentOS_6
[root at ex1 ~]# cat /etc/sysctl.conf |grep -v "#"
net.ipv4.ip_forward = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.all.proxy_ndp = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 0
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
[root at ex1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
IPV6INIT="yes"
TYPE="Ethernet"
BRIDGE="vmbr0"
[root at ex1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-vmbr0
DEVICE="vmbr0"
BOOTPROTO="static"
IPV6INIT="yes"
ONBOOT="yes"
TYPE="Bridge"
DELAY=0
IPADDR=x.x.x.38
NETMASK=255.255.255.0
GATEWAY=x.x.x.1
DNS1=x.x.x.4
#DEFROUTE=yes
IPV6_AUTOCONF=no
IPV6_DEFAULTGW=xxxx:xxxx::1
IPV6ADDR=xxxx:xxxx::38/64
DNS2=xxxx:xxxx::4
#IPV6_DEFROUTE=yes
Everything updated to latest with yum. Clean install with only OpenVZ added.
More information about the Users
mailing list