Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: May 2015
 
 

Adding Additional Packages in a Zone by Using a Custom AI Manifest

The process of adding extra software in a zone at installation can be automated by revising the AI manifest. The specified packages and the packages on which they depend will be installed. The default list of packages is obtained from the AI manifest. The default AI manifest is /usr/share/auto_install/manifest/zone_default.xml. See Adding and Updating Software in Oracle Solaris 11.2 for information on locating and working with packages.

Example 9-1  Revising the Manifest

The following procedure adds mercurial and a full installation of the vim editor to a configured zone named my-zone. (Note that only the minimal vim-core that is part of solaris-small-server is installed by default.)

  1. Copy the default AI manifest to the location where you will edit the file, and make the file writable.

    # cp /usr/share/auto_install/manifest/zone_default.xml ~/my-zone-ai.xml
    # chmod 644 ~/my-zone-ai.xml
  2. Edit the file, adding the mercurial and vim packages to the software_data section as follows:

          <software_data action="install">
                   <name>pkg:/group/system/solaris-small-server</name>
                   <name>pkg:/developer/versioning/mercurial</name>
                   <name>pkg:/editor/vim</name>
                </software_data>
  3. Install the zone.

    # zoneadm -z my-zone install -m ~/my-zone-ai.xml

    The system displays:

    A ZFS file system has been created for this zone.
    Progress being logged to /var/log/zones/zoneadm.20111113T004303Z.my-zone.install
           Image: Preparing at /zones/my-zone/root.
    
     Install Log: /system/volatile/install.15496/install_log
     AI Manifest: /tmp/manifest.xml.XfaWpE
      SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml
        Zonename: my-zone
    Installation: Starting ...
    
                  Creating IPS image
                  Installing packages from:
                      solaris
                          origin:  http://localhost:1008/solaris/54453f3545de891d4daa841ddb3c844fe8804f55/
                   
    DOWNLOAD                                  PKGS       FILES    XFER (MB)
    Completed                              169/169 34047/34047  185.6/185.6
    
    PHASE                                        ACTIONS
    Install Phase                            46498/46498 
    
    PHASE                                          ITEMS
    Package State Update Phase                   169/169 
    Image State Update Phase                         2/2 
    Installation: Succeeded
    ...