1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LXCでCentOS5.11 i386

Last updated at Posted at 2015-02-14
  • lxcでuname -m : i686
  • dockerでuname -m : x86_64
    • dockerでは気をつけないとx86_64のパッケージが入る。

作成

lxc-create -n centos5 -t centos -- --release 5 --arch i686

失敗する場合は以下を適用しておくこと。

ネットワーク設定

  • 以下のように設定。
/var/lib/lxc/centos5/config
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.100.7/24
lxc.network.ipv4.gateway = 192.168.100.1
lxc.network.name = eth0

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br1
lxc.network.ipv4 = 192.168.0.7/24
lxc.network.name = eth1
  • ifcfg-eth0が存在しDHCP設定が入っているのでどける
cd /var/lib/lxc/centos5
mv rootfs/etc/sysconfig/network-scripts/ifcfg-eth0{,.bak}

起動

lxc-start -n centos5
lxc-attach -n centos5
export PATH=$PATH:/bin
yum groupinstall -y Core
yum install -y \
  python-simplejson bash sudo patch wget make gcc screen curl net-tools

OpenVzのイメージを動かすには lxc で CentOS 5 コンテナ - TenForwardの日記 もありだと思った。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?