您可以使用 NSX Intelligence CLI 升级 NSX Intelligence 设备。
前提条件
- 下载 NSX Intelligence 设备升级包 (.nub) 文件。请参见下载 NSX Intelligence 设备升级包。
- 确认 /tmp 分区中有 1.5 GB 的可用空间,NSX Intelligence 主机的根分区中有 1.5 GB 的可用空间。
过程
- 使用在初始安装期间设置的 CLI 管理员凭据登录到 NSX Intelligence 设备。
$ssh admin@<NSX Intelligence IP Address>
- 在 NSX Intelligence 命令行中,使用以下命令从下载位置复制 NSX Intelligence .nub 升级文件。
copy url <url_to_NSX_intelligence_upgrade_nub>
例如,copy url http://localserver/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324.nub
- 使用以下命令验证升级包。
verify upgrade-bundle upgrade_bundle_name
以下是 verify upgrade-bundle command 的示例输出。Checking upgrade bundle /var/vmware/nsx/file-store/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324.nub contents Verifying bundle VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324.bundle with signature VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324.bundle.sig Moving bundle to /image/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324.bundle Extracting bundle payload Successfully verified upgrade bundle Bundle manifest: appliance_type: 'nsx-intelligence-appliance' version: '1.0.1.0.0.15188324' os_image_path: 'files/nsx-root.squashfs' os_image_md5_path: 'files/nsx-root.squashfs.md5' Current upgrade info: { "info": "", "body": { "meta": { "from_version": "1.0.0.0.0.14576942", "old_data_dev": "/dev/mapper/nsx-data", "new_data_dev": "/dev/mapper/nsx-data__bak", "new_os_dev": "/dev/sda3", "to_version": "1.0.1.0.0.15188324", "new_config_dev": "/dev/mapper/nsx-config__bak", "old_os_dev": "/dev/sda2", "bundle_path": "/image/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324", "old_config_dev": "/dev/mapper/nsx-config" }, "history": [] }, "state": 1, "state_text": "CMD_SUCCESS" } - 使用 NSX Intelligence Playbook 升级 NSX Intelligence 设备。
start upgrade-bundle <upgrade_bundle_name> playbook <nsx_intelligence_playbook_name>
提示: 输入 upgrade-bundle 后按 Tab 键, <upgrade_bundle_name> 将自动填充。在输入 playbook 后,按 Tab 键,将自动填充 <nsx_intelligence_playbook_name>。系统将在升级过程中重新引导,如以下示例中所示。mynsxintel> start upgrade-bundle VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324 playbook VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324-playbook **************************************************************************** Node Upgrade is in progress. Please do not make any changes, until the upgrade operation is complete. **************************************************************************** 2019-12-13 13:50:26,455 - Validating playbook /var/vmware/nsx/file-store/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324-playbook.yml 2019-12-13 13:50:26,583 - Running "shutdown_pace_svc" (step 1 of 7) 2019-12-13 13:50:51,734 - Running "install_os" (step 2 of 7) 2019-12-13 13:51:55,482 - Running "retain_pace_config" (step 3 of 7) 2019-12-13 13:52:00,529 - Running "switch_os" (step 4 of 7) 2019-12-13 13:52:17,786 - System will now reboot (step 5 of 7) { "info": "", "body": null, "state": 1, "state_text": "CMD_SUCCESS" } mynsxintel> Broadcast message from root@mynsxintel (Fri 2019-12-13 13:52:22 UTC): The system is going down for reboot at Fri 2019-12-13 13:53:22 UTC! - (可选) 在完成重新引导过程后,以 root 用户身份登录到 NSX Intelligence 设备控制台以在 /var/log/resume-upgrade.log 文件中验证设备升级状态。
root@mynsxintel:~# cat /var/log/resume-upgrade.log 2019-12-13 13:53:45,798 - Resuming paused playbook /var/vmware/nsx/file-store/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324-playbook.yml 2019-12-13 13:53:45,799 - Validating playbook /var/vmware/nsx/file-store/VMware-NSX-Intelligence-appliance-1.0.1.0.0.15188324-playbook.yml 2019-12-13 13:53:45,904 - Running "start_pace_svc" (step 6 of 7) 2019-12-13 13:53:51,002 - Running "finish_upgrade" (step 7 of 7) 2019-12-13 13:53:51,421 - Playbook finished successfully { "info": "", "body": null, "state": 1, "state_text": "CMD_SUCCESS" } - (可选) 在 NSX Intelligence 设备控制台中,验证 NSX Intelligence 设备版本是否正确,以及是否与从 VMware 下载门户下载的升级包的版本相匹配。
get version
下面提供了基于先前步骤中所使用的示例而获得的示例输出。mynsxintel> get version VMware NSX Intelligence, Version 1.0.1.0.0.15188324