您可以从物理主机中卸载 NSX

您可以通过 Windows 主机上的 NSX Manager 或 Windows Powershell 终端,或者通过 Linux 主机上的 CLI 终端,从物理主机中卸载 NSX

前提条件

如果要从独立的物理主机中卸载 NSX,请确认以下设置:

过程

  1. 从浏览器中,使用 admin 权限登录到 https://<nsx-manager-ip-address> 或 https://<nsx-manager-fqdn> 中的 NSX Manager
  2. 选择系统 > Fabric > 主机
  3. 选择独立选项卡。
  4. 选择物理主机,然后单击删除。在确认对话框中,默认选择卸载 NSX 组件。取消选中强制删除,然后单击删除

    此时会从主机中移除 NSX 软件。

  5. 如果卸载失败,请选择主机,然后再次单击删除。在确认对话框中,选中强制删除,然后单击删除
    系统会从管理平面中删除主机传输节点,但主机上可能仍装有 NSX 软件。
    仅当无法从 NSX Manager 中卸载 NSX 时,才转到下一步。在以下步骤中,您将从物理主机的 CLI 终端中移除 NSX
  6. 从 CLI 终端删除 NSX 之前,请确认已从主机中移除 NSX 软件包。
    在 Windows Powershell 上,运行 Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize | findstr NSX

    在 Ubuntu CLI 终端上,运行 Ubuntu: apt list --installed | grep nsx

    在 RHEL/SLES/CentOS CLI 终端上,运行 rpm -qa | grep nsx

  7. (Linux 物理主机)如果主机进入失败状态,并且无法移除 NSX 安装包,则要从主机中强制移除 NSX,请运行 del nsx 命令。
    1. 以 root 用户身份登录到主机的命令行界面。
    2. 运行 nsxcli -c del nsx
    3. 查看警告消息。如果要继续进行 NSX 卸载,请输入 Yes
      Carefully read the requirements and limitations of this command:
      1.Read NSX documentation for 'Remove a Host from NSX or Uninstall NSX Completely'.
      2.Deletion of this Transport Node from the NSX UI or API failed, and this is the last resort.
      3.If this is an ESXi host:
      a.The host must be in maintenance mode.
      b. All resources attached to NSXPGs must be moved out.
      If the above conditions for ESXi hosts are not met, the command WILL fail.
      4.If this is a Linux host:

      a. If KVM is managing VM tenants then shut them down before running this command.

      b. This command should be run from the host console and may fail if run from an SSH client or any other network based shell client.

      c. The 'nsxcli -c del nsx' form of this command is not supported.

      5.If this is a Windows host:

      Note: This will completely remove all NSX-T instances (image and config) from the host.

      6.For command progress check /scratch/log/nsxcli.log on ESXi host or /var/log/nsxcli.log on non-ESXi host.
      Are you sure you want to remove NSX on this host? (yes/no)
      重要说明: 在运行 del nsx 命令后,不要使用 NSX Manager UI 中的 解决功能重新准备处于 已断开连接状态的主机。如果使用 解决功能,主机可能会进入 已降级状态。
    4. 在物理主机上,确认显示的系统消息为已终止。此消息表示已从主机中完全移除 NSX,包括为物理主机创建的应用程序接口。
      运行 del nsx 后,将从主机中移除 NSX 软件包和应用程序接口。
  8. 在 Windows 物理主机上,如果主机进入失败状态,并且无法移除 NSX 安装包,则要从主机中强制移除 NSX,请执行以下步骤。
    1. 以管理员之一身份登录 Windows Powershell 界面。
    2. 转到 NSX 目录。

      PS C:\program files\VMware\nsx\nsx-cli> .\nsxclibms.bat -c del nsx

    3. 查看警告消息。如果要继续进行 NSX 卸载,请输入 Yes
      Carefully read the requirements and limitations of this command:
      1.Read NSX documentation for 'Remove a Host from NSX or Uninstall NSX Completely'.
      2.Deletion of this Transport Node from the NSX UI or API failed, and this is the last resort.
      3.If this is an ESXi host:
      a.The host must be in maintenance mode.
      b. All resources attached to NSXPGs must be moved out.
      If the above conditions for ESXi hosts are not met, the command WILL fail.
      4.If this is a Linux host:

      a. If KVM is managing VM tenants then shut them down before running this command.

      b. This command should be run from the host console and may fail if run from an SSH client or any other network based shell client.

      c. The 'nsxcli -c del nsx' form of this command is not supported.

      5.If this is a Windows host:

      Note: This will completely remove all NSX-T instances (image and config) from the host.

      6.For command progress check /scratch/log/nsxcli.log on ESXi host or /var/log/nsxcli.log on non-ESXi host.
      Are you sure you want to remove NSX on this host? (yes/no)
      重要说明: 在运行 del nsx 命令后,不要使用 NSX Manager UI 中的 解决功能重新准备处于 已断开连接状态的主机。如果使用 解决功能,主机可能会进入 已降级状态。
      运行 del nsx 后,将执行以下操作:
      • 卸载 Windows Server 上的应用程序接口。
      • 删除传输节点配置。
      • 删除 NSX 软件包。

结果

如果已成功移除 NSX 软件,则不会列出任何软件包。如果在主机上保留任何 NSX 软件包,请与 VMware 技术支持部门联系。

下一步做什么

移除连接到物理主机的应用程序接口的分段端口。