Changing iDrac Settings on ESXi

From OISecWiki

When running ESXi on Dell Hardware it might be hard to change idrac/ipmi settings.

A lot of resources on the internet provide guides to build static versions of ipmitool to achieve this, but the easiest and most reliable way is to install the ipmitool vib.

The following guide comes from https://vswitchzero.com/ipmitool-vib/

The VIB can be downloaded here (mirrored from the original site) File:Ipmitool-esxi-vib-1.8.11-2.zip

Installing the VIB

To make installation and removal easier, I packaged up the ipmitool executable as a VIB as well as an offline bundle. To install the VIB, use the following steps:

If you haven’t already done so, you’ll need to set your software acceptance level to ‘CommunitySupported’. This can be accomplished by running the following command:

[root@esx-e1:~] esxcli software acceptance set --level=CommunitySupported

Host acceptance level changed to 'CommunitySupported'.

Next, copy ipmitool-1.8.11-2.x86_64.vib to the ESXi host. To do this you can SCP file file over using WinSCP or the scp command in Linux. The /tmp location is recommended for this purpose. Don’t forget to enable SSH on the ESXi host or you won’t be able to scp the file over. Alternatively, you can copy the file to a shared datastore that the host has access to using the datastore browser.

Install ipmitool using the esxcli software vib install -v /tmp/ipmitool-1.8.11-2.x86_64.vib –no-sig-check command:

[root@esx-e1:~] esxcli software vib install -v /tmp/ipmitool-1.8.11-2.x86_64.vib
Installation Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed: ipmitool_bootbank_ipmitool_1.8.11-2
VIBs Removed:
VIBs Skipped:

Note: If the install fails, try to add the –no-sig-check option to bypass the file signature check. It’s not necessary to reboot the host after installation.

If ipmitool installed successfully, you can run the ipmitool command from the /opt/ipmitool/ directory. If you get the help output returned, it was successful:

[root@esx-e1:~] /opt/ipmitool/ipmitool
No command provided!
Commands:
raw Send a RAW IPMI request and print response
i2c Send an I2C Master Write-Read command and print response
spd Print SPD info from remote I2C device
lan Configure LAN Channels
chassis Get chassis status and set power state
power Shortcut to chassis power commands
event Send pre-defined events to MC
mc Management Controller status and global enables
sdr Print Sensor Data Repository entries and readings
sensor Print detailed sensor information
fru Print built-in FRU and scan SDR for FRU locators

You can validate the VIB was installed by running the following command:

[root@esx-e1:~] esxcli software vib get -n ipmitool
ipmitool_bootbank_ipmitool_1.8.11-2
Name: ipmitool
Version: 1.8.11-2
Type: bootbank
Vendor: ipmitool
Acceptance Level: CommunitySupported
Summary: ipmitool 1.8.11 CLI utility
Description: Used for managing IPMI baseboard controllers on the host.
ReferenceURLs: https://vswitchzero.com/ipmitool-vib

Creation Date: 2019-08-20
Depends:
Conflicts:
Replaces:
Provides:
Maintenance Mode Required: False
Hardware Platforms Required:
Live Install Allowed: True
Live Remove Allowed: True
Stateless Ready: True
Overlay: False
Tags: ipmi, tool, utility
Payloads: ipmitool

The executable will be installed to the /opt/ipmitool/ location on the ESXi host:

[root@esx-e1:~] ls -lha /opt/ipmitool/ipmitool

-r-xr-xr-x    1 root     root      787.6K Aug 20 16:00 /opt/ipmitool/ipmitool

Also included in the download is an offline bundle .zip file. This file can be used for including the VIB in custom ISOs or for uploading multiple hosts via Update Manager. It is not necessary for installing on an individual host.

Changing Network Settings

Example:

# ipmitool lan set 1 ipsrc static
# ipmitool lan set 1 ipaddr 10.0.0.100
# ipmitool lan set 1 netmask 255.255.255.0
# ipmitool lan set 1 defgw ipaddr 10.0.0.1
# ipmitool mc reset warm  # Optional not required

Changing Admin Password

Example:

# ipmitool user set password 2 NEW_PASSWORD