js2ai コマンドに –s オプションを指定して使用して、この JumpStart 構成に関連付けられた sysidcfg ファイルをシステム構成プロファイルに変換します。最初は –S オプションを使用して検証をスキップします。
js2ai は、処理された sysidcfg ファイルごとに、js2ai コマンドが起動されたディレクトリ内に sc_profile.xml という名前の AI システム構成プロファイルを作成します。sc_profile.xml ファイルに別のディレクトリを指定するには、–D オプションを使用します。
変換が正しく完了したことを示すメッセージを受け取ったら、–S オプションを付けずに js2ai コマンドを実行して、出力された sc_profile.xml ファイルを検証します。検証エラーは sc_profile.xml ファイル内で修正する必要があります。
変換が正常に完了したというメッセージが表示されない場合、エラーレポートおよび js2ai.log ファイルを調べます。エラーレポートおよびログファイルは、警告、処理エラー、サポートされない項目、変換エラー、および検証エラーを報告します。エラーレポートは stdout への表出力で、sysidcfg ファイルの変換中に発生したタイプごとのエラーの番号を示します。ログファイルには問題が記述されます。
処理エラーを修正します。
sysidcfg ファイルから、サポート外項目として一覧表示されたすべての行を削除します。
変換エラーを検査して、可能な場合はエラーを修正します。それ以外の場合は、エラーの原因となっている行を削除します。
警告メッセージを検査して、修正が必要ないことを確認します。
変換について詳細な情報を表示するには、js2ai コマンドに –v オプションを付けて使用します。詳細は、詳細な構成変換情報の表示を参照してください。
特定の出力システム構成プロファイルを検証するには、–V オプションを付けて js2ai コマンドを実行します。出力システム構成プロファイルの検証の例を参照してください。
# js2ai -V path/sc_profile.xml
js2ai で sysidcfg ファイルを変換すると、必ず次の警告が生成されます。
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.
この警告は、js2ai コマンドが、root_passwd キーワードだけでは必要なデータ構造を生成できないことに関係があります。sysidcfg ファイルに root_passwd キーワードが含まれている場合、js2ai は、次のような system/config-user 構造体を生成します。
<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>
XML では、コメントは <!-- で始まります。Oracle Solaris 11 をサポートするために必要なユーザーを定義するには、user_account プロパティーグループ構造体を囲む XML コメントマーカーを削除します。次に、user_account プロパティー構造体を変更し、root 役割特権を持つユーザーを作成します。root_password キーワードを指定しなかった場合は、root_account プロパティーグループ構造体をコメントにします。
このセクションでは、js2ai を使用して sysidcfg ファイルを AI システム構成プロファイルに変換する方法を示します。js2ai は、処理された sysidcfg ファイルごとに、js2ai コマンドが起動されたディレクトリ内に sc_profile.xml という名前の AI システム構成プロファイルを作成します。sc_profile.xml ファイルに別のディレクトリを指定するには、–D オプションを使用します。変換プロセスに役に立つように、元の sysidcfg ファイルのコピーを作成し、コピーを使用します。変換プロセスでは、sysidcfg ファイルを編集および変更しないと、ファイルを正しく変換できない場合があります。
使用例 8 エラーを含む sysidcfg ファイルの変換この例では、次の sysidcfg ファイルを使用します。
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
次のコマンドを使用して、この sysidcfg ファイルを処理します。–S オプションによって検証を抑制したため、エラーレポートでは、検証エラーはハイフン文字として表示されます。
# 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.使用例 9 修正された sysidcfg ファイルの変換
次に示す変更された sysidcfg ファイルは、前の例で報告されたエラーに対処します。PRIMARY インタフェース指定はインタフェース名 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.
ネットワークインタフェース primary は Oracle Solaris 10 インタフェース名で置換されていますが、ニュートラルリンク名に関する警告が引き続き表示されます。従来のリンク名を使用する場合は、必要なアクションはありません。ほとんどの場合、インタフェースは Oracle Solaris 10 の場合と同じようにマップされますが、必ずそうなるという保証はありません。
Oracle Solaris 11 によって使用されるニュートラルリンク名を使用する場合は、sysidcfg ファイルのネットワークインタフェースを netn という形式の名前に変更します。通常、プライマリインタフェースは net0 として定義されます。ユーザー警告に対処するには、js2ai.log ファイルに示される概要に応じて sc_profile.xml ファイルを編集します。
sysidcfg ファイル変換またはシステム構成プロファイルの検証に関する追加情報を表示するには、js2ai コマンドに –v オプションを指定します。–v オプションを指定すると、処理段階が表示されます。
# 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
js2ai コマンドを実行した結果得られるシステム構成プロファイルを検証するには、–V オプションを使用します。
# 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