从 Oracle® Solaris 10 JumpStart 转换至 Oracle Solaris 11.2 自动化安装程序

退出打印视图

更新时间: 2014 年 7 月
 
 

使用 js2ai 进行 sysidcfg 转换

本节说明如何使用 js2aisysidcfg 文件转换为 AI 系统配置文件。对于所处理的每个 sysidcfg 文件,js2ai 将在调用 js2ai 命令的目录中创建一个名为 sc_profile.xml 的 AI 系统配置文件。使用 –D 选项为 sc_profile.xml 文件指定其他目录。为了有助于转换过程,请生成原始 sysidcfg 文件的副本并处理副本。转换过程可能需要您编辑和修改 sysidcfg 文件,然后才能成功转换该文件。

示例 3-1  转换包括错误的 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.
示例 3-2  转换更正的 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.

虽然主网络接口将替换为 Oracle Solaris 10 接口名称,您仍将收到关于中性链路名称的警告。如果您希望使用旧样式链路名称,则不需要执行任何操作。在大多数情况下,接口将像它们在 Oracle Solaris 10 中那样映射相同内容,但是无法保证结果。

如果您希望使用 Oracle Solaris 11 所用的中性链路名称,可以将 sysidcfg 文件中的网络接口更改为 net# 样式名称。主接口通常定义为 net0。为了解决用户警告问题,请按照前面示例中 line 6 的注释中所示编辑 sc_profile.xml 文件。