Skip Navigation Links | |
Exit Print View | |
man pages section 1M: System Administration Commands Oracle Solaris 11.1 Information Library |
- Translate JumpStart rules and profiles for use with the Automated Installer (AI).
js2ai [-h | --version]
js2ai -r | -p profile [-d jsdir] [-D destdir] [-lSv]
js2ai -s [-d jsdir] [-D destdir] [-Sv]
js2ai -V manifest
js2ai is a utility for converting Oracle Solaris 10 JumpStart rules, profile, and syscfg configuration files to a format compatible with Automated Installer (AI). This utility makes a “best effort” to translate those JumpStart keywords that can be translated to the AI context. While this conversion does not create a complete one-to-one equivalence with JumpStart, it does provide AI manifest and system configuration profile entries that can then be used as a template for creating a complete AI configuration setup based on information gathered from JumpStart configuration files.
Using js2ai, you can do the following:
Process the rules file and the associated profiles in the current working directory.
Process the rules file and the associated profiles in a specified directory.
Process a specific profile or sysidcfg file.
Direct the resulting output files to a specific directory. For more information on the js2ai output files, see the “Examples” and “Files” sections.
Table 1 JumpStart Rule Keywords Translation
|
JumpStart rule keywords not supported by js2ai:
any installed disksize osname domainname probe hostname totaldisk
Table 2 JumpStart Profile Keywords
|
JumpStart profile keywords not supported by js2ai:
archive_location geo backup_media layout_constraint bootenv local_customization client_arch metabd client_root no_master_check client_swap no_content_check cluster num_clients dontuse patch forced_deployment
How the System's Root Disk is Determined During Profile Translation
Since js2ai does not have access to the actual system a profile references during the profile translation process, js2ai attempts to determine what the root disk is during translation using a process that matches JumpStart as much as possible.
The js2ai tool performs the following steps to determine what device to use for the root disk.
|
How the any Device Is Translated During Profile Translation
The js2ai tool performs the following steps to determine what device to use when the any keyword is specified.
|
How the ZFS Root Pool is Determined During Profile Translation
The js2ai tool performs the following steps to determine what device to use for the ZFS root pool. Once the ZFS root pool is determined, subsequent definitions encountered are flagged as errors if they conflict with the ZFS root pool that has already been determined.
|
Table 3 JumpStart sysidcfg Keywords
|
JumpStart sysidcfg keywords not supported by js2ai:
nfs4_domain
The js2ai command has the following options. The use of these options is illustrated in the “Examples” section.
Show the usage help message.
Show the version number of the js2ai utility.
Specify the location of the rules and profile files or the sysidcfg file.
Specify the location for the output files.
When searching for Image Packaging System (IPS) equivalents for the package keyword value in a JumpStart profile, search the IPS packages installed on the host system rather than the packages in an IPS package repository.
Convert the specified JumpStart profile and generate a manifest for the profile processed. In this case, no criteria file is needed or generated.
Convert rules and associated profiles and generate a manifest for each profile processed.
Process the sysidcfg file and output the results to sc_profile.xml.
Skip validation.
Provide details on the actions that occurred during processing.
Validate the specified AI manifest file or SMF system configuration profile file. AI criteria validation is not supported.
The js2ai tool generates an error report when one or more errors occurs during the conversion.
# js2ai -r Process Unsupported Conversion Validation Name Warnings Errors Items Errors Errors -------- -------- ------- ----------- ---------- ---------- rules 0 0 2 0 - profile1 0 0 0 2 1 Conversion completed. One or more failures occurred. For errors see ./js2ai.log
The report contains one entry for each file in which js2ai encountered an error. To generate an error report even when no errors occur, specify -v or --verbose.
The report tells you what type of errors occurred in what files. Five error types are defined: Warnings, Process Errors, Unsupported Items, Conversion Errors, and Validation Errors.
Items in these messages are not required to be corrected. For example, you might receive a warning message that information such as host name or root password was not provided, and default values will be used.
These errors refer to problems that prevent js2ai from processing a file or a line within the file. Process errors typically occur when the file has a syntax error.
These items refer to a line that js2ai does not support. Changing the value associated with a keyword might eliminate this error.
These errors refer to a condition that prevents js2ai from processing a line. These errors should be manually corrected, or the offending lines should be removed from the file.
These errors refer to the errors that occurred when the generated manifest was validated against the schema definition used by AI. These errors must to be corrected before the manifest can be used by AI.
The js2ai.log file indicates what error occurred on what line.
# cat js2ai.log rules: line 4: unsupported keyword: disksize rules: line 4: unsupported keyword: installed net924_sun4c: line 4: unsupported keyword: cluster net924_sun4c: line 5: unsupported keyword: num_clients net924_sun4c: line 6: unsupported keyword: client_swap net924_sun4c: line 7: unsupported keyword: client_arch upgrade: line 1: unsupported value for 'install_type' specified: upgrade
If a validation error of the manifest occurs, the js2ai.log file contains a pointer to the log file that contains the validation errors, as shown in the following example:
Validation Errors: profile1: manifest validation of ./AI_profile1/profile1.xml failed. For details see ./AI_profile1/profile_validation.log
Recommended Strategy for Rule and Profile Conversion
A one-to-one conversion between JumpStart and AI does not exist. The following steps provide a general procedure for performing the conversion.
The js2ai utility attempts to flag any errors it encounters, but js2ai assumes the rules, profiles, and sysidcfg files that are being converted are valid.
Copy the JumpStart configuration directory of rules, profile, and syscfg configuration files to an Oracle Solaris 11 system that has the install/installadm package installed.
In the JumpStart configuration directory that you copied to the Oracle Solaris 11 system in step 2, run the js2ai conversion tool.
# js2ai -rS
This command performs a conversion operation on the rules file and the profiles referenced by the rules file. Each profile referenced in the rules file is processed against the AI client provisioning manifest, /usr/share/auto_install/manifest/default.xml. This step creates a directory named AI_profile for each profile specified in the JumpStart rules file. The AI_profile directory contains one or more AI manifests for the translated profile in the form profile${arch}.xml. See the “Files” section for more information.
The -S option skips the validation sequence. Validation is done in step 5.
If the message “Successfully completed conversion” is output, skip to step 5. Otherwise, examine the js2ai.log file and follow these steps:
Correct any process errors.
Remove any lines from the rules and profile files that are listed as Unsupported Items.
Examine the conversion errors and correct the errors if possible. Otherwise, remove the lines that are causing the errors.
Examine any warning messages and make sure no corrections are necessary.
Repeat step 3 until no processing errors, unsupported items, and conversion errors are reported.
Rerun js2ai without the -S option.
# js2ai -r
If any validation errors occur for any of the processed profiles, the resulting AI manifest must be manually corrected. Examine the js2ai.log file for details of the failure. See the AI documentation for information about AI manifests.
Convert any sysidcfg files that are associated with this JumpStart configuration.
For each sysidcfg file, execute the following command:
# js2ai -sS -d sysidcfgdir
For each sysidcfg file processed, this step creates an AI system configuration profile file named sc_profile.xml in the directory where the js2ai command was invoked. Use the -D option to specify a different directory for the sc_profile.xml file.
If the message “Successfully completed conversion” is output, skip to step 8. Otherwise, examine the js2ai.log file and follow these steps:
Correct any process errors.
Remove any lines from the sysidcfg file that are listed as unsupported items.
Examine the conversion errors and correct the errors if possible. Otherwise, remove the lines that are causing the errors.
Examine any warning messages and make sure no corrections are necessary.
Repeat step 6 until no processing errors, unsupported items, and conversion errors are reported.
Rerun js2ai without the -S option.
# js2ai -s -d sysidcfgdir
If any validation errors occur for any of the processed sysidcfg files, the resulting AI system configuration profile must be manually corrected. Examine the js2ai.log file for details of the failure. See the AI documentation for information about system configuration profiles.
The js2ai conversion process is complete. Perform a manual verification of the resulting criteria, AI manifest, and system configuration profile files. The disk space requirements for an Oracle Solaris 11 installation are different from the disk space required for an Oracle Solaris 10 installation. Make sure the disk space allocated in your AI manifests meets the requirements of Oracle Solaris 11.
Configure AI to use the newly generated files. Add the newly generated criteria, AI manifest, and system configuration profile files to an existing AI install service.
Use the installadm command with the create-manifest subcommand to add each AI manifest with criteria for selecting that manifest. Each client can use only one AI manifest.
# installadm create-manifest -n svcname \ -f filename -m manifest \ -C criteriafile
Use the create-profile subcommand to add each profile with criteria for selecting that configuration profile. Each client can use one or more system configuration profiles.
# installadm create-profile -n svcname \ -f filename -p profile \ -C criteriafile
See the AI documentation and the installadm(1M) man page for information about configuring AI install services.
Example 1 Processing a JumpStart Configuration
The following command processes the JumpStart rules and profiles in the current directory. The output is also placed in this directory.
# js2ai -r
Example 2 Processing a Specific JumpStart Directory
The following command processes the JumpStart rules and profiles from the specified directory and places the output files in the same directory.
# js2ai -r -d /export/jumpstart
For more information about the output files, see Example 4 and the “Files” section.
Example 3 Processing a Profile in a Specific JumpStart Directory and Separate Destination Directory
The following command processes the JumpStart rules and profile files from the /export/jumpstart directory and places the output files in /export/output.
# js2ai -p profile1 -d /export/jumpstart -D /export/output
Example 4 Example Input and the Resulting Output for a Specified Rule and Its Profile
Rule:
arch sparc && karch sun4u && \ model 'SUNW,Serverblade1' - profile -
Profile:
install_type initial_install pool mypool auto auto auto c1t0d0s0
Conversion command:
# js2ai -r -d /jumpstart -D /tmp/output
Output files:
/tmp/output/AI_profile/profile.x86.xml /tmp/output/AI_profile/profile.sparc.xml /tmp/output/AI_profile/criteria-1.xml
Two manifest files are created, one for SPARC and one for x86, even though the rules file specifies the CPU type as SPARC. During the conversion process, rules and profiles are processed independently of one another.
Example 5 Adding Generated Files to an AI Install Service
This example adds the manifest and criteria to an existing service, using the files generated in Example 4.
Files:
/tmp/output/AI_profile/profile.sparc.xml /tmp/output/AI_profile/criteria-1.xml
installadm command:
# installadm create-manifest -n svc-name \ -f /tmp/output/AI_profile/profile.sparc.xml \ -m sparc_profile \ -C /tmp/output/AI_profile/criteria-1.xml
Example 6 Processing a sysidcfg File
The following command processes the sysidcfg file in the current directory and outputs the resulting SMF system configuration profile as sc_profile.xml in the same directory.
# js2ai -s
The following exit values are returned:
All the files were processed successfully.
An error occurred.
Directory that contains all the corresponding files that have been translated to the new AI syntax associated with the profile.
The manifest file created as a result of translating the profile. ${arch} can be one of these three values: sparc, x86, or generic. A manifest file that is in the form ${profile}.generic.xml can be used to install both x86 and SPARC systems.
The criteria-rule.xml file produced corresponds to the rule in the rules file. The rule is the rule number based on its position in the rules file. This criteria file can then be used with the -C option to the installadm command.
Since more than one rule can specify the same profile, more than one criteria file can exist in each directory, but only one instance of the ${profile}.${arch}.xml file should exist in each output directory.
Note - If the -p option is used, no criteria file is produced for the profile that is processed. Criteria files are only generated when used with the -r option.
This file contains a stack trace of an unexpected condition that occurred during processing. This file is not typically created.
This file contains a log of the files processed and any errors found during processing.
This file is the SMF system configuration profile that is generated when the -s option is used to convert a sysidcfg file.
See attributes(5) for descriptions of the following attributes:
|
Transitioning From Oracle Solaris 10 JumpStart to Oracle Solaris 11.1 Automated Installer
Part III, Installing Using an Install Server, in Installing Oracle Solaris 11.1 Systems