我正在运行 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
其他方法在文档中但我试图弄清楚为什么文档中的第一个选项的响应好像它甚至不是一个有效的命令。
答案1
使用 esxcli 命令时,您可以使用不带等号的短选项(例如esxcli vm process kill -t soft -w 67909
),也可以使用带等号的长选项(esxcli vm process kill –-type=soft –-world-id=67909
)。