Video Screencast Help

How to Configure DRACs without Booting to Automation and Other Useful Tips

Created: 13 Feb 2007 • Updated: 07 Jul 2009 | 4 comments
Language Translations
lordmithrandir's picture
+2 2 Votes
Login to vote

The Dell Remote Access Card (DRAC) is an awesome add-on card that allows you to interact with your servers over the network, even if the server isn't on. In order to use it, however, you usually have to configure it. Once a server is up and running you almost never want to reboot it. Downtime is the bane of the Network administrator's existance. Yet, if you want to change the configuration of your DRAC you will need to reboot into automation to run the job, or reboot the system and make changes to the DRAC firmware manually. For many environments this is simply not an option. Fortunately there is another way.

This article will explain how to use the utility racadm to remotely configure the DRAC on a server. You will be able to capture a configuration file, modify it, and configure a server, all without restarting the server you are configuring. It will even provide a basic server side script you can use so this entire process can be automated. So what are we waiting for? Let's get started.

Obtaining racadm

The utility racadm.exe is produced by Dell. There are several different places where you can obtain it. The easiest way is to install Deployment Solution for Dell Servers 2.0 or later. It can also be obtained from an installation of OpenManage Server Administrator (OMSA) or IT Assistant (ITA). As long as you can get racadm.exe from one of these locations you will be able to proceed with this article, however, I strongly recommend installing the DS for Dell add-on since I will be using some of its features to achieve full automation. Since I use DS for Dell 2.0 SP1, I will get racadm from there. You can find it in [Deployment share]\Dell\Toolkit\winpe.

About racadm

Racadm.exe is a powerful tool that will allow you to interact with the DRACs on your servers. With it you can power systems on or off, reboot them, configure them, obtain server logs, and much more. In order to communicate with the DRAC over the network you will need a valid user name and password. The default user name is usually root and the default password is usually calvin. I highly suggest changing this on your production servers unless you want just anyone to be able to reboot your servers anytime they like.

Using racadm manually

The command line for racadm.exe is fairly straight forward. By simply running racadm.exe you will get usage information. When using it over the network you have to include a user name and password with the switches -u and -p. The IP address of the system you want to contact is specified with the -r switch. I'll give sample command-lines later. Now I'll briefly describe some of the different options you can use. The following information was taken straight from the usage information output by racadm.

  • getconfig - display the current RAC configuration
  • config - modifies the current RAC configuration
  • getraclog - display the total number of entries in the RAC log
  • getsel - display the total number of entries in the system event log
  • getsvctag - display service tags
  • getsysinfo - display general RAC and system information
  • serveraction - execute graceful/hard server reset, power-on/off/cycle
    • powerup
    • powerdown
    • powercycle
    • hardreset
    • graceshutdown
    • gracereboot
  • racreset - reset the RAC
  • racresetcfg - reset the RAC to the default configuration

One very useful switch you can use with getconfig and config is -f. If I use the -f switch with the getconfig option and specify a filename it will save the entire DRAC configuration to a file. You can use this file to modify the configuration of the system (use the -f switch again with the config option).

Capturing a configuration file manually

To capture a configuration file use the following command-line:

racadm.exe -r [IP address of server] -u [user name] -p [password] getconfig -f config.ini

This will capture the configuration from the server specified and place it in the file specified. The file will be created in the current working directory. I've tried supplying a full path so it is created elsewhere, but I wasn't able to get it to work. If you plan to configure many servers this way, you may want to name the file after the DS ID number, or another unique value. This way you can save your configuration files for later use.

Example:

The following command is for getting a configuration file for a system with an IP address of 192.168.0.205, with the default user name and password:

racadm.exe -r 192.168.0.205 -u root -p calvin getconfig -f config.ini

Figure 1

Click to view.

Deploying a configuration file manually

To deploy a configuration file use the following command-line:

racadm.exe -r [IP address of server] -u [user name] -p [password] config -f config.ini

This will use the configuration file specified to configure the DRAC.

Example:

If the IP address for the system I am configuring is 192.168.0.205, and the user name and password are the defaults then I'd use the command:

racadm.exe -r 192.168.0.205 -u root -p calvin config -f config.ini

Figure 2

Click to view.

Racadm and blades

If you are using the serveraction option you will need an additional command-line switch when using blades. The -s switch allows you to specify which blade to apply the action to. This is applicable only to the 1655 blades. As far as I know the serveraction features of the 1855 and 1955 blades are not available. You must use the IPMI interface for powercontrol options.

Example

If I had a 1655 blade chassis and wanted to power one of the systems on (blade 3 in this example) then I'd use the following command-line:

racadm.exe -r 192.168.0.210 -u root -p calvin serveraction -s3 powerup

Figure 3

Click to view.

Scripting with racadm

This is all fine and great, but who wants to have to open up a command-line every time they want to change the configuration of the DRACs on their servers? Now we will use the power of DS to simplify this process. The goal is to make this work as well as the jobs that come with the DS for Dell Servers add-on, but not require that the servers reboot into automation. We will take advantage of a few things installed by the DS for Dell Servers add-on, so if you aren't using it these scripts won't work for you as is. A simple solution would be to download the add-on since it is free.

Getting the configuration file

Below is a sample script you can use to capture configuration files. You may need to modify it for your environment, but it should work as long as you have the DS for Dell add-on installed. If you don't, then some of the tables and stored procedures referenced in the custom tokens won't work. To use it just copy and paste the script into a batch file (I had problems when I tried to run this from an embedded script), create a new job, make a run script task and point to the batch file you created. Set it to run server side in Windows. You can also uncheck the box "Run when the agent is connected" since you can always connect to the DRAC even if the system isn't powered on.

----Get config script start----

REM Get DRAC firmware configuration
@echo off

:: Racadm credentials and destination address

set USERNAME=root
set PASSWORD=calvin

:: The second line can be used if you have done a discover using the Dell add-on's configuration utility
:: Otherwise you will have to manually enter the IP address
:: set DEST_IP=192.168.0.215
set DEST_IP=%#*"SELECT dracip from dell_power where computer_id = %ID%"%

:: Path variables, these will need to be changed for your environment

set DEPLOY_SHARE_PATH=.
set RACADM_PATH=%DEPLOY_SHARE_PATH%\Dell\Toolkit\winpe
set CONFIG_FILE_PATH=%DEPLOY_SHARE_PATH%\Dell\Toolkit\Systems\PE%#*"{call dell_svr_model( %ID% )}"%\DRAC\%ID%.ini


echo Calling racadm on system %ID% >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log
echo Command-line: racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% getconfig -f %ID%.ini >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log


:: racadm works best when run from the present working directory, and seems to have problems
:: creating configuration files in directories other than the current one, so the file is
:: just moved to the desired location after it is created.

cd %RACADM_PATH%
racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% getconfig -f %ID%.ini >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log
move %ID%.ini %CONFIG_FILE_PATH%

exit 0

----Script end----

Configuring DRAC with a configuration file

Follow the same steps outlined above for using this script.

----Config DRAC script start----

REM Get DRAC firmware configuration
@echo off

:: Racadm credentials and destination address

set USERNAME=root
set PASSWORD=calvin

:: The second line can be used if you have done a discover using the Dell add-on's configuration utility
:: Otherwise you will have to manually enter the IP address
:: set DEST_IP=192.168.0.215
set DEST_IP=%#*"SELECT dracip from dell_power where computer_id = %ID%"%

:: Path variables, these will need to be changed for your environment

set DEPLOY_SHARE_PATH=.
set RACADM_PATH=%DEPLOY_SHARE_PATH%\Dell\Toolkit\winpe
set CONFIG_FILE_PATH=%DEPLOY_SHARE_PATH%\Dell\Toolkit\Systems\PE%#*"{call dell_svr_model( %ID% )}"%\DRAC\%ID%.ini


echo Calling racadm on system %ID% >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log
echo Command-line: racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% config -f %ID%.ini >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log


:: racadm works best when run from the present working directory, and seems to have problems
:: creating configuration files in directories other than the current one, so the file is
:: just moved to the desired location after it is created.

cd %RACADM_PATH%
copy %CONFIG_FILE_PATH% %ID%.ini
racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% config -f %ID%.ini >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log
del %ID%.ini /y

exit 0

----Script end----

The "get" script should obtain the configuration file from the system you drop the job on, and copy it to the model directory that corresponds to the model of the system the job was run on. The "config" script should pull the config file out of the model directory that corresponds to the model the job was run on and configure the system. The config files are named after the DS ID, so you shouldn't have file collisions. If your systems are all in the Dell power table (they get there by doing a discover) then you don't even have to enter the IP address of the DRAC you want to configure. Otherwise, you will have to manually edit the DEST_IP variable each time you run the job. I've tried to make these scripts fully automated so they don't require editing. You may have to modify them to suit your environment.

Other commands

You can script any command you want. Just take the above sample scripts and modify them with the command-line switches needed. Here are a few sample command-lines:

  • Get system event log (places log into log stored in .\dell\alogs)
    • racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% getsel >> %DEPLOY_SHARE_PATH%\Dell\alogs\%ID%.log
  • Power on system
    • racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% serveraction powerup
  • Power off system
    • racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% serveraction powerdown
  • Reboot system
    • racadm.exe -r %DEST_IP% -u %USERNAME% -p %PASSWORD% serveraction powercycle
Article Filed Under:

Comments 4 CommentsJump to latest comment

eorme's picture

Great article lordmithrandir. Now I can configure my servers without missing a beat.

+1
Login to vote
Career Builder's picture

Hi, 

I'm needing help as I'm not a tech guy, but have a Dell 2850 server that I installed a DRAC4 card on and

need it configured by someone who knows how. Can you help? 

Thanks, John

0
Login to vote
riva11's picture

This is a great article. A complete step-by-step help guide for beginners (and not only...).

Thanks!

0
Login to vote