トップページ » Solaris10 Zone機能 » とりあえず zone を作ってみよう。
カテゴリー
My Yahoo!に追加
Sun社提供情報
Solarisパッケージダウンロード
Sunマシンは買うには
blogs.sun.com
お勧めサイト
プライベートリンク

とりあえず zone を作ってみよう。

とりあえず、test-zoneという名前でゾーンを作ってみる。

SF15K domain-a# zonecfg -z test-zone
test-zone: そのような構成済みゾーンはありません
'create' を使用して、新しいゾーンの構成を開始します。
zonecfg:test-zone> create
zonecfg:test-zone> set zonepath=/export/test-zone
zonecfg:test-zone> set autoboot=true
zonecfg:test-zone> add net
zonecfg:test-zone:net> set physical=qfe0
zonecfg:test-zone:net> set address=192.168.110.104
zonecfg:test-zone:net> end
zonecfg:test-zone> info
zonepath: /export/test-zone
autoboot: true
pool:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: 192.168.110.104
physical: qfe0
zonecfg:test-zone> exit
SF15K domain-a#

上記設定は/etc/zones/zonename.xmlにXML形式で保存される。

SF15K domain-a# more /etc/zones/test-zone.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zone PUBLIC "-//Sun Microsystems Inc//DTD Zones//EN"
"file:///usr/share/lib/xml/dtd/zonecfg.dtd.1">
<!--
    DO NOT EDIT THIS FILE.  Use zonecfg(1M) instead.
-->
<zone name="test-zone" zonepath="/export/test-zone"
autoboot="true">
  <inherited-pkg-dir directory="/lib"/>
  <inherited-pkg-dir directory="/platform"/>
  <inherited-pkg-dir directory="/sbin"/>
  <inherited-pkg-dir directory="/usr"/>
  <network address="192.168.110.104" physical="qfe0"/>
</zone>

ちなみに設定の意味は
/export/test-zoneディレクトリ以下にtest-zoneの全てのデータが入り、
192.168.110.104というアドレスをtest-zoneに割り当てている。
またデフォルトでinherit-pkg-dirという項目によりlofsでRead-Onlyで/lib, /platform, /usr, /sbin がtest-zoneにマウントされるように設定されている。
これは変更することもできるが、/usrなどはかなりの容量なのでこのままの方が効率的。
(必要な箇所だけRead-Writeでマウントできるようにすることも可能なので実用上は問題なし)

zoneadmコマンドでゾーンの状態を確認できる。
test-zoneはまだ構成しただけなのでconfiguredというステータスになっている。

SF15K domain-a# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- test-zone configured /export/test-zone

以下のコマンドでtest-zoneにインストールをし、稼動できるようにする。

SF15K domain-a# zoneadm -z test-zone install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2616> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1023> packages on the zone.
Initializing package <316> of <1023>: percent complete: 30%
...
省略

インストールが終了したらもう一度ステータスを確認し、test-zoneを起動する。

SF15K domain-a# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
- test-zone installed /export/test-zone

SF15K domain-a# zoneadm -z test-zone boot

プロンプトが帰ってきたら以下のコマンドでtest-zoneに接続する。
-Cをつけることでコンソール接続が可能になる。
(インストール直後はシステムの初期設定があるので-Cをつける)

SF15K domain-a# zlogin -C test-zone
21/100 <--- インストール直後はサービスの登録に時間がかかるのでしばらく待つ。

あとは画面の指示に従って、ホスト名、ネームサービス、test-zoneのrootパスワードなどを設定する。

これで終わり。
「~.」でコンソール接続を切り、globalゾーンからもう一度ステータスを確認してみる。

SF15K domain-a# zoneadm list -vc
ID NAME STATUS PATH
0 global running /
1 test-zone running /export/test-zone

あとは zlogin test-zone などでログインして、通常のシステムのように操作できる。

Solaris10 Zone機能のその他のリンク

Solaris系技術トレーニング一覧

Solaris10システム管理基本コース
Solaris10ネットワーク・インターネットサーバー管理コース
セキュリティ・パフォーマンス管理・トラブルシューティング等
Sun Cluster、ボリューム管理ソフトウェア
仮想化技術全般
シンクライアント、SunRay、デスクトップソフトウェア
アイデンティティマネージメントサービス
アプリケーションサーバーとWebポータル
サーバー(ハードウェア)メンテナンス
Sun Java CAPS
MySQL

コメント

Thvrl0 wpispjigqhks, [url=http://ucubsqkrqsvi.com/]ucubsqkrqsvi[/url], [link=http://osqrkzpwghok.com/]osqrkzpwghok[/link], http://xtnpbyvhvdwm.com/

Posted by: ttjsihpmfjy : 2010年01月22日 19:06

LMzuQt cjcrtuuiwafb, [url=http://dxgnkszpdgvu.com/]dxgnkszpdgvu[/url], [link=http://nnnsvfrhopxc.com/]nnnsvfrhopxc[/link], http://xmbeeffvidux.com/

Posted by: zqugmqbr : 2010年02月25日 13:53

LMzuQt cjcrtuuiwafb, [url=http://dxgnkszpdgvu.com/]dxgnkszpdgvu[/url], [link=http://nnnsvfrhopxc.com/]nnnsvfrhopxc[/link], http://xmbeeffvidux.com/

Posted by: zqugmqbr : 2010年02月25日 13:53
コメントする









名前、アドレスを登録しますか?