我正在运行 ESXi 6.5 嵌入式主机客户端。当我 ssh 进入系统时,我可以运行esxcli vm process list
并获得预期的输出:
testserver1
World ID: 67909
Process ID: 0
VMX Cartel ID: 67908
UUID: someuuid
Display Name: testserver1
Config File: /vmfs/volumes/somelocation/testserver1/testserver1.vmx
但是如果我运行esxcli vm process kill –t=soft –w=67909
我会得到错误Error: Unknown command or namespace vm process kill –t=soft –w=67909
为了确认我正在运行正确的命令,我运行esxcli vm process kill -help
并得到
Error: Invalid option -h
Usage: esxcli vm process kill [cmd options]
Description:
kill Used to forcibly kill Virtual Machines that are stuck and not responding to normal stop operations.
Cmd options:
-t|--type=<str> The type of kill operation to attempt. There are three types of VM kills that can be attempted: [soft, hard, force]. Users should always
attempt 'soft' kills first, which will give the VMX process a chance to shutdown cleanly (like kill or kill -SIGTERM). If that does not work
move to 'hard' kills which will shutdown the process immediately (like kill -9 or kill -SIGKILL). 'force' should be used as a last resort
attempt to kill the VM. If all three fail then a reboot is required. (required)
-w|--world-id=<long> The World ID of the Virtual Machine to kill. This can be obtained from the 'vm process list' command (required)
你能看到我做错了什么可能会阻止这个命令工作吗?我意识到文档中vim-cmd
有替代方案,但我试图弄清楚为什么文档中的第一个选项会响应,就像它甚至不是有效的命令一样。
对于 esxcli 命令,您可以使用不带等号 (eg
esxcli vm process kill -t soft -w 67909
) 的短选项或带等号 ( ) 的长选项esxcli vm process kill –-type=soft –-world-id=67909
。