Use the following command to list all registered virtual machines: vim-cmd vmsvc/getallvms (if you want check the state for a particular virtual machine, use: vim-cmd vmsvc/power.getstate <vmid>)
And the following to see which virtual machine is running: esxcli vms vm list