hnakamur’s blog

ものすごい勢いで忘れる私のために未整理でもいいからとりあえずメモ

2008-11-24

Linux-VServerのゲストOSとしてCentOSをインストール(続き)



Linux-VServerのゲストOSとしてCentOSをインストールの続き


ゲストOSのインストールが遅いのはyumのダウンロードのミラーが遅いことに気づき、/usr/lib/util-vserver/distributions/centos5/yum.repo.d/CentOS-Base.repoを書き換えたら、よくなった。


しかし、次の問題が発生。



# vserver vserver1 build -m yum --context 42 --hostname vserver1.local \
--interface eth0:192.168.1.11/24 -- -d centos5
You are using a version of yum which is insecure and broken in chroot
related operations; either apply the patches shipped in the 'contrib/'
directory of util-vserver, or ask the author of yum to apply them
(preferred).

In the meantime, 'vyum' will continue with dirty hacks which might not
work when the vserver is running and local DOS attacks are possible.

Execution will continue in 5 seconds...
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 236, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 152, in main
(result, resultmsgs) = base.buildTransaction()
File "/var/lib/python-support/python2.4/yum/__init__.py", line 626, in buildTransaction
(rescode, restring) = self.resolveDeps()
File "/var/lib/python-support/python2.4/yum/depsolve.py", line 663, in resolveDeps
CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
File "/var/lib/python-support/python2.4/yum/depsolve.py", line 746, in _resolveRequires
thisneeds = self._checkInstall(txmbr)
File "/var/lib/python-support/python2.4/yum/depsolve.py", line 788, in _checkInstall
provs = self.tsInfo.getProvides(*req)
File "/var/lib/python-support/python2.4/yum/transactioninfo.py", line 428, in getProvides
result = self.getOldProvides(name, flag, version)
File "/var/lib/python-support/python2.4/yum/transactioninfo.py", line 421, in getOldProvides
for pkg, hits in self.rpmdb.getProvides(name, flag, version).iteritems():
File "/var/lib/python-support/python2.4/yum/rpmsack.py", line 397, in getProvides
pkgs = self.searchProvides(name)
File "/var/lib/python-support/python2.4/yum/rpmsack.py", line 156, in searchProvides
return self.searchPrco(name, 'provides')
File "/var/lib/python-support/python2.4/yum/rpmsack.py", line 139, in searchPrco
mi = ts.dbMatch(tag, name)
TypeError: unknown key type


testingのyumを入れたのは失敗でしたよ。というわけでstableのに戻します(もっといいやり方があるかもしれないけどとりあえずこれで)。



# aptitude uninstall yum
# aptitude install yum


vyumがyumについてエラーを言うのはYum-patch - Linux-VServerで対応するようだ。これは後日やってみよう。


とりあえず今度こそvserverのbuildはエラーなく終わりました。


Building Guest Systems - Linux-VServerに従って動作確認。



root@debian:~# vserver vserver1 start
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
root@debian:~# vserver vserver1 enter
bash-3.2# pwd
/
bash-3.2# ifconfig
eth0 Link encap:Ethernet HWaddr 00:FF:2A:6F:C4:80
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)
Interrupt:2

bash-3.2# logout
root@debian:~#


おー、動きましたよ。


停止と状態確認はこれで。



root@debian:~# vserver vserver1 stop
Shutting down kernel logger: [FAILED]
Shutting down system logger: [ OK ]
Starting killall: [ OK ]
root@debian:~# vserver vserver1 status
Vserver 'vserver1' is stopped


上のFAILEDのときにコンソールでは以下のようなメッセージが表示されてた。



vxW: [xid #0] !!! limit: de75704c[VM,9] = 75 on exit.
vxW: [xid #0] !!! limit: dd34b04c[VM,9] = 76 on exit.
vxW: [xid #0] !!! limit: dd3a904c[VM,9] = 153 on exit.
vxW: [xid #0] !!! limit: dd11704c[VM,9] = 29 on exit.


これもおいおい調べよう。





0 件のコメント:

ブログ アーカイブ