Friday, May 22, 2015

Enabling / Configuring iDRAC from within ESX

I had an issue the other day - I needed to configure the iDRAC on several Dell servers that were running ESXi, but I couldn't reboot the systems to get into the BIOS. There are plenty of tools and documents on how to configure the iDRAC on a server running Windows, or even Linux, but ESXi is somewhat of an outlier.

After lots of googling, I finally came across by Ryan Chapman. Here, he shows how to use a tool, IPMITOOL, to configure the iDRAC. My steps were a little different than his, so I decided to document it here in case anyone needs it in the future.
BTW - This process requires a Linux machine to compile the tool. I am using Ubuntu 14.04 - Trusty Tahr

First - Install the necessary build components
This installs not only the build tools, but the multilib package allows a system (64bit in my case) create packages for other platforms (32 bit)
sudo apt-get install build-essential gcc-multilib

Second - Download the tool source
There are newer versions of this tool available, but this is the version that Ryan used, so I followed suit
tar zxvf ipmitool-1.8.11.tar.gz
cd ipmitool-1.8.11/

Third - Prepare the code/compiler
./configure CFLAGS=-m32 LDFLAGS=-static

Fourth - Compile
make all

Assuming everything completed without error, there should now be a file src/ipmitool. We need to copy this to our ESXi host to execute.
First - You need to enable the SSH service and firewall ports on the ESXi host

Second - Copy the file
scp src/ipmitool root@

Third - SSH to the ESXi host
ssh root@

Fourth - Configure the iDRAC
This was different for me than from the example. When I tried to execute ./ipmitool shell, I received an error. Instead, I found that I could configure each option from the command line.
root@C2100:~ # cd /scratch/
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool shell
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 ipaddr
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 netmask
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 defgw ipaddr
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 auth ADMIN MD5,PASSWORD
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 arp respond on
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 arp generate on
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 arp interval 5
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan set 1 access on
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool user set name 2 root
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool user set password 2 BuggyP@ssw0rd
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool channel setaccess 1 2 callin=on link=on privilege=4
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool user enable 2
root@C2100:/vmfs/volumes/4f364c4f-5e22faef-0987-e89a8f229d27 # ./ipmitool lan print 1
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD
Auth Type Enable        : Callback : MD2 MD5
                        : User     : MD2 MD5
                        : Operator : MD2 MD5
                        : Admin    : MD5 PASSWORD
                        : OEM      :
IP Address Source       : Static Address
IP Address              :
Subnet Mask             :
MAC Address             : 00:22:19:27:53:10
SNMP Community String   : public
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP      :
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       :
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM

Monday, May 18, 2015

Adding GUI functionality to a RHEL system

I find myself building several RedHat VMs, so many in fact that I have a standard build configuration and kickstart script to customize it exactly as needed. However, occasionally the standard isn't what is needed, so some customization is needed. One of the common customizations needed is to change the basic RHEL VM into a desktop with a GUI and VNC.

To make this happen, there are a couple of steps. The first step is to install the desktop/GUI features. To accomplish this, we use YUM with the GroupInstall option and configure the system to boot to the desktop
yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Internet Browser" "Graphical Administration Tools" "Fonts"
vi /etc/inittab
change initdefault from 3 to 5

Next step is to install and configure VNC for the root user
yum install tigervnc-server

enter the VNC password for root

Lastly, is to configure VNC to run for root automatically
vi /etc/sysconfig/vncservers
add VNCSERVERS="0:root"
chkconfig --level 5 vncserver on