Use the js2ai command with the –s option to convert any sysidcfg files that are associated with this JumpStart configuration to system configuration profiles. Initially, use the –S option to skip validation.
For each sysidcfg file processed, js2ai creates an AI system configuration profile 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.
When you receive a message that the conversion completed successfully, run the js2ai command without the –S option to validate the output sc_profile.xml file. Validation errors must be corrected in the sc_profile.xml file.
If you do not see a message that the conversion was successfully completed, examine the error report and the js2ai.log file. The error report and the log file report warnings, process errors, unsupported items, conversion errors, and validation errors. The error report is a table output to stdout that shows the number of each type of error that was encountered in converting the sysidcfg file. The log file describes the problems.
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.
To display more information for a conversion use the –v option with the js2ai command. For more information, see Displaying Additional Configuration Conversion Information.
To validate a specific output system configuration profile, run the js2ai command with the –V option. See the example in Validating an Output System Configuration Profile.
# js2ai -V path/sc_profile.xml
All js2ai conversions of sysidcfg files will generate the following warning:
sysidcfg:line #:WARNING: Oracle Solaris 11 uses roles instead of root user. An admin user with root role privileges will need to be defined in order to access the system in multi-user mode. The necessary xml structures have been added to sc_profile.xml as a comment. Edit sc_profile.xml to perform the necessary modifications to define the admin user.
The warning relates to the inability of the js2ai command to generate the necessary data structure from just the root_passwd keyword. If your sysidcfg file contained the root_passwd keyword in it, js2ai would generate a system/config-user structure like the following:
<service name="system/config-user" type="service" version="1"> <instance enabled="true" name="default"> <!-- Configures user account as follows: * User account name 'jack' * password 'jack' * GID 10 * UID 101 * root role * bash shell --> <!-- <property_group name="user_account" type="application"> <propval name="login" type="astring" value="jack"/> <propval name="password" type="astring" value="9Nd/cwBcNWFZg"/> <propval name="description" type="astring" value="default_user"/> <propval name="shell" type="astring" value="/usr/bin/bash"/> <propval name="gid" type="astring" value="10"/> <propval name="uid" type="astring" value="101"/> <propval name="type" type="astring" value="normal"/> <propval name="roles" type="astring" value="root"/> <propval name="profiles" type="astring" value="System Administrator"/> <propval name="sudoers" type="astring" value="ALL=(ALL) ALL"/> </property_group> --> <property_group name="root_account" type="application"> <propval name="login" type="astring" value="root"/> <propval name="password" type="astring" value="{your_root_passwd}"/> <propval name="type" type="astring" value="role"/> </property_group> </instance> </service>
In XML, a comment is started with <!--. To define the user necessary to support Oracle Solaris 11, remove the XML comment markers around the user_account property group structure. Next, modify the user_account property structure to create the user that will have root role privileges. If no root_password keyword was specified, comment out the root_account property group structure.
This section shows how to use js2ai to convert a sysidcfg file to an AI system configuration profile. For each sysidcfg file processed, js2ai creates an AI system configuration profile 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. To aid in the conversion process, make a copy of the original sysidcfg file and work from a copy. The conversion process might require that you edit and modify the sysidcfg file before it can be successfully converted.
Example 8 Converting a sysidcfg File That Includes ErrorsThis example uses the following sysidcfg file:
timezone=US/Pacific timeserver=localhost keyboard=US-English system_locale=en_US.UTF-8 terminal=vt100 network_interface=primary { hostname=host1 ip_address=192.0.2.4 netmask=255.255.255.224 protocol_ipv6=yes default_route=192.0.2.3 } name_service=DNS{domain_name=example.com name_server=192.0.2.1,192.0.2.2 search=example.com,example.org} root_password=rJmv5LUXM1OcU security_policy=none nfs_domain=dynamic
Use the following command to process this sysidcfg file. In the error report, validation errors are shown as a hyphen character because the –S option suppressed validation.
# js2ai -sS Process Unsupported Conversion Validation Name Warnings Errors Items Errors Errors ------------------- -------- ------- ----------- ---------- ---------- sysidcfg 1 0 0 1 - Conversion completed. One or more failures and/or warnings occurred. For errors see js2ai.log # cat js2ai.log sysidcfg:line 6:CONVERSION: DefaultFixed network configuration enabled. Unable to complete network configuration, replace interface PRIMARY with the actual interface you wish to configure. sysidcfg:line 17:WARNING: Oracle Solaris 11 uses roles instead of root user. An admin user with root role privileges will need to be defined in order to access the system in multi-user mode. The necessary xml structures have been added to sc_profile.xml as a comment. Edit sc_profile.xml to perform the necessary modifications to define the admin user.Example 9 Converting a Corrected sysidcfg File
The following modified sysidcfg file addresses the errors reported in the previous example. The PRIMARY interface specification is replaced with the interface name e1000g.
timezone=US/Pacific timeserver=localhost keyboard=US-English system_locale=en_US.UTF-8 terminal=vt100 network_interface=e1000g { hostname=host1 ip_address=192.0.2.4 netmask=255.255.255.224 protocol_ipv6=yes default_route=192.0.2.3 } name_service=DNS{domain_name=example.com name_server=192.0.2.1,192.0.2.2 search=example.com,example.org} root_password=rJmv5LUXM1OcU security_policy=none nfs_domain=dynamic
# js2ai -sS Process Unsupported Conversion Validation Name Warnings Errors Items Errors Errors ------------------- -------- ------- ----------- ---------- ---------- sysidcfg 2 0 0 0 - Conversion completed. One or more failures and/or warnings occurred. For details see /tmp/js2ai.log # cat js2ai.log sysidcfg:line 16:WARNING: Oracle Solaris 11 uses roles instead of root user. An admin user with root role privileges will need to be defined in order to access the system in multi-user mode. The necessary xml structures have been added to sc_profile.xml as a comment. Edit sc_profile.xml to perform the necessary modifications to define the admin user. sysidcfg:line 6:WARNING: In order to support the direct translation of the sysidcfg interface 'e1000g', Oracle Solaris 11 neutral link name support will be disabled. If you wish to use neutral link names, change the interface name specified in the sysidcfg file to a 'netx' style interface name or edit the resulting sc_profile.xml file.
Although the network interface primary was replaced with an Oracle Solaris 10 interface name, you will still get a warning about neutral link names. If you want to use the traditional link names then no action is required. In most instances, the interfaces will map the same as they do in Oracle Solaris 10 but that outcome is not guaranteed.
If you want to use the neutral link names used by Oracle Solaris 11, you can change your network interface in the sysidcfg file to a netn style name. Typically the primary interface will be defined as net0. In order to address the user warning, edit the sc_profile.xml file accordingly as outlined in the js2ai.log file.
If you want to see additional information for a sysidcfg file conversion or system configuration profile validation, specify the –v option with the js2ai command. When you specify the –v option, processing steps are displayed.
# js2ai -sv Processing: sysidcfg Performing conversion on: sysidcfg Generating SC Profile Validating sc_profile.xml Process Unsupported Conversion Validation Name Warnings Errors Items Errors Errors ------------------- -------- ------- ----------- ---------- ---------- sysidcfg 2 0 0 0 0 Conversion completed. One or more failures and/or warnings occurred. For details see /tmp/js2ai.log
Use the –V option to validate the system configuration profile that results from running the js2ai command.
# js2ai -v -V ./sc_profile.xml Validating sc_profile.xml Process Unsupported Conversion Validation Name Warnings Errors Items Errors Errors ------------------- -------- ------- ----------- ---------- ---------- sc_profile - - - - 0 Successfully completed conversion