Настройка iLO на серверах Hewlett Packard через консоль Linux
Roman Bogachev
VMware Specialist | Drone Pilot | Traveler
ILO (Integrated Lights-Out ) — механизм управления серверами в условиях отсутствия физического доступа к ним. Применяется фирмой Hewlett Packard для всех своих серверов. Аналог IPMI .
Случалось у каждого, что терялся доступ к iLO , менялся IP или просто забывался, но при этом нарушать работу сервера перезагрузкой не очень хочется.
Для этого случая можем воспользоваться утилитой hponconfig
, непосредственно с установленной Linux системы на борту.
Установим 1 2 3 4 5 yum install hponcfg apt-get install hponcfg
Импортируем текущие конфигурации в файл 1 hponcfg -a -w iloout.cfg
Настройки хранятся в читаемом XML формате, поэтому не составит особого труда в них разобраться.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 <RIBCL VERSION ="2.0" > <LOGIN USER_LOGIN ="admin" PASSWORD ="password" > <RIB_INFO mode ="write" > <MOD_NETWORK_SETTINGS > <ENABLE_NIC VALUE ="Y" /> <SHARED_NETWORK_PORT VALUE ="N" /> <VLAN_ENABLED VALUE ="N" /> <SPEED_AUTOSELECT VALUE ="Y" /> <DHCP_ENABLE VALUE ="N" /> <DHCP_GATEWAY VALUE ="N" /> <DHCP_DNS_SERVER VALUE ="N" /> <DHCP_WINS_SERVER VALUE ="N" /> <DHCP_STATIC_ROUTE VALUE ="N" /> <DHCP_DOMAIN_NAME VALUE ="N" /> <DHCP_SNTP_SETTINGS VALUE ="N" /> <REG_WINS_SERVER VALUE ="Y" /> <REG_DDNS_SERVER VALUE ="Y" /> <PING_GATEWAY VALUE ="Y" /> <IP_ADDRESS VALUE ="18X.6X.X8.X2X" /> <SUBNET_MASK VALUE ="255.255.255.248" /> <GATEWAY_IP_ADDRESS VALUE ="18X.6X.X8.X" /> <DNS_NAME VALUE ="TESTHPSERVER" /> <DOMAIN_NAME VALUE ="" /> <PRIM_DNS_SERVER VALUE ="0.0.0.0" /> <SEC_DNS_SERVER VALUE ="0.0.0.0" /> <TER_DNS_SERVER VALUE ="0.0.0.0" /> <PRIM_WINS_SERVER VALUE ="0.0.0.0" /> <SEC_WINS_SERVER VALUE ="0.0.0.0" /> <SNTP_SERVER1 VALUE ="" /> <SNTP_SERVER2 VALUE ="" /> <TIMEZONE VALUE ="Europe/London" /> <STATIC_ROUTE_1 DEST ="0.0.0.0" MASK ="0.0.0.0" GATEWAY ="0.0.0.0" /> <STATIC_ROUTE_2 DEST ="0.0.0.0" MASK ="0.0.0.0" GATEWAY ="0.0.0.0" /> <STATIC_ROUTE_3 DEST ="0.0.0.0" MASK ="0.0.0.0" GATEWAY ="0.0.0.0" /> <IPV6_STATIC_ROUTE_1 IPV6_DEST ="::" PREFIXLEN ="0" IPV6_GATEWAY ="::" ADDR_STATUS ="INACTIVE" /> <IPV6_STATIC_ROUTE_2 IPV6_DEST ="::" PREFIXLEN ="0" IPV6_GATEWAY ="::" ADDR_STATUS ="INACTIVE" /> <IPV6_STATIC_ROUTE_3 IPV6_DEST ="::" PREFIXLEN ="0" IPV6_GATEWAY ="::" ADDR_STATUS ="INACTIVE" /> <IPV6_PRIM_DNS_SERVER VALUE ="::" /> <IPV6_SEC_DNS_SERVER VALUE ="::" /> <IPV6_TER_DNS_SERVER VALUE ="::" /> <IPV6_DEFAULT_GATEWAY VALUE ="::" /> <IPV6_PREFERRED_PROTOCOL VALUE ="Y" /> <IPV6_ADDR_AUTOCFG VALUE ="Y" /> <IPV6_REG_DDNS_SERVER VALUE ="N" /> </MOD_NETWORK_SETTINGS > </RIB_INFO > <RIB_INFO mode ="write" > <MOD_GLOBAL_SETTINGS > <SESSION_TIMEOUT VALUE ="30" /> <ILO_FUNCT_ENABLED VALUE ="Y" /> <F8_PROMPT_ENABLED VALUE ="Y" /> <F8_LOGIN_REQUIRED VALUE ="N" /> <HTTPS_PORT VALUE ="443" /> <HTTP_PORT VALUE ="80" /> <REMOTE_CONSOLE_PORT VALUE ="17990" /> <VIRTUAL_MEDIA_PORT VALUE ="17988" /> <SNMP_ACCESS_ENABLED VALUE ="Y" /> <SNMP_PORT VALUE ="161" /> <SNMP_TRAP_PORT VALUE ="162" /> <SSH_PORT VALUE ="22" /> <SSH_STATUS VALUE ="Y" /> <SERIAL_CLI_STATUS VALUE ="3" /> <SERIAL_CLI_SPEED VALUE ="1" /> <VSP_LOG_ENABLE VALUE ="N" /> <MIN_PASSWORD VALUE ="8" /> <AUTHENTICATION_FAILURE_LOGGING VALUE ="3" /> <RBSU_POST_IP VALUE ="Y" /> <ENFORCE_AES VALUE ="N" /> <IPMI_DCMI_OVER_LAN_ENABLED VALUE ="Y" /> <REMOTE_SYSLOG_ENABLE VALUE ="N" /> <REMOTE_SYSLOG_PORT VALUE ="514" /> <REMOTE_SYSLOG_SERVER_ADDRESS VALUE ="" /> <ALERTMAIL_ENABLE VALUE ="N" /> <ALERTMAIL_EMAIL_ADDRESS VALUE ="" /> <ALERTMAIL_SENDER_DOMAIN VALUE ="" /> <ALERTMAIL_SMTP_SERVER VALUE ="" /> </MOD_GLOBAL_SETTINGS > </RIB_INFO > <DIR_INFO mode ="write" > <MOD_DIR_CONFIG > <DIR_AUTHENTICATION_ENABLED VALUE ="N" /> <DIR_LOCAL_USER_ACCT VALUE ="Y" /> <DIR_SERVER_ADDRESS VALUE ="" /> <DIR_SERVER_PORT VALUE ="636" /> <DIR_OBJECT_DN VALUE ="" /> <DIR_USER_CONTEXT_1 VALUE ="" /> <DIR_USER_CONTEXT_2 VALUE ="" /> <DIR_USER_CONTEXT_3 VALUE ="" /> <DIR_USER_CONTEXT_4 VALUE ="" /> <DIR_USER_CONTEXT_5 VALUE ="" /> <DIR_USER_CONTEXT_6 VALUE ="" /> <DIR_USER_CONTEXT_7 VALUE ="" /> <DIR_USER_CONTEXT_8 VALUE ="" /> <DIR_USER_CONTEXT_9 VALUE ="" /> <DIR_USER_CONTEXT_10 VALUE ="" /> <DIR_USER_CONTEXT_11 VALUE ="" /> <DIR_USER_CONTEXT_12 VALUE ="" /> <DIR_USER_CONTEXT_13 VALUE ="" /> <DIR_USER_CONTEXT_14 VALUE ="" /> <DIR_USER_CONTEXT_15 VALUE ="" /> <DIR_ENABLE_GRP_ACCT VALUE ="N" /> <DIR_GRPACCT1_NAME VALUE ="Administrators" /> <DIR_GRPACCT1_PRIV VALUE ="1,2,3,4,5,6" /> <DIR_GRPACCT1_SID VALUE ="" /> <DIR_GRPACCT2_NAME VALUE ="Authenticated Users" /> <DIR_GRPACCT2_PRIV VALUE ="6" /> <DIR_GRPACCT2_SID VALUE ="S-1-5-11" /> <DIR_KERBEROS_ENABLED VALUE ="N" /> <DIR_KERBEROS_REALM VALUE ="" /> <DIR_KERBEROS_KDC_ADDRESS VALUE ="" /> <DIR_KERBEROS_KDC_PORT VALUE ="88" /> </MOD_DIR_CONFIG > </DIR_INFO > <RIB_INFO mode ="write" > <MOD_SNMP_IM_SETTINGS > <SNMP_ADDRESS_1 VALUE ="" /> <SNMP_ADDRESS_1_ROCOMMUNITY VALUE ="" /> <SNMP_ADDRESS_1_TRAPCOMMUNITY VERSION ="" VALUE ="" /> <SNMP_ADDRESS_2 VALUE ="" /> <SNMP_ADDRESS_2_ROCOMMUNITY VALUE ="" /> <SNMP_ADDRESS_2_TRAPCOMMUNITY VERSION ="" VALUE ="" /> <SNMP_ADDRESS_3 VALUE ="" /> <SNMP_ADDRESS_3_ROCOMMUNITY VALUE ="" /> <SNMP_ADDRESS_3_TRAPCOMMUNITY VERSION ="" VALUE ="" /> <SNMP_V3_ENGINE_ID VALUE ="" /> <TRAP_SOURCE_IDENTIFIER VALUE ="iLO Hostname" /> <RIB_TRAPS VALUE ="Y" /> <OS_TRAPS VALUE ="Y" /> <COLD_START_TRAP_BROADCAST VALUE ="Y" /> <SNMP_V1_TRAPS VALUE ="Y" /> <SNMP_PASSTHROUGH_STATUS VALUE ="N" /> <WEB_AGENT_IP_ADDRESS VALUE ="" /> <CIM_SECURITY_MASK VALUE ="3" /> <SNMP_SYS_CONTACT VALUE ="" /> <SNMP_SYS_LOCATION VALUE ="" /> <AGENTLESS_MANAGEMENT_ENABLE VALUE ="Y" /> <SNMP_SYSTEM_ROLE VALUE ="" /> <SNMP_SYSTEM_ROLE_DETAIL VALUE ="" /> <SNMP_USER_PROFILE INDEX ="1" > <SECURITY_NAME VALUE ="" /> <AUTHN_PROTOCOL VALUE ="0" /> <AUTHN_PASSPHRASE VALUE ="" /> <PRIVACY_PROTOCOL VALUE ="0" /> <PRIVACY_PASSPHRASE VALUE ="" /> </SNMP_USER_PROFILE > <SNMP_USER_PROFILE INDEX ="2" > <SECURITY_NAME VALUE ="" /> <AUTHN_PROTOCOL VALUE ="0" /> <AUTHN_PASSPHRASE VALUE ="" /> <PRIVACY_PROTOCOL VALUE ="0" /> <PRIVACY_PASSPHRASE VALUE ="" /> </SNMP_USER_PROFILE > <SNMP_USER_PROFILE INDEX ="3" > <SECURITY_NAME VALUE ="" /> <AUTHN_PROTOCOL VALUE ="0" /> <AUTHN_PASSPHRASE VALUE ="" /> <PRIVACY_PROTOCOL VALUE ="0" /> <PRIVACY_PASSPHRASE VALUE ="" /> </SNMP_USER_PROFILE > </MOD_SNMP_IM_SETTINGS > </RIB_INFO > <SERVER_INFO mode ="write" > <SET_HOST_POWER_SAVER HOST_POWER_SAVER ="3" /> </SERVER_INFO > <USER_INFO mode ="write" > <ADD_USER USER_NAME ="Administrator" USER_LOGIN ="Administrator" PASSWORD ="%user_password%" > <ADMIN_PRIV value ="Y" /> <REMOTE_CONS_PRIV value ="Y" /> <RESET_SERVER_PRIV value ="Y" /> <VIRTUAL_MEDIA_PRIV value ="Y" /> <CONFIG_ILO_PRIV value ="Y" /> </ADD_USER > <ADD_USER USER_NAME ="admin" USER_LOGIN ="admin" PASSWORD ="%user_password%" > <ADMIN_PRIV value ="Y" /> <REMOTE_CONS_PRIV value ="Y" /> <RESET_SERVER_PRIV value ="Y" /> <VIRTUAL_MEDIA_PRIV value ="Y" /> <CONFIG_ILO_PRIV value ="Y" /> </ADD_USER > </user_INFO > </USER_INFO > <SSO_INFO mode ="write" > <MOD_SSO_SETTINGS > <TRUST_MODE VALUE ="DISABLED" /> <USER_ROLE LOGIN_PRIV ="Y" /> <USER_ROLE REMOTE_CONS_PRIV ="N" /> <USER_ROLE VIRTUAL_MEDIA_PRIV ="N" /> <USER_ROLE RESET_SERVER_PRIV ="N" /> <USER_ROLE CFG_ILO_PRIV ="N" /> <USER_ROLE ADMIN_PRIV ="N" /> <OPERATOR_ROLE LOGIN_PRIV ="Y" /> <OPERATOR_ROLE REMOTE_CONS_PRIV ="Y" /> <OPERATOR_ROLE VIRTUAL_MEDIA_PRIV ="Y" /> <OPERATOR_ROLE RESET_SERVER_PRIV ="Y" /> <OPERATOR_ROLE CFG_ILO_PRIV ="N" /> <OPERATOR_ROLE ADMIN_PRIV ="N" /> <ADMINISTRATOR_ROLE LOGIN_PRIV ="Y" /> <ADMINISTRATOR_ROLE REMOTE_CONS_PRIV ="Y" /> <ADMINISTRATOR_ROLE VIRTUAL_MEDIA_PRIV ="Y" /> <ADMINISTRATOR_ROLE RESET_SERVER_PRIV ="Y" /> <ADMINISTRATOR_ROLE CFG_ILO_PRIV ="Y" /> <ADMINISTRATOR_ROLE ADMIN_PRIV ="Y" /> </MOD_SSO_SETTINGS > </SSO_INFO > <SERVER_INFO mode ="write" > <SERVER_AUTO_PWR VALUE ="RESTORE" /> </SERVER_INFO > </LOGIN > </RIBCL >
Для того, чтобы назначить статический IP-адрес, необходимо изменить настройки:
1 2 3 4 <DHCP_ENABLE VALUE ="N" /> <IP_ADDRESS VALUE ="18X.6X.X8.X2X" /> <SUBNET_MASK VALUE ="255.255.255.248" /> <GATEWAY_IP_ADDRESS VALUE ="18X.6X.X8.X" />
После внесения всех изменений импортируем настройки.
Добавим пользователя Сформируем новый файл user.cfg
с содержимым:
1 2 3 4 5 6 7 8 9 10 11 12 13 <ribcl version ="2.0" > <login USER_LOGIN ="admin" PASSWORD ="password" > <user_INFO MODE ="write" > <add_USER USER_NAME ="your_name" USER_LOGIN ="login" PASSWORD ="password" > <reset_SERVER_PRIV value ="Y" /> <admin_PRIV value ="Y" /> </add_USER > </user_INFO > </login > </ribcl >
Экспортируем его:
1 2 3 4 5 HP Lights-Out Online Configuration utility Version 4.2.0 Date 6/10/2013 (c) Hewlett-Packard Company, 2013 Firmware Revision = 1.22 Device type = iLO 4 Driver name = hpilo Script succeeded
Теперь можем авторизоваться с новым логином/паролем в панели iLO .
Модификация существующего пользователя Для модификации существующего пользователя, сфорумируем файл user_modify.cfg
1 2 3 4 5 6 7 8 9 <ribcl VERSION ="2.0" > <login USER_LOGIN ="admin" PASSWORD ="password" > <user_INFO MODE ="write" > <mod_USER USER_LOGIN ="Administrator" > <password value ="newpass" /> </mod_USER > </user_INFO > </login > </ribcl >
По завершении редактирования также экспортируем настройки, как было выполнено на прошлом шаге.