So, I use Systemimager to provision new CentOS 5.3 hosts via PXE. We have a couple servers that are just test targets that we'll reimage a couple-dozen times a day, and normally, getting them to PXE-boot is as simple as logging onto their iLO interfaces, rebooting, and hitting F12 at the appropriate time. My question is, is it possible to tell the server via the linux commandline to perform a "one-time PXE boot" during its next reboot? Each reimage cycle this would save me many minutes of clicking, typing, waiting for Java to load the ilo console, etc. I know Dell has this capability via OpenIPMI, but I was wondering if HP had similar functionality.
Many thanks! --Lee
This should be possible with ipmitool. Just run:
And your next boot should be a PXE boot.
Edit: This doesn't seem to work for HP iLO2. However, you can SSH in to the iLO2 interface and reconfigure it there by issuing
On systems that don't support booting from USB key it will be
bootsource4
instead. For complete details, see the iLO2 Scripting ReferenceYou can issue this command as an argument to
ssh
and that should work as well.So I figured this out with the help of a coworker. Its a dirty, dirty hack, but it works! HP Proliants (at least now, at the end of 2009) will try to boot from a CDROM, then try the harddisk, then try a USB stick, and then they'll do a PXE boot. Since I am reimaging servers anyway, I've figured out that if we zap the boot sector anyway and immediately reboot, HP boxen will go through the boot process, bypass the harddisk because there's no MBR, and immediately PXE-boot. I've written a script that issues the dd commands thusly:
HTH! --Lee
Alternatively, use the tools from the HP Proliant Support Pack (rpm named hp-health) ... there's a CLI program called 'hpbootcfg' that will do exactly what you want: USAGE: bootcfg [-F -C -H -T] [-S -Q -R -P] [-r -d -n -b] -D Set Defaults everywhere
You can use Ansible to boot your machines from network through their HP iLO interfaces, by using "python-hpilo" module.
In order to do that you can use some Ansible roles such as:
For more information please check: https://docs.ansible.com/ansible/latest/modules/hpilo_boot_module.html
You can also boot many machines from network, by using an inventory file. For more information on Ansible roles and tasks please visit https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html and https://docs.ansible.com/ansible/latest/user_guide/basic_concepts.html