amuck-landowner

Could not retrieve mirrorlist http://mirrorlist.centos.org/

Premiumn

New Member
Sorry if this is a noob question. Im trying to learn some stuff with OpenVZ.

I installed OpenVZ using this tutorial and created some VM's. The issue im having now is that when i enter a VM (vzctl enter 101) an do something like "yum update", i get the following error.


# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock: (28, 'connect() timed out!')
Error: Cannot find a valid baseurl for repo: base


When i do a ping in that vm, i get this error:


# ping www.google.com
ping: unknown host www.google.com


In my /etc/resolv.conf, this is the contents:


nameserver 8.8.8.8
nameserver 8.8.8.8


Please note that if i exit out of the VM and run yum update, or any pings on the Master it works fine as expected. The issue lies when i log into any vm's.

I hope someone can guide me in the right direction.

Thank you in advance.
 

HalfEatenPie

The Irrational One
Retired Staff
Yep sounds like you didn't setup your IP properly or your network's goofed.  Follow @TheLinuxBug's link and/or check ifconfig. 

Also, this won't fix your problem but your /etc/resolv.conf has the same nameserver entry twice.  either delete one of those lines or change one to 8.8.4.4 (the other Google DNS IP).  
 

Premiumn

New Member
Ok guys, i know its been a long while, but i did not have a chance to mess around with this.


Im back to it now on a new server and im still having this problem. I will state again below in brief what steps i took to reproduce this from the beginning:


-Install openvz and kernel, created user 101, assigned it an IP address (using this tutorial: https://lowendbox.com/blog/tutorial-getting-started-with-openvz/)


Now the problem is, when i enter the VM 101 (vzctl enter 101), there seems to be a connection issue because firstly when i try to ping google.com, it says "ping: unknown host google.com" and when i try to run "yum update", i see the following "Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base"


It seems like an easy solution, but i just cannot figure it out. 

BTW, i followed the links in the answers above and that did not work either.


Thanks
 

GM2015

New Member
You can't resolve hosts, that means you have no internet connectivity.


Try pinging 8.8.8.8 or 8.8.4.4. If ping doesn't work, you don't have internet at all on the vm.


Your network config  file in /etc/network/interfaces is most likely the culprit. Or you don't have dedicated IP-s for the container and/or your NAT routing via iptables is wrong/not in place.
 

Premiumn

New Member
You can't resolve hosts, that means you have no internet connectivity.


Try pinging 8.8.8.8 or 8.8.4.4. If ping doesn't work, you don't have internet at all on the vm.


Your network config  file in /etc/network/interfaces is most likely the culprit. Or you don't have dedicated IP-s for the container and/or your NAT routing via iptables is wrong/not in place.

Pinging 8.8.8.8 works, but for some reason 100% packet loss



[root@serv /]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
31 packets transmitted, 0 received, 100% packet loss, time 30710ms
 


I do have 4 additional dedicated IP's. Gateway and netmask are correct in /etc/sysconfig/network-scripts/ifcfg-eth0


Any suggestions?
 

GM2015

New Member
Pinging 8.8.8.8 works, but for some reason 100% packet loss



[root@serv /]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
31 packets transmitted, 0 received, 100% packet loss, time 30710ms
 


I do have 4 additional dedicated IP's. Gateway and netmask are correct in /etc/sysconfig/network-scripts/ifcfg-eth0


Any suggestions?

Is the container on private IP(behind NAT) or you assigned a public ip to it?


All virtualization experience I have is with proxmox and NAT VM-s on. If you're PremiumN on Lowendtalk, drop me a pm on lowendtalk. I can't reply with anything useful here.
 
Last edited by a moderator:
Top
amuck-landowner