Go to main content

Using Unified Archives for System Recovery and Cloning in Oracle® Solaris 11.3

Exit Print View

Updated: October 2017
 
 

How to Deploy a Zone From a Unified Archive

You can create and deploy Oracle Solaris Zones directly from Unified Archives. You can create new zone configurations using an archive as a template with the zonecfg command. You can install zones using zoneadm.

Note that zone configuration and zone installation are independent tasks. You can create new zone configurations from an archive and install the zone from IPS or other means. You can also use existing zone configuration and install using an archive. You can therefore source zone configurations and zone installations from different archives, as well. Refer to Creating and Using Oracle Solaris Zones for more information about zone configuration and installation.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. If you do not already have an existing zone configuration, create one from an existing archive.
    1. Clone the zone configuration using the archive.

      Create a new zone configuration called new-zone using the zonecfg command. Use the second –z option to identify the zone to be cloned.

      # zonecfg -z new-zone create -a archive -z archived-zone
    2. (Optional) Verify that the zone configuration was created.
      # zoneadm list -cv
  3. Install the zone.

    You can choose to install the zone using the software in an archive or using the software from the IPS repository.

    1. Install the zone using the archive.
      # zoneadm -z new-zone install -a archive -z archived-zone
    2. Install the zone using the IPS repository.
      # zoneadm -z new-zone install
  4. Boot the zone.
    # zoneadm -z new-zone boot
Example 11  Configuring and Deploying a Zone

This example creates a clone of example-net named test-net. The zonecfg command shown below does not require a second –z option to define the zone to cloned since the example-net-recovery.uar archive only has one deployable system.

# archiveadm info /var/tmp/example-net-recovery.uar 
Archive Information
          Creation Time:  2015-03-03T19:10:53Z
            Source Host:  example
           Architecture:  i386
       Operating System:  Oracle Solaris 11.3 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/example-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
Example 12  Installing an Existing Zone Configuration From a Unified Archive

This example installs a zone called web-server using an existing zone configuration.

# archiveadm info /var/tmp/example-dev-recovery.uar 
Archive Information
          Creation Time:  2015-03-03T19:10:53Z
            Source Host:  example
           Architecture:  i386
       Operating System:  Oracle Solaris 11.3 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.20150307T211655Z.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.20150307T211655Z.web-server.install

# zoneadm -z web-server boot
Example 13  Configuring Zones From a Unified Archive With Multiple Deployable Systems

If multiple deployable systems are contained in a Unified Archive, use the –z option in zonecfg to specify which deployable system to use. You can use only one deployable system.

# archiveadm info /var/tmp/zonearchive.uar 
Archive Information
          Creation Time:  2015-03-03T17:04:11Z
            Source Host:  example
           Architecture:  i386
       Operating System:  Oracle Solaris 11.3 X86
     Deployable Systems:  global,example-dev,example-net
# zonecfg -z test-dev create -a /var/tmp/zonearchive.uar -z example-dev

You can now install and boot the cloned zone.

Example 14  Installing Zones From a Unified Archive With Multiple Deployable Systems

If multiple deployable systems are contained in a Unified Archive, use the –z option in zoneadm to specify the deployable system to install from.

# zoneadm -z test-dev install -a /var/tmp/zonearchive.uar -z example-dev