詳細は、Oracle Solaris 11.2 でのユーザーとプロセスのセキュリティー保護 の割り当てられている管理権利の使用を参照してください。
zonecfg コマンドを使用して、new-zone と呼ばれる新しいゾーン構成を作成します。2 番目の –z オプションを使用して、クローニングするゾーンを指定します。
# zonecfg -z new-zone create -a archive -z archived-zone
# zoneadm list -cv
アーカイブ内のソフトウェアを使用してゾーンをインストールするか、IPS リポジトリのソフトウェアを使用してインストールするかを選択できます。
# zoneadm -z new-zone install -a archive -z archived-zone
# zoneadm -z new-zone install
# zoneadm -z new-zone boot
この例では、test-net という名前の example-net のクローンを作成します。example-net-recovery.uar アーカイブには配備可能なシステムが 1 つしかないため、次に示す zonecfg コマンドでは、クローン対象のゾーンを定義する 2 番目の –z オプションは必要ありません。
# archiveadm info /var/tmp/example-net-recovery.uar Archive Information Creation Time: 2014-03-03T19:10:53Z Source Host: example Architecture: i386 Operating System: Oracle Solaris 11.2 X86 Deployable Systems: example-net # zonecfg -z test-net create -a /var/tmp/example-net-recovery.uar # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - example-net installed /zones/example-net solaris excl - example-dev installed /zones/exmaple-dev solaris excl - test-net configured /zones/test-net solaris excl # zoneadm -z test-net install -a /var/tmp/example-net-recovery.uar Progress being logged to /var/log/zones/zoneadm.20131010T175728Z.test-net.install Image: Preparing at /zones/test-net/root. AI Manifest: /tmp/manifest.xml.caa4I2 SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml Zonename: test-net Installation: Starting ... . . Installation: Succeeded Note: Man pages can be obtained by installing pkg:/system/manual done. Done: Installation completed in 393.186 seconds. Next Steps: Boot the zone, then log into the zone console (zlogin -C) to complete the configuration process. Log saved in non-global zone as /zones/test-net/root/var/log/zones/zoneadm.20131010T175728Z.test-net.install # zoneadm -z test-dev boot使用例 2-10 統合アーカイブから既存のゾーン構成をインストールする
この例では、既存のゾーン構成を使用して、web-server と呼ばれるゾーンをインストールします。
# archiveadm info /var/tmp/example-dev-recovery.uar Archive Information Creation Time: 2014-03-03T19:10:53Z Source Host: example Architecture: i386 Operating System: Oracle Solaris 11.2 X86 Deployable Systems: example-dev # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - example-net installed /zones/example-net solaris excl - example-dev installed /zones/example-dev solaris excl - web-server configured /zones/web-server solaris excl # zoneadm -z web-server install -a /data/archives/example-dev-recovery.uar Progress being logged to /var/log/zones/zoneadm.20140307T211655Z.web-server.install Installing: This may take several minutes... Install Log: /system/volatile/install.8799/install_log AI Manifest: /tmp/manifest.web-server.qCaakr.xml Zonename: web-server Installation: Starting ... . . Updating non-global zone: Zone updated. Result: Attach Succeeded. Done: Installation completed in 140.828 seconds. Next Steps: Boot the zone, then log into the zone console (zlogin -C) to complete the configuration process. Log saved in non-global zone as /system/zones/web-server/root/var/log/zones/zoneadm.20140307T211655Z.web-server.install # zoneadm -z web-server boot使用例 2-11 配備可能な複数のシステムを含む統合アーカイブからゾーンを構成する
配備可能な複数のシステムが統合アーカイブに含まれている場合は、zonecfg の –z オプションを使用して、どの配備可能なシステムを使用するかを指定します。配備可能なシステムを 1 つのみ使用できます。
# archiveadm info /var/tmp/zonearchive.uar Archive Information Creation Time: 2014-03-03T17:04:11Z Source Host: example Architecture: i386 Operating System: Oracle Solaris 11.2 X86 Deployable Systems: global,example-dev,example-net # zonecfg -z test-dev create -a /var/tmp/zonearchive.uar -z example-dev
これでクローニングしたゾーンをインストールしてブートできます。
使用例 2-12 配備可能な複数のシステムを含む統合アーカイブからゾーンをインストールする配備可能な複数のシステムが統合アーカイブに含まれている場合は、zoneadm の –z オプションを使用して、どの配備可能なシステムからインストールするかを指定します。
# zoneadm -z test-dev install -a /var/tmp/zonearchive.uar -z example-dev