单元管理工具是用于管理 VMware Cloud Director 单元或数据库的命令行实用程序。您必须使用超级用户凭据或系统管理员凭据执行大多数操作。
单元管理工具安装在 /opt/vmware/vcloud-director/bin/ 中。您可以使用该工具来运行单个命令或将其作为交互式 Shell 运行。
单元管理工具的一些功能在 VMware Cloud Director 部署和初始配置期间更有用,而其他一些功能对于 VMware Cloud Director 的后续管理更有用。因此,可以在《VMware Cloud Director 服务提供商管理指南》中找到一些单元管理工具文档。请参见 VMware Cloud Director 单元管理工具参考。
列出可用命令
若要列出可用的单元管理工具命令,请使用以下命令行。
./cell-management-tool -h
使用 Shell 模式
您可以按照如下所示,不使用参数调用单元管理工具,将其作为交互式 Shell 运行。
[root@cell1 /opt/vmware/vcloud-director/bin]#./cell-management-tool Cell Management Tool v8.14.0.4146350 Type "help" for available subcommands. cmt>如以下示例所示,在 Shell 模式下,您可以在 cmt> 提示符处键入任何单元管理工具命令。
cmt>cell -h
usage: cell [options]
-a,--application-states display the state of each application
on the cell [DEPRECATED - use the
cell-application command instead]
-h,--help print this message
-i,--pid <arg> the process id of the cell [REQUIRED
if username is not specified]
-m,--maintenance <arg> gracefully enter maintenance mode on
the cell
-p,--password <arg> administrator password [OPTIONAL]
-q,--quiesce <arg> quiesce activity on the cell
-s,--shutdown gracefully shutdown the cell
-t,--status display activity on the cell
-tt,--status-verbose display a verbose description of
activity on the cell
-u,--username <arg> administrator username [REQUIRED if
pid is not specified]
Note: You will be prompted for administrator password if not entered in command
line.
cmt>该命令完成运行后,会返回到
cmt> 提示符。要退出 Shell 模式,请在
cmt> 提示符处键入
exit。
单元管理工具使用帮助
以下示例运行单个非交互式命令,其中列出了可用的 Shell 管理工具命令。
[root@cell1 /opt/vmware/vcloud-director/bin]# ./cell-management-tool -h usage: cell-management-tool -h,--help print this message Available commands: cell - Manipulates the Cell and core components certificates - Reconfigures the SSL certificates for the cell . . . For command specific help: cell-management-tool <commandName> -h
从 VMware Cloud Director 10.3 开始,要对无法访问 VMware Cloud Director UI 的问题进行故障排除,必须使用 https://{api_host}/cloudapi/1.0.0/site/settings/cors API 端点,而不是 CMT 命令。有关详细信息,请参见对无法访问 VMware Cloud Director 用户界面的问题进行故障排除。