停止运行或无法启动的服务可能会导致问题。请务必确保所有服务均正常运行。

要检查 NSX Manager 服务的状态,请执行以下操作:

nsxmgr> get services
Service name:       cm-inventory
Service state:      stopped

Service name:       http
Service state:      stopped
Session timeout:    1800
Connection timeout: 30
Redirect host:      (not configured)

Service name:       install-upgrade
Service state:      stopped
Enabled:            True

Service name:       liagent
Service state:      stopped

Service name:       manager
Service state:      stopped
Logging level:      info

Service name:       mgmt-plane-bus
Service state:      running

Service name:       node-mgmt
Service state:      running

Service name:       nsx-message-bus
Service state:      running

Service name:       nsx-upgrade-agent
Service state:      running

Service name:       ntp
Service state:      running

Service name:       search
Service state:      stopped

Service name:       snmp
Service state:      stopped

Start on boot:      False
Service name:       ssh

Service state:      running
Start on boot:      True

Service name:       syslog
Service state:      running

在上述示例中,http 服务已停止。您可以使用以下命令启动 http 服务:

nsxmgr> start service http

SSH 服务

如果部署设备时未启用 SSH 服务,可以管理员身份登录到设备并使用以下命令启用该服务:

start service ssh

您可以使用以下命令将 SSH 配置为在主机启动时启动:

set service ssh start-on-boot

要启用 SSH root 登录,可以 root 用户身份登录到设备,编辑文件 /etc/ssh/sshd_config 并替换行

PermitRootLogin prohibit-password

或者,可通过关闭设备电源并修改其 vApp 属性来启用 SSH 服务并启用 SSH root 访问权限。

PermitRootLogin yes

然后使用以下命令重新启动 sshd 服务器:

/etc/init.d/ssh restart