opensolarisの仮想化について、その2
で、早速zoneを作ってみる。
http://docs.sun.com/app/docs/doc/819-0385?l=ja
まずは、現状確認。
zoneの状態の確認
まず最初に[zoneadm list -cv*1]でzoneの状態を確認します。
opensolaris:~$ zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared
まだ、なにもしていない状態ですので、global zoneが一つあるだけです。
http://docs.sun.com/app/docs/doc/819-0385/z.conf.start-29?l=ja&a=view
zoneの構成設定
では、[zonecfg -z
opensolaris:~$ pfexec zonecfg -z my-zone my-zone: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:my-zone> create zonecfg:my-zone> set zonepath=/export/home/my-zone zonecfg:my-zone> set autoboot=true zonecfg:my-zone> add net zonecfg:my-zone:net> set address=192.168.0.6 zonecfg:my-zone:net> set physical=hme0 zonecfg:my-zone:net> set defrouter=192.168.0.1 zonecfg:my-zone:net> end zonecfg:my-zone> info
終了前に一度[info]コマンドで設定した構成を確認します。
info時の出力
zonename: my-zone zonepath: /export/home/my-zone brand: ipkg autoboot: true bootargs: pool: limitpriv: scheduling-class: ip-type: shared hostid: net: address: 192.168.0.6 physical: hme0 defrouter: 192.168.0.1
zonecfg:my-zone> exit
最後に[exit]で設定を終了します。
以上が最小設定とのこと。
だが、set physicalで設定したhme0って何を設定したんだろうか?*3
で、zoneの状態を再確認です。
opensolaris:~$ zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - my-zone configured /export/home/my-zone ipkg shared
はい、増えています。
zoneのインストール
上記でzoneの構成を作成しましたが、インストールしないと使えませんw;
なのでインストールです。
の前に、検証っと^^
作成した構成済みzoneを検証
opensolaris:~# zoneadm -z my-zone verify WARNING: /export/home/my-zone does not exist, so it could not be verified. When 'zoneadm install' is run, 'install' will try to create /export/home/my-zone, and 'verify' will be tried again, but the 'verify' may fail if: the parent directory of /export/home/my-zone is group- or other-writable or /export/home/my-zone overlaps with any other installed zones. WARNING: skipping network interface 'hme0' which may not be present/plumbed in the global zone.
zoneのパスに関しては無視*4するとして、やっぱりnetworkでエラーでてますよw;