Skip to content

Instantly share code, notes, and snippets.

@drolfe
Last active August 11, 2023 23:14
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save drolfe/b91ea113714ab823f2df to your computer and use it in GitHub Desktop.
Save drolfe/b91ea113714ab823f2df to your computer and use it in GitHub Desktop.
HP iLO XML Scripts
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<USER_INFO MODE="write">
<ADD_USER
USER_NAME="daniel"
USER_LOGIN="daniel"
PASSWORD="daniel123">
<ADMIN_PRIV value ="Yes"/>
<REMOTE_CONS_PRIV value ="Yes"/>
<RESET_SERVER_PRIV value ="No"/>
<VIRTUAL_MEDIA_PRIV value ="Yes"/>
<CONFIG_ILO_PRIV value="Yes"/>
</ADD_USER>
</USER_INFO>
</LOGIN>
</RIBCL>
end_marker
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<USER_INFO MODE="write">
<MOD_USER USER_LOGIN="Administrator">
<PASSWORD value="Password"/>
</MOD_USER>
</USER_INFO>
</LOGIN>
</RIBCL>
end_marker
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<RIB_INFO MODE="write">
<CLEAR_EVENTLOG/>
</RIB_INFO>
<SERVER_INFO MODE="write">
<CLEAR_IML/>
</SERVER_INFO>
</LOGIN>
</RIBCL>
end_marker
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<SERVER_INFO MODE="write">
<!-- Disable automatic power on -->
<SERVER_AUTO_PWR VALUE="no" />
</SERVER_INFO>
</LOGIN>
</RIBCL>
end_marker
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<RIB_INFO MODE="write">
<INSERT_VIRTUAL_MEDIA IMAGE_URL="http://192.168.10.111/XenServer-6.2.0-install-cd.iso" DEVICE="CDROM"/>
</RIB_INFO>
</LOGIN>
</RIBCL>
end_marker
OR.....
Connecting to bay 6 ...
User:OAtmp-Administrator-544BBD9F logged-in to (172.16.1.106)
iLO 2 Advanced 2.26 at 10:06:29 Jun 18 2014
Server Name:
Server Power: On
</>hpiLO->
</>hpiLO-> vm cdrom get
VM Applet = Disconnected
Boot Option = NO_BOOT
Write Protect = No
Image Inserted = Disconnected
Image URL = None
</>hpiLO-> vm cdrom insert http://192.168.10.111/spp_2015.06.0.iso
</>hpiLO-> vm cdrom get
VM Applet = Disconnected
Boot Option = NO_BOOT
Write Protect = Yes
Image Inserted = Connected
Image URL = http://192.168.10.111/spp_2015.06.0.iso
</>hpiLO-> vm cdrom set boot_once
</>hpiLO-> vm cdrom get
VM Applet = Disconnected
Boot Option = BOOT_ONCE
Write Protect = Yes
Image Inserted = Connected
Image URL = http://192.168.10.111/spp_2015.06.0.iso
</>hpiLO->
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<RIB_INFO MODE="write">
<LICENSE>
<ACTIVATE KEY="1111122222333334444455555"/>
</LICENSE>
</RIB_INFO>
</LOGIN>
</RIBCL>
end_marker
Chassis-EC3-OA1> UPDATE ILO 9 http://192.168.10.111/ilo3_185.bin
Updating ProLiant iLO3 ...
(This may take several minutes.)
Bay 9: Successful update. Please allow iLO one minute to restart.
Chassis-EC3-OA1>
@ymulleneers
Copy link

Hello,

You may want to use the argument '-s' as '-s var=value' as substitute. It substitutes all occurrences of '%var%' by 'value'. This may be a cool way to improve your code.

I think I cannot contribute directly to your code. But i am certainly able to write some manuals for your code and explain you some point you may have missed.

@flaviotorres
Copy link

flaviotorres commented Feb 8, 2018

DELETE USER:

<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="adminname" PASSWORD="password">
<USER_INFO MODE="write">
<DELETE_USER USER_LOGIN="username"/>
</USER_INFO>
</LOGIN>
</RIBCL>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment