pencer
Contributor
Contributor

how to set ipmi/ilo settings for power management from a script?

Jump to solution

I have a fully working install script for our esx4 hosts, the only thing missing is setting up the ipmi/ilo settings.

I've searched and can't find any answers for this, does anyone know how to do it from a script?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager

If it's ESX, then part of your kickstart could generate the thumbprint and upload those results to an NFS server which vMA has access to, perhaps a list of hostnames + thumbprint. You could write a small script that basically watches a directory for updates and then automatically add them to vCenter once the system is ready to go, you can probably do something similar with ESXi but it'll be more tricky as you don't have a real way of "kickstarting" the host. However, you can edit the image and put your own scripts such as a python script to extract the thumbprint and again doing the same thing by dumping the output to a shared volume which vMA has access to.

If you're interested in ESXi script modification, take a look at Maish's 4 part article on how you can configure the ESXi host to ping back to a management host - http://technodrone.blogspot.com/2010/04/esxi-deployment-solution-beginning.html

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
6 Replies
lamw
Community Manager
Community Manager

The IPMI/iLO power settings is only configurable on a host that is being managed by vCenter, you'll notice that the "Power Management" option is not available when you connect directly to the host using vSphere Client, only when you connect to vCenter.

So in terms of automating this via kickstart and using the Service Console, this will not be possible. You'll need to use the vSphere API whether that is with vSphere SDK for Perl, PowerCLI, VI Java, etc. to run this post configuration.

For anything that I can't automate via kickstart build, there are a set of post scripts that I'll run using vMA host which run vSphere SDK for Perl scripts that'll run through and perform any configuration changes that require vCenter or just can't be done using kickstart. Some of these operations would be create a new cluster on vCenter, setup the appropriate configurations for HA/DRS, join a host to vCenter and perform operations such as updating IPMI settings.

If you're interested in a vSphere SDK for Perl solution, I can put some together this evening, but if you're more comfortable with Windows, you can use PowerCLI and Mike Laverick has blogged about automating this using PowerCLI here

=========================================================================

William Lam

VMware vExpert 2009

VMware scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

pencer
Contributor
Contributor

Wow, this reply reads just like my wish list of things i want to automate post build!

Perl scripts would be great if you don't mind sharing?

Many thanks,

Andy.

0 Kudos
lamw
Community Manager
Community Manager

Sure, I'll provide a write up probably tonight or tomorrow.

Are you at least familiar with vMA? or the vCLI, you'll need an environment that has one of these setup to run the vSphere SDK for Perl scripts.

=========================================================================

William Lam

VMware vExpert 2009

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
lamw
Community Manager
Community Manager

Take a look at the script posted here - http://www.virtuallyghetto.com/2010/06/script-ipmiconfigpl.html

=========================================================================

William Lam

VMware vExpert 2009

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
pencer
Contributor
Contributor

I've got vMA installed and have tried your script, it works great so thanks for sharing.

What would be good is if i could somehow pass information from the post esx install script to vMA and your ipmi script.

Ideally after the post install script finishes at the end of my esx build an event is triggered in vMA that add's that host to the correct cluster, and then runs your script for the ipmi settings.

0 Kudos
lamw
Community Manager
Community Manager

If it's ESX, then part of your kickstart could generate the thumbprint and upload those results to an NFS server which vMA has access to, perhaps a list of hostnames + thumbprint. You could write a small script that basically watches a directory for updates and then automatically add them to vCenter once the system is ready to go, you can probably do something similar with ESXi but it'll be more tricky as you don't have a real way of "kickstarting" the host. However, you can edit the image and put your own scripts such as a python script to extract the thumbprint and again doing the same thing by dumping the output to a shared volume which vMA has access to.

If you're interested in ESXi script modification, take a look at Maish's 4 part article on how you can configure the ESXi host to ping back to a management host - http://technodrone.blogspot.com/2010/04/esxi-deployment-solution-beginning.html

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos