Solarisコンテナ
Solaris 10 をインストールしてから 2ヶ月くらい絶ったけど、これといって何もしてない。
とりあえず、Solaris 10 の目玉機能の一つ「Solarisコンテナ」を作成したんで、それのログを残しておきます。
気が向いたらちょっとコメントとか入れようと思うけど、とりあえず、今日はそのまま。
途中にある zone のインストールに 20分くらいかかった。stat系は取っていなかったので、何がボルネックだったのかは不明。
# bash
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
bash-3.00#
bash-3.00#
bash-3.00# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/export/home/zone1
zonecfg:zone1> add net
zonecfg:zone1:net> set address=192.168.1.23
zonecfg:zone1:net> set physical=iprb0
zonecfg:zone1:net> end
zonecfg:zone1> add attr
zonecfg:zone1:attr> set name=comment
zonecfg:zone1:attr> set type=string
zonecfg:zone1:attr> set value="This is Test zone."
zonecfg:zone1:attr> end
zonecfg:zone1> export
create -b
set zonepath=/export/home/zone1
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add net
set address=192.168.1.23
set physical=iprb0
end
add attr
set name=comment
set type=string
set value="This is Test zone."
end
zonecfg:zone1> verify
zonecfg:zone1> commit
zonecfg:zone1> exit
bash-3.00#
bash-3.00#
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- zone1 configured /export/home/zone1
bash-3.00# ls /export/home/zone1
/export/home/zone1: ファイルもディレクトリもありません。
bash-3.00# zoneadm -z zone1 install
Preparing to install zone <zone1>.
Creating list of files to copy from the global zone.
Copying <2507> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <983> packages on the zone.
Initialized <983> packages on zone.
Zone <zone1> is initialized.
The file </export/home/zone1/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
bash-3.00#
bash-3.00#
bash-3.00#
bash-3.00# zoneadm -z zone1 install
bash-3.00# ls /export/home/zone1
root
bash-3.00#
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- zone1 installed /export/home/zone1
bash-3.00#
bash-3.00#
bash-3.00# zoneadm -z zone1 boot
bash-3.00#
bash-3.00#
bash-3.00#
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
1 zone1 running /export/home/zone1
bash-3.00#
bash-3.00#
bash-3.00# zlogin zone1
[ゾーン 'zone1' pts/7 に接続されました]
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
# #
#
#
# bash
bash-3.00# ls
bin etc home mnt platform sbin tmp var
dev export lib opt proc system usr
bash-3.00# hostname
zone1
bash-3.00#
bash-3.00#
bash-3.00#
bash-3.00# exit
# exit
[ゾーン 'zone1' pts/7 への接続が閉じられました]
とりあえず、Solaris 10 の目玉機能の一つ「Solarisコンテナ」を作成したんで、それのログを残しておきます。
気が向いたらちょっとコメントとか入れようと思うけど、とりあえず、今日はそのまま。
途中にある zone のインストールに 20分くらいかかった。stat系は取っていなかったので、何がボルネックだったのかは不明。
# bash
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
bash-3.00#
bash-3.00#
bash-3.00# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/export/home/zone1
zonecfg:zone1> add net
zonecfg:zone1:net> set address=192.168.1.23
zonecfg:zone1:net> set physical=iprb0
zonecfg:zone1:net> end
zonecfg:zone1> add attr
zonecfg:zone1:attr> set name=comment
zonecfg:zone1:attr> set type=string
zonecfg:zone1:attr> set value="This is Test zone."
zonecfg:zone1:attr> end
zonecfg:zone1> export
create -b
set zonepath=/export/home/zone1
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add net
set address=192.168.1.23
set physical=iprb0
end
add attr
set name=comment
set type=string
set value="This is Test zone."
end
zonecfg:zone1> verify
zonecfg:zone1> commit
zonecfg:zone1> exit
bash-3.00#
bash-3.00#
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- zone1 configured /export/home/zone1
bash-3.00# ls /export/home/zone1
/export/home/zone1: ファイルもディレクトリもありません。
bash-3.00# zoneadm -z zone1 install
Preparing to install zone <zone1>.
Creating list of files to copy from the global zone.
Copying <2507> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <983> packages on the zone.
Initialized <983> packages on zone.
Zone <zone1> is initialized.
The file </export/home/zone1/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
bash-3.00#
bash-3.00#
bash-3.00#
bash-3.00# zoneadm -z zone1 install
bash-3.00# ls /export/home/zone1
root
bash-3.00#
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- zone1 installed /export/home/zone1
bash-3.00#
bash-3.00#
bash-3.00# zoneadm -z zone1 boot
bash-3.00#
bash-3.00#
bash-3.00#
bash-3.00# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
1 zone1 running /export/home/zone1
bash-3.00#
bash-3.00#
bash-3.00# zlogin zone1
[ゾーン 'zone1' pts/7 に接続されました]
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
# #
#
#
# bash
bash-3.00# ls
bin etc home mnt platform sbin tmp var
dev export lib opt proc system usr
bash-3.00# hostname
zone1
bash-3.00#
bash-3.00#
bash-3.00#
bash-3.00# exit
# exit
[ゾーン 'zone1' pts/7 への接続が閉じられました]