OpenSolaris Automated Installer Guide
Previous Next

How to Create New AI Manifests

When you create an install service by using the installadm create-service command, an AI manifest is automatically copied to the install service. This manifest has default settings that are sufficient for client installations. However, you can change the specifications in an existing manifest to create specific installations for specific clients.

The default AI manifest that is provided with install services is as follows:

Example 6-1 Default AI Manifest
<ai_criteria_manifest>
    <ai_embedded_manifest>
        <ai_manifest name="default">
            <ai_pkg_repo_default_authority>
                <main url="http://pkg.opensolaris.org/release" authname="opensolaris.org"/>
                <mirror url=""/>
            </ai_pkg_repo_default_authority>
            <ai_install_packages>
                <pkg name="entire"/>
                <pkg name="SUNWcsd"/>
                <pkg name="SUNWcs"/>
                <pkg name="babel_install"/>
            </ai_install_packages>
            <ai_uninstall_packages>
                    <pkg name="babel_install"/>
                    <pkg name="slim_install"/>
            </ai_uninstall_packages>
            <ai_auto_reboot>
                false
            </ai_auto_reboot>
        </ai_manifest>
    </ai_embedded_manifest>
    <sc_embedded_manifest name = "AI">
        <!-- <"xml version='1.0'">
        <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
        <service_bundle type="profile" name="name">
            <service name="ai_properties" version="1" type="service">
                <instance name="default" enabled="true">
                    <property_group name="ai" type="application">
                        <propval name="username" type="astring" value="jack"/>
                        <propval name="userpass" type="astring" value="9Nd/cwBcNWFZg"/>
                        <propval name="description" type="astring" value="default_user"/>
                        <propval name="rootpass" type="astring" \
value="$5$VgppCOxA$ycFmYW4ObRRHhtsGEygDdexk5bugqgSiaSR9niNCouC"/>
                        <propval name="timezone" type="astring" value="US/Pacific"/>
                        <propval name="hostname" type="astring" value="opensolaris"/>
                    </property_group>
                </instance>
             </service>
        </service_bundle>
    -->
    </sc_embedded_manifest>
</ai_criteria_manifest>

AI Manifest Contents

The AI manifest is an XML file that contains a series of fields and field values. Each field and value is enclosed inside XML tags.

The XML tags all contain a start tag, such as <name>, and an ending tag, such as </name>. Within each tag, a tag name is given, then that tag's value is given. A tag is a parameter that specifies a piece of information about the manifest itself or about the manifest's installation specifications. Each tag has a value that can be edited to modify the manifest information or to modify the installation specifications in the manifest.

For example, see this line in the manifest:

<ai_manifest name="default">

This <ai_manifest name> tag assigns a name to the manifest. The value that is given for this tag is “default.” You can change this value.


Note - The <ai_manifest name> tag with the value, “default,” indicates that the manifest is the default manifest. There can be only one default manifest per install service. You can modify or replace the default manifest.


Note the following information about other fields in the AI manifest:

  • You can use the <ai_target_device> tag to specify a particular target disk on which to install the OpenSolaris OS. See Defining an Install Target. If you do not specify a target disk, the automated installer chooses a default target for installing the OpenSolaris OS.

    The default target disk is selected as follows:

    1. The installer gets the recommended size for installing the OpenSolaris OS from the AI libraries. Currently, the recommended size is 12 GB.

    2. The installer searches for available disks on the client.


      Note - The installer selects only the following types of disks:

      • For SPARC clients, the installer searches for disks with a VTOC label.

      • For x86 clients, the installer searches for Solaris partitions.


    3. When the first disk is found, the installer checks the size of that disk.

      • If the size is greater than or equal to the recommended size, the installer selects the disk and returns to the installation procedure.

      • If the size is less than the recommended size, the installer goes to the next disk to check the size.

    4. If there is no match, the automated installation fails.

  • The tag, <ai_pkg_repo_default_authority>, defines the IPS repository from which the installation will be performed. You need to provide the URL of the IPS repository and the authority. In the default AI manifest, the IPS repository is set to http://pkg.opensolaris.org/release/, and the authority is defined as opensolaris.org.

  • In the tag, <ai_install_packages>, the default manifest instructs the automated installer to install the following packages to the client:

    • entire

    • SUNWcsd

    • SUNWcs

    • babel_install

  • The tag, <ai_uninstall_packages>, lists packages, babel_install and slim_install, that will be uninstalled from the client.


    Note - Why does the default manifest first install the babel_install package, then uninstall it?

    babel_install is a cluster consisting of a set of packages. When the babel_install cluster is installed, all the packages in the cluster are installed. However, you cannot uninstall packages that belong to a cluster. By uninstalling the cluster definition, the individual packages can be deleted later. babel_install is used for convenience to install all the required packages, but the cluster definition is not needed after installation of packages are completed. The default manifest removes the cluster definition, so that further customization of the packages can be done.

    slim_install is another cluster. And, slim_install is part of babel_install which is installed by the default manifest. The default manifest uninstalls slim_install, in order to permit customization.


  • The tag, <ai_auto_reboot>, can be used to request automatic reboot after successful installation. The default value is false, meaning that the client doesn't automatically reboot after successful installation. If this value is changed to true, the client automatically reboots after successful installation.

  • The second part of the default AI manifest is an embedded SC manifest, beginning at the line:

    <sc_embedded_manifest name = "AI">

    For instructions about how to modify the SC manifest, see How to Create Custom SC Manifest Files.


Note - For a complete summary of the AI manifest contents and possible values, see AI Manifest Contents.


How to Replace the Default AI Manifest

You can replace the default AI manifest for an install service with a manifest that you created and revised to suit specific client specifications. Use the following procedure:

  1. Copy the automated installer's default manifest from the target image path that is associated with the install service you plan to use.

    The target image path can be determined with the following command:

    # svccfg -s svc:/system/install/server:default listprop AI<svcname>/image_path

    For example, see the following command and output:

    # svccfg -s svc:/system/install/server:default listprop AIsvc1/image_path \
    AIsvc1/image_path astring /export/aiserver/svc1

    In the above example, the install service, svc1, has an image path of /export/aiserver/svc1. The default manifest, default.xml, located in this image path is at:

    /export/aiserver/svc1/auto_install/default.xml

    Note - Only install services that were created with OpenSolaris 2009.06 images contain the default.xml manifest file in the image path. For services created with older images, you can copy the default.xml manifest located on the install server at /usr/share/auto_install/default.xml.


  2. Keep the <ai_manifest name> tag in your manifest copy set to the value of default.

  3. Revise the <ai_embedded_manifest> and <sc_embedded_manifest> sections of your copy as needed.

  4. Use the installadm add command to replace the default manifest for an existing install service with your copy as follows:

    # /usr/sbin/installadm add -m manifest_file -n svc_name

    Where manifest_file is the name of the manifest copy that you created and modified, and where svc_name is the name of the install service.

    The installadm add command validates your manifest before replacing the default manifest.


Note - The build number or release of the OpenSolaris operating system that you specify in the AI manifest must match the build number or release of the AI ISO image that you specify in the installadm create-service command with the -s option. For further information, see Specifying Packages to Install a Specific Version of OpenSolaris.


Examples of Modifying AI Manifest Contents

The following examples show other options for modifying the contents of AI manifests.


Note - The examples in this section are partial excerpts from AI manifest files, showing only the fields being discussed in that example. Only the last example shows a complete AI manifest.


For a complete list of the AI manifest contents and possible values, see AI Manifest Contents.

Defining an Install Target

To specify a target on a client for installing the OpenSolaris OS, use the tag, <ai_target_device>, as follows:

<ai_target_device>
     <target_device_name>c0t0d0</target_device_name>
</ai_target_device>

If you do not specify a target disk, the automated installer chooses a default target for installing the OpenSolaris OS. See 14. How is the default target disk selected?.

Using an MPXIO Name as the Install Target

An MPXIO name, such as c0t0000002037CD9F72d0, can be used instead of cXtXdX since the MPXIO name for the device doesn't change between releases. To use the MPXIO device name as the target device, use the MPXIO name, as per the following snippet:

<ai_target_device>
     <target_device_name>c0t0000002037CD9F72d0</target_device_name>
</ai_target_device>
Selecting a VTOC Slice to Install OpenSolaris

If a slice isn't specified, the automated installer, by default, selects slice 0 on the client to install the OpenSolaris OS. If you would like to install the OpenSolaris OS on a different slice, you can specify the slice in the AI manifest in the <ai_target_device> tag.

This example instructs the installer to install the OpenSolaris OS on slice 4.

<ai_target_device>
     <target_device_name>c0t0000002037CD9F72d0</target_device_name>
     <target_device_install_slice_number>4</target_device_install_slice_number>
</ai_target_device>
Automatic Reboot After Installation

By default, the automated installer doesn't reboot the client after successful installation of an OpenSolaris OS. However, if you want the client to automatically reboot after a successful installation of the OpenSolaris OS, add the XML tag, <ai_auto_reboot>, in the AI manifest, and set the reboot value in that tag to true, as per the following snippet:

<ai_auto_reboot>
     true
</ai_auto_reboot>
Deleting an fdisk Partition (X86 only)

Note - Partition operations are meaningful only for X86 clients.


You can delete existing partitions during client installation. Use the tag, <ai_device_partitioning>, and specify the delete action in the tag to delete a partition during installation.

<ai_device_partitioning>
      <partition_action>delete</partition_action>
      <partition_number>3</partition_number>
</ai_device_partitioning>
Creating an fdisk Partition (X86 only)

Note - Partition operations are meaningful only for X86 clients.


You can create a new partition during client installation. Use the tag, <ai_device_partitioning>, and specify the create action in the tag to create a partition during installation.

The following example creates a Solaris partition. This example uses Gigabytes (GB) as the unit for partition size. You could use megabytes (MB), terabytes (TB), or sectors to define a partition.

<ai_device_partitioning>
      <partition_action>create</partition_action>
      <partition_type>SOLARIS</partition_type>
      <partition_size>30</partition_size>
      <partition_size_units>GB</partition_size_units>
</ai_device_partitioning>
Deleting a VTOC Slice

You can delete an existing VTOC slice during client installation. Use the tag, <ai_device_vtoc_slices>, and specify the delete action in the tag to delete a slice during installation.


Note - The size element is required, but only for XML validation.


<ai_device_vtoc_slices>
       <slice_action>delete</slice_action>
       <slice_number>0</slice_number>
       <slice_size>20</slice_size>
</ai_device_vtoc_slices>
Creating a VTOC Slice

You can create a new VTOC slice during client installation. Use the tag, <ai_device_vtoc_slices>, and specify the create action in the tag to create a slice during installation. The following example shows how to create a new slice 5.

This example uses GB (Gigabytes) as the unit for slice size.

<ai_device_vtoc_slices>
       <slice_action>create</slice_action>
       <slice_number>5</slice_number>
       <slice_size>20</slice_size>
       <slice_size_units>GB</slice_size_units>
</ai_device_vtoc_slices>
Preserving VTOC Slices

You can preserve an existing VTOC slice during client installation. Use the tag, <ai_device_vtoc_slices>, and specify the “preserve” action in the tag to preserve an existing slice during installation. The following example shows how to preserve VTOC slice 7.

<ai_device_vtoc_slices>
       <slice_action>preserve</slice_action>
       <slice_number>7</slice_number>
</ai_device_vtoc_slices>
Specifying an IPS Repository

The automated installer client must install packages from an IPS repository. The IPS repository can be defined in the AI manifest by using the tag <ai_pkg_repo_default_authority>. This example specifies the repository located at http://pkg.opensolaris.org. The name of this repository is opensolaris.org.

<ai_manifest name="ai_manifest1">
      <ai_pkg_repo_default_authority>
          <main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
      </ai_pkg_repo_default_authority>
</ai_manifest>
Specifying an IPS Repository Mirror

You can add a mirror to an IPS repository in the AI manifest as in this example:

<ai_manifest name="ai_manifest1">
      <ai_pkg_repo_default_authority>
          <main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
          <mirror url="http://mymirror.test">
      </ai_pkg_repo_default_authority>
</ai_manifest>
Specifying an HTTP Proxy to Reach an IPS Repository

The client needs to reach the IPS repository defined in the AI manifest to install the OpenSolaris OS. In a normal configuration, the DHCP server sends DNS information to the client. This information is used to resolve the IPS repository name to an IP address. In cases where DNS is not set up, an HTTP proxy can be used to resolve the IPS repository name and complete the client installation. The XML tag, <ai_http_proxy>, and value in the manifest can contain the URL of the proxy as follows:

<ai_manifest name="http_proxy">
     <ai_pkg_repo_default_authority>
         <main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
     </ai_pkg_repo_default_authority>
     <ai_http_proxy url="http://129.101.77.121:8080"/>
</ai_manifest>
Specifying Packages to be Installed

The following packages are needed for a successful installation of the OpenSolaris OS and are included in the AI default manifest:

  • entire

  • SUNWcsd

  • SUNWcs

  • babel_install

In the <ai_install_packages> tag, you can additional packages to be added during installation. However, you need to retain the default packages along with the additional packages.

In the following example, the openoffice and the SUNWTcl packages are added as part of the OpenSolaris installation.

<ai_manifest name="ai_packages">
     <ai_install_packages>
         <pkg name="entire"/>
         <pkg name="SUNWcsd"/>
         <pkg name="SUNWcs"/>
         <pkg name="babel_install"/>
         <pkg name="openoffice"/>
         <pkg name="SUNWTcl"/>
     </ai_install_packages>
     <ai_uninstall_packages>
         <pkg name="babel_install"/>
         <pkg name="slim_install"/>
     </ai_uninstall_packages>
</ai_manifest>

Note - The default manifest first installs the babel_install package, then uninstalls it. babel_install is a cluster consisting of set of packages. When the babel_install cluster is installed, all the packages in the cluster are installed. However, you cannot uninstall packages that belong to a cluster. By uninstalling the cluster definition, the individual packages can be deleted later. babel_install is used for convenience to install all the required packages, but the cluster definition is not needed once installation of packages is completed. The default manifest removes the cluster definition, so that further customization of the packages can be done.

slim_install is another cluster. And, slim_install is part of babel_install which is installed by the default manifest. The default manifest then uninstalls slim_install, in order to permit customization.


Specifying Packages to Install a Specific Version of OpenSolaris

If the packages are specified as package names in the manifest without a version noted, the automated installer installs the latest version of the packages. If you want to install a specific version of the OpenSolaris OS, you can specify the version in the package entire.

The IPS repositories include the full FMRI for each version of a package. Use the FMRI string to specify a specific version of the package, entire, in the AI manifest.

The following example specifies that OpenSolaris build 111 be installed to the client.

<ai_manifest name="ai_packages">
     <ai_install_packages>
         <pkg name="entire@0.5.11-0.111"/>
         <pkg name="SUNWcsd"/>
         <pkg name="SUNWcs"/>
         <pkg name="babel_install"/>
         <pkg name="openoffice"/>
         <pkg name="SUNWTcl"/>
     </ai_install_packages>
     <ai_uninstall_packages>
         <pkg name="babel_install"/>
         <pkg name="slim_install"/>
     </ai_uninstall_packages>
</ai_manifest>

Note - The build number or release of the AI ISO image that you specify in the installadm create-service command must be the same build number or release of the OpenSolaris operating system that you specify in the AI manifest.


Installing From More Than One IPS Repository

You can install custom packages from an IPS repository other than the repository that was used for installation by specifying additional IPS repositories in the AI manifest. Use the tag, <ai_pkg_repo_additional_authority>, to add additional repositories to the AI manifest.

<ai_manifest name="example1">
    <ai_pkg_repo_default_authority>
        <main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
    </ai_pkg_repo_default_authority>
    <ai_pkg_repo_additional_authority>
        <main url="http://pkg.mydomain" authname="mydomain"/>
    </ai_pkg_repo_additional_authority>
</ai_manifest>

Note - Sometimes a package might be included in more than one repository. IPS searches for that package in the repositories according to the order of the repository in the manifest. When a package match that includes version number is found, then IPS stops the search and installs that package.


A Complete AI Manifest

The following example shows a complete AI manifest where all the primary fields are in use.

<ai_manifest name="ai_manifest1">
     <ai_target_device>
         <target_device_name>c0t0d0</target_device_name>
     </ai_target_device>                <!-- delete partition 3 -->
     <ai_device_partitioning>
         <partition_action>delete</partition_action>
         <partition_number>3</partition_number>
     </ai_device_partitioning>
     <ai_device_partitioning>               <!-- Create solaris partition -->
         <partition_action>create</partition_action>
         <partition_size>30</partition_size>
         <partition_size_units>GB</partition_size_units>
         <partition_type>SOLARIS</partition_type>
     </ai_device_partitioning>
     <ai_device_vtoc_slices>                <!-- Create VTOC slice 4 -->
         <slice_action>create</slice_action>
         <slice_number>0</slice_number>
         <slice_size>30</slice_size>
         <slice_size_units>GB</slice_size_units>
     </ai_device_vtoc_slices>
     <ai_pkg_repo_default_authority>               <!-- IPS repository -->
         <main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
     </ai_pkg_repo_default_authority>
     <ai_http_proxy url="http://129.101.77.121:8080"/>       <!-- Use http proxy to install pkgs from IPS -->
     <ai_auto_reboot>true</ai_auto_reboot>            <!-- Automatic reboot after successful installation -->
     <ai_install_packages>
         <pkg name="entire"
         <pkg name="SUNWcsd"/>
         <pkg name="SUNWcs"/>
         <pkg name="babel_install"/>
         <pkg name="SUNWTcl"/>
     </ai_install_packages>
     <ai_uninstall_packages>
         <pkg name="babel_install"/>
         <pkg name="slim_install"/>
     </ai_uninstall_packages>
</ai_manifest>
Previous Next