07-23-2021 12:36 AM
Hey together,
I searched the internet for quite some time and didn't really find what I need so I decided to ask here now.
We are currently running 3 Host servers in a cluster for VMWare.
Each server is connected with one power supply to a UPS and one to direct power.
We are using Powerchute to shutdown the VMs and Hosts after a certain time of power outage.
The problem is, that the servers will not reboot if the power is restored, if the actual outage is over before the UPS is shutdown so both power supplies are without power.
So my idea was to boot up the hosts via SSH script if the power is restored.
I can't find a way to boot the hosts via SSH. Only found ways to reboot the CIMC which is working fine but not what I need.
Is it even possible?
I know it would probably be best practise to connect the two power supplies to two different UPS but we currently don't have these...
Thanks in advance for the help.
Solved! Go to Solution.
07-23-2021 10:06 AM - edited 07-23-2021 10:32 AM
From https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_REST_API_guide_301/b_Cisco_IMC_api_3x60_chapter_010.html#id_14844__section_0D1EDB4D23E7449AA48D6743EB16E4BC
you can hit it with redfish:
curl -vv https://10.10.10.10/redfish/v1/Systems/FCH2005V1EN/Actions/System.Reset -d '{"ResetType":"On"}' --insecure -u admin:Admin123
Think IMC power tools also has 'start-imcserver' cmdlet
Kirk...
07-23-2021 04:24 AM
The following should work from CIMC CLI to power on the host:
Server# scope chassis
Server /chassis # power on
This operation will change the server's power state.
You can also use XMLAPI:
07-23-2021 05:39 AM
Thanks for the hints.
It is working fine if I manually connect to the server via SSH but is it possible to run it as a single command?
Or with a Powershell script?
I tried the following but it doesn't work.
plink -ssh -P 22 <IP> -l <admin> -pw <Password> "scope chassis; power on; y"
and
New-SSHSession -ComputerName <IP> -Credential (Get-Credential) -ConnectionTimeout 300 -OperationTimeout 300
Invoke-SSHCommand -Index 0 -Command "scope chassis power on y"
With and without the semicolon.
Also tried to send it with 3 single commands like
Invoke-SSHCommand -Index 0 -Command "scope chassis"
Invoke-SSHCommand -Index 0 -Command "power on"
...
07-23-2021 10:06 AM - edited 07-23-2021 10:32 AM
From https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_REST_API_guide_301/b_Cisco_IMC_api_3x60_chapter_010.html#id_14844__section_0D1EDB4D23E7449AA48D6743EB16E4BC
you can hit it with redfish:
curl -vv https://10.10.10.10/redfish/v1/Systems/FCH2005V1EN/Actions/System.Reset -d '{"ResetType":"On"}' --insecure -u admin:Admin123
Think IMC power tools also has 'start-imcserver' cmdlet
Kirk...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide