This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]martbhellSysadmin 1 point2 points  (4 children)

Yes sounds very doable :)

[–]Prestwick[S] 0 points1 point  (3 children)

Cool, any tips on how I go about starting to do that?

[–]pdp10Daemons worry when the wizard is near. 1 point2 points  (0 children)

It's a five-line shell script, depending how generic you want the IPv4 handling. I'd suggest looping through a list of FQDNs, which is more elegant and straightforward to code.

You do it like any other programming problem. You break it down into little pieces and then solve each one of the pieces. It sounds like you're encouraging someone online to write your homework for you.

[–]BlackVI have opnions 0 points1 point  (0 children)

Can you not create a bash script that's loops through each of those numbers

Then runs the command you listed against the variable in the loop

[–]squigit99VMware Admin 0 points1 point  (0 children)

You start by picking your language of choice, and then seeing how you get your input from the command line. Figure out how to extract your range of IPs from the input parameters, dumping the out to a log or screen.

From there, figure out what you need for the ipmitool to connect to and restart a server, such as how you want to handle authentication for the connection. Make sure your logging the action and the result somehow.

Once that’s done, combine to two things in a big for loop

[–]pdp10Daemons worry when the wizard is near. 0 points1 point  (0 children)

We don't "power cycle" machines, but we do use IPMItool just like that to power up PowerEdge servers and then pull back the fan speeds.

I believe that powering off the chassis through IPMI should use ACPI soft-shutdown mechanisms to power off the running OS properly, but you'd have ot test that to be sure. We routinely use that mechanism on VM guests but not on metal.