This chapter includes example manifests for archive deployment. For further information about installation manifests, refer to Chapter 2, Working With AI Manifests in Customizing Automated Installations With Manifests and Profiles. Also refer to the aimanifest(8) man page. These sample manifests are provided:
Example 22, AI Manifest to Deploy a Global Zone From a Clone Archive
Example 23, AI Manifest to Deploy a Non-Global Zone From a Clone Archive
Example 24, AI Manifest to Deploy a System Using a System Recovery Archive
Example 25, AI Manifest to Deploy an AI Client From a Non-global Zone Archive
Example 26, AI Manifest to Deploy a Global Zone and Configure a Zone From the Same Archive
Example 27, AI Manifest to Deploy a Kernel Zone with Non-root Pools
Note that in the manifest, the archive location as specified in file uri must be on an accessible server, not on a client's local drive. The following file uri's are valid:
<file uri="file:///net/server-IP/path/archive-file" />
<file uri="file:///net/server-name/path/archive-file" />
<file uri="http://server-name/archive-file" />
<file uri="/net/server-IP/path/archive-file" />
In this example, the referenced clone archive contains a single global zone that can be used to deploy a global zone.
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="archive0"> <target name="desired"> <logical> <zpool name="rpool" is_root="true"> </zpool> </logical> </target> <software type="ARCHIVE"> <source> <file uri="http://example-ai.example.com/datapool/global.uar"> </file> </source> <software_data action="install"> <name>global</name> </software_data> </software> </ai_instance> </auto_install>Example 23 AI Manifest to Deploy a Non-Global Zone From a Clone Archive
The following example shows a manifest deploying a non-global zone from a cloned archive.
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="zone_default"> <target> <logical> <zpool name="rpool"> </zpool> </logical> </target> <software type="ARCHIVE"> <source> <file uri="http://example-ai.example.com/archives/zone-01.uar"/> </source> <software_data action="install"> <name>zone-01</name> </software_data> </software> </ai_instance> </auto_install>Example 24 AI Manifest to Deploy a System Using a System Recovery Archive
The following example manifest demonstrates deploying a system using a system recovery archive.
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="archive0"> <target name="desired"> <logical> <zpool name="rpool" is_root="true"> </zpool> </logical> </target> <software type="ARCHIVE"> <source> <file uri="http://example-ai.example.com/recovery.uar"> </file> </source> <software_data action="install"> <name>*</name> </software_data> </software> </ai_instance> </auto_install>Example 25 AI Manifest to Deploy an AI Client From a Non-global Zone Archive
To transform a non-global zone to a global zone requires additional data such as drivers, platform software and so on. The IPS publishers that contain this information must be reachable from the AI client during the deployment. In this example, an AI client called test2 will be configured using information from the archive named myarchive.uar and from packages from http://pkg.oracle.com/solaris/release/. The location of the IPS repository is defined in a second software declaration of type IPS. The IPS entry has to follow the ARCHIVE entry or the install will fail. The archive will not be deployed on the system if the package install happens first, so the ARCHIVE entry must be first.
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="default"> <target> <logical> <zpool name="rpool" is_root="true"> <filesystem name="export" mountpoint="/export"/> <filesystem name="export/home"/> </zpool> </logical> </target> ... <software type="ARCHIVE"> <source> <file uri="file:///net/system1/archives/myarchive.uar" /> </file> </source> <software_data action="install"> <name>test2</name> </software_data> </software> <software type="IPS"> <source> <publisher name "solaris"> <origin name="http://pkg.oracle.com/solaris/release/"> </file> </source> </software> </ai_instance> </auto_install>Example 26 AI Manifest to Deploy a Global Zone and Configure a Zone From the Same Archive
In addition to deploying a zone, you can also configure an additional zone from an archive by adding the following line to the manifest:
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="zone1"> <target> <logical> <zpool name="rpool" is_root="true"> </zpool> </logical> </target> <software type="ARCHIVE"> <source> <file uri="http://example.com/archives/mysystem-clone.uar"> </file> </source> <software_data action="install"> <name>zone1</name> </software_data> </software> <configuration type="zone" name="zone1" source="archive:myzone" archive="http://example.com/archives/mysystem-clone.uar"/> </ai_instance> </auto_install>
This will configure zone1 based on the myzone instance in the mysystem-clone.uar file. Be default, zone1 will be installed from the IPS repository on first reboot, after the global zone has been installed. If you wish to use the archive to install the zone as well, use the following command:
# installadm create-manifest -n <service> -f <zone1-manifest-path> -m zone1 -c zonename="zone1"Example 27 AI Manifest to Deploy a Kernel Zone with Non-root Pools
This manifest requires that devices with id's 0 and 1 exist in the zone's configuration.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE auto_install SYSTEM " file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="default"> <target name="origin"> <disk in_zpool="rpool" in_vdev="rpool-none" whole_disk="true"> <disk_name name="c1d0" name_type="ctd"/> </disk> <disk in_zpool="tank" in_vdev="tank-none" whole_disk="true"> <disk_name name="c1d1" name_type="ctd"/> </disk> <logical noswap="false" nodump="false"> <zpool name="rpool" action="create" is_root="true" mountpoint="/rpool"> <vdev name="rpool-none" redundancy="none"/> </zpool> <zpool name="tank" action="create" is_root="false" mountpoint="/tank"> <vdev name="tank-none" redundancy="none"/> </zpool> </logical> </target> <software type="ARCHIVE"> <source> <file uri="http://example.com/clone.uar"/> </source> <software_data action="install"> <name>*</name> </software_data> </software> </ai_instance> </auto_install>