将现有 NetScaler 设备配置迁移到另一个 NetScaler 设备

Last published : Oct 06, 2026
在迁移到新设备之前,您必须对旧设备的配置进行一些更改,然后才能将配置复制到新设备。
注意:以下过程不适用于 NetScaler FIPS 设备。

迁移配置

  1. 在旧设备上,创建配置文件 (ns.conf) 的备份副本。
  2. 使用 vi 编辑器编辑您备份的配置文件。例如,您可能需要更改用户名、主机名和密码。 注意: 删除所有与接口相关的配置,例如 set interface、bind vlan、add channel、bind channel 和 set channel。
  3. 关闭旧设备。
  4. 在新设备上执行初始配置。连接到串行控制台,并在命令提示符下键入 config ns 以运行 NetScaler 配置脚本。输入参数值,例如 NetScaler IP 地址 (NSIP) 和子网掩码。有关使用配置实用程序 (GUI) 或 LCD 键盘执行初始配置的信息,请参阅初始配置。
  5. 重新启动新设备。
  6. 在新设备上添加路由。在命令提示符下,键入:add route <network> <netmask> <gateway>
  7. 将编辑后的配置文件复制到新设备。
  8. 将其他相关文件(例如书签、SSL 证书、CRL、Web App Firewall 配置文件、登录方案和门户主题)复制到新设备。有关导出 Web App Firewall 配置文件的更多信息,请参阅导出和导入 Web App Firewall 配置文件。如果您添加了任何登录方案,请在复制配置文件之前将其从 /nsconfig/loginschema/*.xml 复制到新设备。应用配置文件后,将门户主题文件从 /var/netscaler/logon/themes/ 和 /var/netscaler/logon/LogonPoint/custom 文件夹复制到新设备。将您的功能许可证返回到 Citrix 许可门户,并在新设备上重新分配它。 注意: 新设备的平台许可证不同。
  9. 重新启动新设备。
  10. 添加特定于新设备、交换机和路由器的接口相关配置,并保存配置。
如果您有高可用性设置,则必须在两个节点上执行上述过程。

迁移 FIPS 设备配置

在以下步骤中,设备 A 是源设备,设备 B 是目标设备。
  1. 在设备 B 上初始化 FIPS 卡。在命令提示符下,键入以下命令:
    reset fips
    Done

    reboot

    set fips -initHSM Level-2 so12345 so12345 user123 -hsmLabel NSFIPS

    This command will erase all data on the FIPS card. You must save the configuration (saveconfig) after executing this command. Do you want to continue?(Y/N)y

    Done
    注意: 运行 set fips 命令时,将显示以下消息:
    This command will erase all data on the FIPS card. You must save the configuration (saveconfig) after executing this command. [Note: On MPX/SDX 14xxx FIPS platform, the FIPS security is at Level-3 by default, and the -initHSM Level-2 option is internally converted to Level-3]  Do you want to continue?(Y/N)y

    saveconfig
    Done

    reboot

    reboot
  2. 在设备 A 上,使用 SSH 客户端(例如 PuTTY)打开与设备的 SSH 连接。
  3. 使用管理员凭据登录到设备。
  4. 将设备 A 初始化为源设备。在命令提示符下,键入:
    init ssl fipsSIMsource <certFile>
    示例:
    init fipsSIMsource /nsconfig/ssl/nodeA.cert
  5. 将此 <certFile> 文件复制到设备 B 的 /nconfig/ssl 文件夹中。
    示例:
    scp /nsconfig/ssl/nodeA.cert nsroot@198.51.100.10:/nsconfig/ssl
  6. 在设备 B 上,使用 SSH 客户端(例如 PuTTY)打开与设备的 SSH 连接。
  7. 使用管理员凭据登录到设备。
  8. 将设备 B 初始化为目标设备。在命令提示符下,键入:
    init ssl fipsSIMtarget <certFile> <keyVector> <targetSecret>
    示例:
    init fipsSIMtarget /nsconfig/ssl/nodeA.cert /nsconfig/ssl/nodeB.key /nsconfig/ssl/nodeB.secret
  9. 将此 <targetSecret> 文件复制到设备 A。
    示例:
    scp /nsconfig/ssl/fipslbdal0801b.secret nsroot@198.51.100.20:/nsconfig/ssl
  10. 在设备 A 上,将设备 A 启用为源设备。在命令提示符下,键入:
    enable ssl fipsSIMSource <targetSecret> <sourceSecret>
    示例: enable fipsSIMsource /nsconfig/ssl/nodeB.secret /nsconfig/ssl/nodeA.secret
  11. 将此 <sourceSecret> 文件复制到设备 B。
    示例: scp /nsconfig/ssl/fipslbdal0801b.secret nsroot@198.51.100.10:/nsconfig/ssl
  12. 在设备 B 上,将设备 B 启用为目标设备。在命令提示符下,键入:
    enable ssl fipsSIMtarget <keyVector> <sourceSecret>
    示例: enable fipsSIMtarget /nsconfig/ssl/nodeB.key /nsconfig/ssl/nodeA.secret
  13. 在设备 A 上导出 FIPS 密钥。
    示例:
    export fipskey Key-FIPS-1 -key Key-FIPS-1.key
  14. 将密钥文件复制到设备 B 的 /nconfig/ssl 文件夹中。
    示例:
    scp /nsconfig/ssl/nodeA.key nsroot@198.51.100.10:/nsconfig/ssl
  15. 在设备 B 上导入 FIPS 密钥。
    示例:
    import fipskey Key-FIPS-2 -key Key-FIPS-2.key -inform SIM -exponent F4
  16. 将证书文件复制到设备 B 的 /nconfig/ssl 文件夹中。
    示例:
    scp /nsconfig/ssl/nodeA.cert nsroot@198.51.100.10:/nsconfig/ssl
  17. 将剩余配置从设备 A 复制到设备 B。