OpenVZ Forum


Home » General » Support » ERROR: OSTEMPLATE is not set
ERROR: OSTEMPLATE is not set [message #22691] Thu, 01 November 2007 15:21 Go to next message
soptom is currently offline  soptom
Messages: 34
Registered: October 2007
Location: Greece
Member

root@master2 vz]# vzyum 001 install
/usr/share/vzpkg/functions: line 263: /etc/sysconfig/vz-scripts//001.conf: No such file or directory
ERROR: OSTEMPLATE is not set for VPS 001!

Can anybody help me with that?

Thank you
Re: ERROR: OSTEMPLATE is not set [message #22703 is a reply to message #22691] Thu, 01 November 2007 16:18 Go to previous messageGo to next message
mastersherin is currently offline  mastersherin
Messages: 35
Registered: January 2007
Location: India
Member

What is the results of the following ?

# vzpkgls
# ls -al /vz/template/
# grep -i ostemplate /etc/sysconfig/vz-scripts/001.conf



Sherinmon A,

Re: ERROR: OSTEMPLATE is not set [message #22704 is a reply to message #22703] Thu, 01 November 2007 16:34 Go to previous messageGo to next message
soptom is currently offline  soptom
Messages: 34
Registered: October 2007
Location: Greece
Member

[root@master2 vz-scripts]# vzpkgls
fedora-core-5-i386-minimal
fedora-core-5-i386-default
[root@master2 vz-scripts]# ls -al /vz/template/
total 20
drwxr-xr-x 5 root root 4096 Oct 29 22:44 .
drwxr-xr-x 8 root root 4096 Oct 30 17:47 ..
drwxr-xr-x 2 root root 4096 Nov 1 05:12 cache
drwxr-xr-x 3 root root 4096 Oct 29 22:44 centos
drwxr-xr-x 3 root root 4096 Nov 1 04:53 fedora-core
[root@master2 vz-scripts]# grep -i ostemplate /etc/sysconfig/vz-scripts/001.conf
grep: /etc/sysconfig/vz-scripts/001.conf: No such file or directory
[root@master2 vz-scripts]#
Re: ERROR: OSTEMPLATE is not set [message #22726 is a reply to message #22691] Fri, 02 November 2007 08:49 Go to previous messageGo to next message
mastersherin is currently offline  mastersherin
Messages: 35
Registered: January 2007
Location: India
Member

Hello,

What is the node ID, in which you going to install a package using vzyum ?

# vzlist -a , will give you the list of nodes

suppose '101 ' is the vEID then you can install httpd in that node as follows,

# vzyum 101 install httpd

Before that, please ensure that the os template is included in the conf

# grep -i OSTEMPLATE /etc/sysconfig/vz-scripts/101.conf
OSTEMPLATE="centos-4-i386-minimal"

#vzpkgls |grep centos-4-i386-minimal
centos-4-i386-minimal

Also " man vzyum " will help you



Sherinmon A,

Re: ERROR: OSTEMPLATE is not set [message #22732 is a reply to message #22726] Fri, 02 November 2007 12:43 Go to previous messageGo to next message
soptom is currently offline  soptom
Messages: 34
Registered: October 2007
Location: Greece
Member

Thank you.
Re: ERROR: OSTEMPLATE is not set [message #30620 is a reply to message #22726] Fri, 30 May 2008 09:25 Go to previous messageGo to next message
ittec is currently offline  ittec
Messages: 41
Registered: February 2008
Member
Hi

I have same trouble with vzyum.

Kernel: Linux 2.6.18-53.1.13.el5.028stab053.10PAE #1 SMP Tue Apr 1 15:44:34 MSD 2008 i686 i686 i386 GNU/Linux

Templates:
centos-5-i386-minimal
centos-5-i386-default
centos-4-i386-minimal
centos-4-i386-default

But its very strange. I have followed the answers of mastersherin to find a solution. I found some errors in some vz.conf of some templates, some of them hasn't OSTEMPLATE configured. Currently I have 9 VE running. But there are containers that is impossible to update with vzyum. Error is :

exec /usr/share/vzyum/bin/yum -c /vz/template/centos/5/i386/config/yum.conf --installroot /vz/root/249032 --vps=249032 update
rpmdb: unable to initialize mutex: Argumento inválido
rpmdb: PANIC: Argumento inválido
rpmdb: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30977)
error: cannot open Packages database in /vz/root/249032/var/lib/rpm
Traceback (most recent call last):
  File "/usr/share/vzyum/bin/yum", line 28, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/vzyum/yum-cli/yummain.py", line 75, in main
    base.getOptionsConfig(args)
  File "/usr/share/vzyum/yum-cli/cli.py", line 172, in getOptionsConfig
    self.doConfigSetup(fn=opts.conffile, root=root, vps=opts.vps)
  File "/usr/share/vzyum/lib/yum/__init__.py", line 82, in doConfigSetup
    self.conf = config.yumconf(configfile=fn, root=root, vps=vps)
  File "/usr/share/vzyum/lib/yum/config.py", line 271, in __init__
    self.yumvar['releasever'] = self._getsysver()
  File "/usr/share/vzyum/lib/yum/config.py", line 384, in _getsysver
    idx = ts.dbMatch('provides', self.getConfigOption('distroverpkg'))
TypeError: rpmdb open failed


Conf file with vzyum error:
# grep OSTEMPLATE /etc/sysconfig/vz-scripts/249032.conf


OSTEMPLATE="centos-5-i386-minimal"

this template is installed in /vz/template/cache...any more ideas to solve this? Embarassed
Re: ERROR: OSTEMPLATE is not set [message #30622 is a reply to message #22691] Fri, 30 May 2008 11:21 Go to previous messageGo to next message
soptom is currently offline  soptom
Messages: 34
Registered: October 2007
Location: Greece
Member

Dear Friend, it is been a long i quit openVZ so i dont remenber almost anything.
Regards
Re: ERROR: OSTEMPLATE is not set [message #30630 is a reply to message #30620] Fri, 30 May 2008 12:14 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

did this problem appear unexpectedly or this is a persistent problem with centos-5-i386-minimal template? Can you reproduce it with newly created VE based on that template?

May be somebody corrupted rpm database inside VE.
May be it's worth rebuild data base inside VE?
"rpm --rebuilddb"
Previous Topic: 49 VE as limit?
Next Topic: Install problem : 'vz' is not a valid service name
Goto Forum:
  


Current Time: Wed Jul 10 02:31:19 GMT 2024

Total time taken to generate the page: 0.02473 seconds