OpenVZ Forum


Home » General » Support » CentOS 6.5 - OpenVZ (Switching To Container Failure)
CentOS 6.5 - OpenVZ [message #51054] Mon, 13 January 2014 04:59 Go to next message
hill3788 is currently offline  hill3788
Messages: 6
Registered: January 2014
Location: USA
Junior Member
From: *stx.res.rr.com
I installed OpenVZ on CentOS 6.5 32 bit and can't switch to container host. Any ideas?

[root@CentOS ~]# vzctl start 101
Container is already running
[root@CentOS ~]# vzctl enter 101
entered into CT 101
[root@CentOS /]#
Re: CentOS 6.5 - OpenVZ [message #51055 is a reply to message #51054] Mon, 13 January 2014 05:39 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: N├╝rnberg, Germany
Senior Member

From: *dip0.t-ipconnect.de
Hi,

please check /proc/vz/veinfo, each line presents a running Container, format <CT_ID> <CT_class> <number_of_processes> <IP_address_of_venet>

Inside Container , you should only see the container id

101 ... ... ....

if there're more entries like ctid is 0 (0 is your host or hardwarenode), you are at your hostnode.

check on your hostnode

# cat /proc/vz/veinfo
# vzctl exec 101 'cat /proc/vz/veinfo'

or

# vzctl enter 101
_CT_ID # cat /proc/vz/veinfo

Bye Thorsten
Re: CentOS 6.5 - OpenVZ [message #51056 is a reply to message #51055] Mon, 13 January 2014 08:13 Go to previous messageGo to next message
hill3788 is currently offline  hill3788
Messages: 6
Registered: January 2014
Location: USA
Junior Member
From: *stx.res.rr.com
This is what I see:

101 2 20 72.191.141.85 192.168.0.77


This is all new to me - What should the IP addresses be?

Do I need a DNS Server?
Re: CentOS 6.5 - OpenVZ [message #51060 is a reply to message #51056] Tue, 14 January 2014 14:15 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
From: *dynamic.sbb.rs
hill3788 wrote on Mon, 13 January 2014 09:13
This is what I see:

101 2 20 72.191.141.85 192.168.0.77

This means you've entered your VM successfully. The prompt didn't change because you most likely use the same hostname for the HN and the VM, thus causing the confusion.


Quote:
This is all new to me - What should the IP addresses be?

Do I need a DNS Server?

IPs you see are the ones assigned to your VM. If you have internet connectivity then you most likely have DNS properly set up, as far as resolving goes.
Re: CentOS 6.5 - OpenVZ [message #51062 is a reply to message #51054] Wed, 15 January 2014 02:58 Go to previous messageGo to next message
hill3788 is currently offline  hill3788
Messages: 6
Registered: January 2014
Location: USA
Junior Member
From: *stx.res.rr.com
I was able to switch to the container, but I can't install anything. For example I tried to install VIM on CT101 and I got an error. Maybe my ethernet card is not configured to work with the container.

[root@server101 /]# yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http: // mirrorlist. centos. org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

Re: CentOS 6.5 - OpenVZ [message #51063 is a reply to message #51054] Wed, 15 January 2014 13:20 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
From: *dynamic.sbb.rs
You'll have to tell us a bit more about your network if you want help.

For example:
- how many IPs are available for your hardware node (HN)
- did you add just one public IP to your HN's network card and leave others unattached?
- post the output of 'cat /etc/resolv.conf' on your HN and from within your container (CT)
- is the public IP attached to your CT the correct one?
Re: CentOS 6.5 - OpenVZ [message #51076 is a reply to message #51063] Sat, 18 January 2014 23:24 Go to previous messageGo to next message
hill3788 is currently offline  hill3788
Messages: 6
Registered: January 2014
Location: USA
Junior Member
From: *stx.res.rr.com
The setup is simple. I just installed OpenVZ on CentOS 6.5. There is no network - Just a computer connected to a cable modem. I assigned the container an IP of 192.168.0.101. I'm not sure what to use for the nameserver.

---

I have internet connectivity outside the container with:

eth0
vnet0

---

I can enter the container: [root@server101 /]#

---

resolv.conf:

# Generated by NetworkManager
domain stx.rr.com
search stx.rr.com
nameserver 209.18.47.61
nameserver 209.18.47.62

---

When I try to install something simple like VIM it fails:

[root@server101 /]# yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http: // mirrorlist . centos. org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
[root@server101 /]#

Re: CentOS 6.5 - OpenVZ [message #51077 is a reply to message #51054] Sun, 19 January 2014 03:16 Go to previous messageGo to next message
hill3788 is currently offline  hill3788
Messages: 6
Registered: January 2014
Location: USA
Junior Member
From: *stx.res.rr.com
The data from resolve.conf from within the container is:

nameserver 169.254.0.0/16
Re: CentOS 6.5 - OpenVZ [message #51078 is a reply to message #51054] Sun, 19 January 2014 23:45 Go to previous messageGo to next message
dipps is currently offline  dipps
Messages: 22
Registered: May 2013
Location: Out in the scrub
Junior Member
From: *static.internode.on.net
You do have to provide a working nameserver. That 169.254 one isn't going to work.

Do updates work on the HN? Then have a look in its /etc/resolv.conf to find a working nameserver IP. Otherwise, ask your cable provider. If that resolv.conf you showed is on the HN, then 209.18.47.61 is a possibility.

Once you have a nameserver, change it like this on the HN. (Don't edit resolv.conf on the container, that's not permanent.)

HN# vzctl set 101 --nameserver MY.NAME.SERVER.IP --save

Re: CentOS 6.5 - OpenVZ [message #51080 is a reply to message #51078] Thu, 23 January 2014 01:36 Go to previous message
hill3788 is currently offline  hill3788
Messages: 6
Registered: January 2014
Location: USA
Junior Member
From: *stx.res.rr.com
No, that did not help. Updates work just fine when I'm outside the container. Does this have anything to do with the NIC it's trying to use? I'm not sure this container even has access to the internet since I can't even ping an IP address.


I restarted the container and I got this:

Container is mounted
Adding IP address(es): 192.168.2.1 192.168.0.101
Setting CPU units: 1000
Configure veth devices: veth101.0
Container start in progress...


192.168.2.1 appears to be an APACHE test page.


Previous Topic: OpenVZ Kernel - RHEL 6.5 function
Next Topic: Openvz Template > OpenSuse - Yast Bug
Goto Forum:
  


Current Time: Mon Nov 12 17:48:59 GMT 2018