Question

Shutdown CVM through REST API


Badge
Hi,

Does anyone know how to shutdown the CVM through REST API or PowerShell? I am trying to put together a script that would put the ESXi host in maintenance mode and would like to gracefully shutdown the CVM via script, after all other VMs on the host have been evacuated.

Thanks!

2 replies

I am interested at this... (through REST API or SSH from vRealize Orchestrator)

I'm trying to shut down host trough workflow on vmware vRO...
Badge
I figured out a workaround using PowerCLI for this:

Invoke-VMScript -VM $CVM -ScriptText $script -GuestUser $CVM_UserName -GuestPassword $CVM_Password

So, pass the shutdown command (cvm_shutdown -P now) as ScriptText and let PowerCLI run it.

Reply