OpenVZ Forum


Home » General » Support » *SOLVED* yum for VE
*SOLVED* yum for VE [message #6152] Sun, 10 September 2006 16:39 Go to next message
victorskl is currently offline  victorskl
Messages: 28
Registered: September 2006
Junior Member
Hello all,

I cant yum from VE(as root). Is there anything that i have to set specific config? I've installed openvz on centos and then created several centos VEs. I can only vzyum from HN. When i attempt from VE yum, it show:

Quote:


ERROR: Cannot find a valid baseurl for repo:update



Thanks a lot..


http://static.openvz.org/userbars/openvz-user.png

[Updated on: Mon, 11 September 2006 00:40]

Report message to a moderator

Re: yum for VE [message #6153 is a reply to message #6152] Sun, 10 September 2006 16:56 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
Hello,

Check your:
/etc/yum.repos.d/CentOS-Base.repo

You should have something like that:
[code]
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#released updates
[update]
name=CentOS-$releasever - Updates
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=updates
#baseurl= http://mirror.centos.org/centos/$releasever/updates/$basearc h/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=addons
#baseurl= http://mirror.centos.org/centos/$releasever/addons/$basearch /
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=extras
#baseurl= http://mirror.centos.org/centos/$releasever/extras/$basearch /
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=centosplus
#baseurl= http://mirror.centos.org/centos/$releasever/centosplus/$base arch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=contrib
#baseurl= http://mirror.centos.org/centos/$releasever/contrib/$basearc h/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
[/quote]

Use mirrorlist instead baseurl to avoid offline mirrors.

Regards,


http://static.openvz.org/userbars/openvz-user.png
Re: yum for VE [message #6158 is a reply to message #6153] Sun, 10 September 2006 21:13 Go to previous messageGo to next message
victorskl is currently offline  victorskl
Messages: 28
Registered: September 2006
Junior Member
I did of course check the repo as you mentioned and it does have the same entry as centos default repo entry. But i still couldn't yum, yet. This effect on Fedora-4/5 templates as well. I downloaded templates as per instruction, yum vztmpl-*.*. The kenel is RHEL-4 2.6.9-023stab016.2.

I install yum for VEs through HN by
# vzyum {VeIDs} install yum


Then

# vzctl enter {VeID}
-bash: yum update


So when doing yum inside, i got the above mentioned error message. Is this related to vzyum or any other thing??

Thanks a lot.


http://static.openvz.org/userbars/openvz-user.png

[Updated on: Sun, 10 September 2006 21:16]

Report message to a moderator

Re: yum for VE [message #6159 is a reply to message #6158] Sun, 10 September 2006 22:44 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
Have you checked your /etc/resolv.conf for valid nameservers? You must add a nameserver using:
vzctl set VEID --nameserver xxx.xxx.xxx.xxx --save


http://static.openvz.org/userbars/openvz-user.png
Re: yum for VE [message #6160 is a reply to message #6159] Mon, 11 September 2006 00:39 Go to previous message
victorskl is currently offline  victorskl
Messages: 28
Registered: September 2006
Junior Member
sspt wrote on Mon, 11 September 2006 06:44

Have you checked your /etc/resolv.conf for valid nameservers? You must add a nameserver using:
vzctl set VEID --nameserver xxx.xxx.xxx.xxx --save




Very Happy

Gotcha! solved now. So, must set nameserver in order to use yum inside VE. Thanks for helping me.



http://static.openvz.org/userbars/openvz-user.png
Previous Topic: modprobe ipv6
Next Topic: Reload VPS OS
Goto Forum:
  


Current Time: Sat Aug 24 07:22:09 GMT 2024

Total time taken to generate the page: 0.03766 seconds