Creating the Manifest Files
In the automated installer application, three kinds of manifest files are provided in
each service; AI manifest files, SC manifest files, and criteria manifest files. These manifest files are XML files
that provide specifications for client installation.
The AI manifest file is a blueprint that provides the configuration source and the service properties for an automated installation service. Some of the parameters defined by the AI manifest file are disk target, disk partitions, and IPS repository.
The SC manifest file provides system configuration specifications for the installed image. Some of the configuration parameters supported are timezone, root password, and adding a username and password to the installed system.
The criteria manifest file is the bridge that connects the AI manifest file and the SC manifest file with a client. The administrator uses the criteria manifest file to add an AI manifest to a service. The client sends its hardware characteristics to the install service and gets a manifest file that was assigned by the administrator.
Default manifest files are included when you create an OSInstall service by using
the installadm create-service utility. You can create additional manifest files by copying, renaming, and
customizing an existing manifest file.
Use the following procedure to customize your manifest files.
Create a custom AI manifest file.
Create a custom SC manifest file.
Create a custom criteria manifest file based on the client criteria. The location of the AI manifest file and the location of the SC manifest file are specified inside the criteria manifest file.
Associate the new criteria manifest file with an existing service by using the installadm add utility. Add the criteria manifest to the install service by executing the following command:
installadm add -M manifest -n svcname
The following sections provide specific examples for each step in this process.
Creating AI Manifest Files
After you have created a service, you can edit the default AI
manifest files associated with that service to customize the properties of an installed client.
Include the parameters that you need and omit parameters that are not needed
for your custom file. See the following examples.
Example 2-1 AI Manifest With All Fields Defined
<ai_manifest name="example_with_all_defined">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
<target_device_type>SCSI</target_device_type>
<target_device_vendor>toshiba</target_device_vendor>
<target_device_size>20480</target_device_size>
<target_device_use_solaris_partition>true</target_device_use_solaris_partition>
</ai_target_device>
<ai_device_partitioning>
<partition_action>create</partition_action>
<partition_number>1</partition_number>
<partition_start_sector>200</partition_start_sector>
<partition_size>20480</partition_size>
<partition_type>191</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices>
<slice_action>create</slice_action>
<slice_number>4</slice_number>
<slice_size>20480</slice_size>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="https://pkg.opensolaris.org" authname="opensolaris.org"/>
</ai_pkg_repo_default_authority>
<ai_packages>
<package_name>SUNWcsd</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWcs</package_name>
</ai_packages>
<ai_packages>
<package_name>slim_install</package_name>
</ai_packages>
</ai_manifest>
In the example above, all available fields are defined. The following summary explains
the field specifications that are used in this example.
Table 2-1 AI Manifest Parameter Specifications
Parameter |
Description |
ai_target_device |
The ai_target_device parameter defines the disk where the installation is performed. You can define the target_device_name. Or, you can define one or more of the following fields:
target_device_type
target_device_vendor
target_device_size
If you define target_device_name and other fields, only target_device_name is taken in to consideration. The rest of the parameters are ignored. The target_device_use_solaris_partition parameter is used to indicate whether the installation should find a disk where the Solaris partition is defined or find a disk where the Solaris partition is not defined. These parameters alternatives enable the automated installer to find a disk based on parameters other than name.
|
ai_device_partitioning |
The ai_device_partitioning parameters define
the fdisk partition changes to be performed by the automated installer before installing the
OpenSolaris OS. Note the following specifications:
The permitted operations for the partition_action parameter are create and delete.
The automated installer can create a Solaris partition and can delete any partition.
The parameters, partition_start_sector and partition_size, should be described as sectors (1 sector = 512 Bytes).
|
ai_device_vtoc_slices |
The ai_device_vtoc_slices parameter defines the Solaris VTOC slice
operations to be performed by the automated installer before installing the OpenSolaris OS.
Note the following specifications:
The automated installer can create a Solaris slice, delete a slice, or preserve an existing slice. The permitted operations for the slice_action parameter are create, delete, and preserved.
Note - The slice 2 defines the entire disk. You cannot create, delete, or preserve slice 2.
The parameter, slice_size is, is expressed in sectors.
The slice_number is expected to be 0-15.
|
ai_pkg_repo_ default_authority |
The ai_pkg_repo_default_authority parameter specifies the IPS repository to be used
for the installation. The two parameters needed to define the IPS repository are
the URL and the authorization information.
Note - If the IPS repository server is running
on a port other than 80, such as 10000, the port information needs
to be provided, in order for the client to reach the repository. For
example, https://pkgserver:10000 provides the port information.
The default URL is pkg.opensolaris.org and the
default authority is opensolaris.org. |
ai_packages |
The ai_packages parameter contains the list of packages you want to
install with the automated installer. In this example, the packages, SUNWcsd and
SUNWcs, and the cluster, slim_install, are specified. |
Example 2-2 AI Manifest With Target Disk Name and Repository Defined
<ai_manifest name="example1">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
</ai_target_device>
<ai_pkg_repo_default_authority>
<main url="https://pkg.opensolaris.org" authname="opensolaris.org"/>
</ai_pkg_repo_default_authority>
<ai_packages>
</ai_packages>
</ai_manifest>
For many users a simple configuration, like the example above, is sufficient. Only
the target disk name and the IPS repository with authority is defined. The
automated installer chooses the disk, c0t0d0, and performs the installation using the default
set of packages from the pkg.opensolaris.org repository.
If your diskname is different, edit this file, changing c0t0d0 to your
disk name. The manifest file also accepts an MPXIO name such as
c0t0000002037CD9F72d0.
You can also edit the repository information. If your IPS repository is pkg.mycompany.com
and the authorization is mycompany.com, change pkg.opensolaris.org to pkg.mycompany.com and opensolaris.org to
mycompany.com.
Example 2-3 AI Manifests Assigned to IP Addresses
<ai_criteria_manifest>
<ai_criteria name="IPV4">
<range>
010006068000
010006068255
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
The example above assigns the manifest files, ai_manifest1 and sc_manifest1, to clients
in the IP address range of 10.6.68.0 to 10.6.68.255.
Example 2-4 AI Manifest With a Target Disk Defined in Terms of Other Parameters
<ai_manifest name="example3">
<ai_target_device>
<target_device_type>SCSI</target_device_type>
<target_device_size>20GB</target_device_type>
<target_device_vendor>EMC</target_device_type>
</ai_target_device>
<ai_pkg_repo_default_authority>
<main url="https://pkg.opensolaris.org" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
<ai_packages>
<package_name>
SUNWj6rt
SUNWmercurial
</package_name>
</ai_packages>
</ai_manifest>
The example above can be used by a client that has an
EMC disk of type SCSI with a size of at least 20 Gbytes.
Two specific packages from the opensolaris.org repository, SUNWj6rt and SUNWmercurial, will be
added to the installed image.
Example 2-5 AI Manifest With Typical Fields Defined
<ai_manifest name="useful_example">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
</ai_target_device>
<ai_device_partitioning>
<partition_action>delete</partition_action>
<partition_number>2</partition_number>
<partition_start_sector>16065000</partition_start_sector>
<partition_size>41943040</partition_size>
<partition_type>130</partition_type>
</ai_device_partitioning>
<ai_device_partitioning>
<partition_action>create</partition_action>
<partition_number>2</partition_number>
<partition_start_sector>16065000</partition_start_sector>
<partition_size>41943040</partition_size>
<partition_type>191</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices>
<slice_action>preserve</slice_action>
<slice_number>4</slice_number>
<slice_size>20480</slice_size>
</ai_device_vtoc_slices>
<ai_device_vtoc_slices>
<slice_action>create</slice_action>
<slice_number>0</slice_number>
<slice_size>12288</slice_size>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="https://pkg.opensolaris.org" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
<ai_packages>
<package_name>SUNWdhcs</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWdhcm</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWapch22</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWsqlite3</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWpysqlite</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWpython-lxml</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWpython-cherrypy</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWinstalladm-tools</package_name>
</ai_packages>
</ai_manifest>
The example above defines a set of parameters that would often be
needed for an automated installation. The following settings are specified.
An installation that uses this manifest file uses c0t0d0 as the target disk.
The installation deletes the partition 2, type 130 (SUNIXOS). And, the installation will create a partition of type 191 (SUNIXOS2) of the same size and same start sector.
The installation creates a new VTOC slice at slice 0 and preserves an existing VTOC slice 4.
The installation gets packages from the IPS repository at pkg.opensolaris.org.
The specific packages listed in the ai_packages fields are installed.
For a complete summary of the AI manifest fields, see AI Manifest Parameters.
Creating SC Manifest Files
The SC manifest file provides system configuration specifications for the installed image. You
can customize the configuration settings by editing the variable after value= for each
of the properties.
In the following SC manifest example, you could change the user name from
“jack” to “mike” in the username property.
<?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='description' type='astring' value='default_user' />
<propval name='userpass' type='astring' value='jack' />
<propval name='rootpass' type='astring' value='opensolaris' />
<propval name='timezone' type='astring' value='US/Pacific' />
</property_group>
</instance>
</service>
</service_bundle>
Creating Criteria Manifest Files
The criteria manifest file is the bridge that connects the AI
manifest file and the SC manifest file with a client. The administrator uses
the criteria manifest file to add an AI manifest to a service. The
client sends its hardware characteristics to the install service and gets a manifest
file that was assigned by the administrator. See the following examples of criteria
manifest files.
Example 2-6 Criteria Based on the Client MAC Address
The following example assigns ai_manifest1 and sc_manifest1 to the client with MAC
address 0:14:4f:20:53:94. Note that all MAC address pairs are two digits without
colons. Remove the colons from 00:14:4F:20:53:94, and use 00144F205394.
<ai_criteria_manifest>
<ai_criteria name="MAC">
<range>
00144F205394
00144F205394
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Example 2-7 Criteria Based on the Client IP Address
The following example assigns ai_manifest1 and sc_manifest1 to the client with IP
address, 10.6.68.127. For an IP address, each octet between the dots must
be three digits. For the manifest file, take 010.006.068.127 and remove the dots to
use 010006068127.
<ai_criteria_manifest>
<ai_criteria name="IPV4">
<range>
010006068127
010006068127
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Example 2-8 Criteria Based on the Client IP Address Range
The following example assigns ai_manifest1 and sc_manifest1 to clients in the IP
address range, 10.6.68.0 to 10.6.68.255.
<ai_criteria_manifest>
<ai_criteria name="IPV4">
<range>
010006068000
010006068255
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Example 2-9 Criteria Based on the Client Memory Size
The following example assigns ai_manifest1 and sc_manifest1 to clients with memory of
at least 2 Gbytes. The None keyword is used to express no bounding
value.
<ai_criteria_manifest>
<ai_criteria name="MEM">
<range>
2048
None
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Example 2-10 Criteria Based on the Client Architecture
The following example assigns ai_manifest1 and sc_manifest1 to clients with an architecture
of i86pc.
<ai_criteria_manifest>
<ai_criteria name="ARCH">
<value>i86pc</value>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Example 2-11 Criteria Manifest Using Default AI Manifest and Custom SC Manifest
In the following example, you have this AI manifest file, default.xml.
<ai_manifest name="default">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
</ai_target_device>
<ai_device_partitioning>
<partition_action>create</partition_action>
<partition_number>2</partition_number>
<partition_start_sector>16065000</partition_start_sector>
<partition_size>41943040</partition_size>
<partition_type>191</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices>
<slice_action>create</slice_action>
<slice_number>0</slice_number>
<slice_size>12288</slice_size>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="https://pkg.opensolaris.org" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
</ai_manifest>
Note that the AI manifest file must be named default, or default.xml,
as above. Otherwise, you must add criteria to the manifest file. A nondefault
AI manifest file requires criteria.
In this example, you also have a custom SC manifest file, sc_manifest1.xml.
<?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='description' type='astring' value='default_user' />
<propval name='userpass' type='astring' value='jack' />
<propval name='rootpass' type='astring' value='opensolaris' />
<propval name='timezone' type='astring' value='US/Pacific' />
</property_group>
</instance>
</service>
</service_bundle>
You can use the following criteria manifest file to specify the default.xml
file and the custom sc_manifest1.xml file.
<ai_criteria_manifest>
<ai_manifest_file URI="./default.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Associating a Criteria Manifest File With an Existing Service
The client installations can be customized by assigning different manifests to different clients.
The installadm add command enables you to assign a specific manifest to a client.
Add the criteria manifest to the install service by executing the command as
follows:
installadm add -m manifest -n svcname
-m manifest – Required: Specifies the path name to a file that contains pointers to AI manifest and to SC manifest.
-n svcname – Required: Specifies the name of the service that this manifest is to be associated with.
See the following example.
Example 2-12 Assign Manifest to a Client
Create a criteria manifest file, criteria_mac.xml, that connects a new AI manifest file, ai_manifest1.xml, to a client. See examples in previous sections.
Check which services are running on the system by using the following command:
# installadm list
In this example, service_102508 is running on the system.
Add the manifest files and the criteria defined by criteria_mac.xml to the install service, service_102508, by using the following command:
# installadm add -m criteria_mac.xml -n service_102508
Note - Only the AI manifest name from the XML ai_manifest tag is registered with the AI database. The SC manifest will be part of the AI manifest. The criteria manifest's name is not stored in the AI database.
Run the following command to see that the AI manifest file, ai_manifest1.xml, has been added to the service.
# installadm list -n service_102508
The following results display:
Manifest
--------
ai_manifest1.xml
If you want to remove this AI manifest file from the service,
use the following command.
# installadm remove -m ai_manifest1 -n service_102508