This python will help you to manage an ESXI and to manage the virtual machine hosted on it by giving you an SSH access and the possibility to execute a shell commands on it.
PS : you need to install paramiko !!- Command : pip install paramiko
- Status of a VM : vim-cmd vmsvc/power.getstate
- Power off a VM : vim-cmd vmsvc/power.off
- Power on a VM : vim-cmd vmsvc/power.on
- Reboot a VM : vim-cmd vmsvc/power.reboot
- Reset a VM : vim-cmd vmsvc/power.reset