Hello everybody
i'm with the free version of esxi 5.1 and i try to create a ups shutdown script to power off gracefully my vm and my host.
On the previous version (5.0) i used the following command which always worked:
c:\Program Files\VMware\VMware vSphere CLI\bin>vicfg-hostops.pl --server 192.0.0.1 --username root --password password --operation shutdown –force
Now with esxi 5.1 , this command is not allowed anymore and return the following error :
SOAP Fault:
-----------
Fault string: Current license or ESXi version prohibits execution of the requested operation.
Fault detail: RestrictedVersionFault
Vmware has updated their api and now the esxcli command must be used instead
c:\Program Files\VMware\VMware vSphere CLI\bin>esxcli.exe -s 192.0.0.1 -u root -p password system shutdown poweroff -d 10 -r "test shutdown"
System is not in maintenance mode. Cannot perform requested operation.
I cannot force the shutdown anymore and let the auto poweroff of the vm operate.
Maintenance mode cannot be set until all vm are powered down , and i did not find proper cli command.
Does anyone have written a script for that?