Connect ISO file to server using RACADM

Using VNC to connect to the iDRAC of a server is a great way to avoid Oracles eternal Java upgrades, security flaws, etc. At the other hand the Java viewer allows for mapping of ISO files when installing the server OS. That’s not an option with VNC, so what to do? Easy: Launch the VNC session and map the ISO file separately from the command line:

Check status of virtual media:

C:\Users\jonas>racadm -r 192.168.0.120 -u root -p calvin remoteimage -s
Remote File Share is Disabled
UserName
Password
ShareName

Mount the image:

C:\Users\jonas>racadm -r 192.168.0.120 -u root -p calvin remoteimage -c -u user@domain.local -p demo -l //192.168.0.121/ISO/MSDN/Win2012R2-JP-EVAL.ISO
Remote Image is now Configured

Verify that the image is connected:

C:\Users\jonas>racadm -r 192.168.0.120 -u root -p calvin remoteimage -s
Remote File Share is Enabled
UserName
Password
ShareName //192.168.0.121/ISO/MSDN/Win2012R2-JP-EVAL.ISO

Disconnect the image:

C:\Users\jonas>racadm -r 192.168.0.120 -u root -p calvin remoteimage -d
Disable Remote File Started. Please check status using -s
option to know Remote File Share is ENABLED or DISABLED.

View, Create, Delete virtual RAID volumes with RACADM on an FC630 server (Dell 13G)

SSH to the iDRAC of the machine:

jonas@nyx:~$ ssh root@192.168.0.2
root@192.168.0.2's password:

Enter RACADM:
/admin1-> racadm

Check for existing RAID volumes:

racadm>>storage get vdisks
racadm storage get vdisks
Disk.Virtual.0:RAID.Integrated.1-1

Check ID:s of the physical disks and the controller:

racadm>>storage get pdisks
racadm storage get pdisks
Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.4:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.5:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.6:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.7:Enclosure.Internal.0-1:RAID.Integrated.1-1

racadm>>storage get controllers
racadm storage get controllers
RAID.Integrated.1-1

Create the RAID volume:
In this case RAID6 with read-ahead and write-back switched on


racadm>>racadm storage createvd:RAID.Integrated.1-1 -rl r6 -wp wb -rp ra -name SSDVOL2 -pdkey:Disk.Bay.4:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.5:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.6:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.7:Enclosure.Internal.0-1:RAID.Integrated.1-1

racadm storage createvd:RAID.Integrated.1-1 -rl r6 -wp wb -rp ra -name SSDVOL2 -pdkey:Disk.Bay.4:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.5:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.6:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.7:Enclosure.Internal.0-1:RAID.Integrated.1-1
RAC1040 : Successfully accepted the storage configuration operation.
To apply the configuration operation, create a configuration job, and then restart the server.
To create the required commit and reboot jobs, run the jobqueue command.
For more information about the jobqueue command, enter the RACADM command "racadm help jobqueue".

Schedule the job:

racadm>>jobqueue create RAID.Integrated.1-1
racadm jobqueue create RAID.Integrated.1-1
RAC1024: Successfully scheduled a job.
Verify the job status using "racadm jobqueue view -i JID_xxxxx" command.
Commit JID = JID_222873363294
racadm>>

Execute the job by powercycling the server:
racadm>>serveraction powercycle

racadm serveraction powercycle
Server power operation successful

Verify RAID volume creation after job has completed:
racadm>>storage get vdisks

racadm storage get vdisks
Disk.Virtual.0:RAID.Integrated.1-1
Disk.Virtual.1:RAID.Integrated.1-1

View, Create, Delete virtual RAID volumes with RACADM on an R720 server (Dell 12G)

Background
Yesterday I needed to setup an R720 remotely and it needed a new RAID volume created. The issue was that rather than the normal Enterprise license the server had an iDRAC Express license (no remote console) so it wasn’t possible to use the normal UEFI / BIOS wizard to create the disks. Luckily a GUI isn’t required and the disks can be created quite happily with RACADM.

Local and remote
RACADM can be used locally on the server and remotely. In the examples below all commands are done from a remote workstation across the network. It is also possible to SSH to the iDRAC and execute the commands from there (or from the server OS itself it it’s already setup).

Check the presence of virtual disks by using:
racadm -r  -u  -p  raid get vdisks

In the below case the machine doesn’t have any virtual volumes yet:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid get vdisks
ERROR: STOR0104 : No virtual disks are displayed.
Check if the server has power, physical disks are available, and virtual
disks are created.
No virtual disk data to display. The system is powered off, physical
disks are not present on the system, or virtual disks are not created.

If the machine had a virtual disk defined we’d see the below:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid get vdisks
Disk.Virtual.0:RAID.Integrated.1-1

To delete an existing virtual disk:
C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid deletevd:Disk.Virtual.0:RAID.Integrated.1-1

Then schedule the job:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin jobqueue create RAID.Integrated.1-1
RAC1024: Successfully scheduled a job.
Verify the job status using "racadm jobqueue view -i JID_xxxxx" command.
Commit JID = JID_219611981076

Reboot server to execute job:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin serveraction hardreset
Server power operation successful

Check the status of the job:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin jobqueue view -i JID_219611981076
---------------------------- JOB -------------------------
[Job ID=JID_219611981076]
Job Name=Configure: RAID.Integrated.1-1
Status=Scheduled
Start Time=[Now]
Expiration Time=[Not Applicable]
Message=[JCP001: Task successfully scheduled.]
----------------------------------------------------------

To view all jobs (results in a list of jobs and their status):
C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin jobqueue view

To create a virtual disk / volume
Help will show:

racadm raid createvd: -rl {r0|r1|r5|r6|r10|r50|r60} [-wp {wt|wb}] [-rp {nra|ra|ara}]
[-ss {1k|2k|4k|8k|16k|32k|64k|128k|256k|512k|1M|2M|4M|8M|16M}] -pdkey:
[-dcp {enabled|disabled|default}] [-name ] [-size {b|k|m|g|t}]

So we need the FQDD of the Controller and also the list of FQDD:s for our physical disks.

Checking our controller FQDD:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid get controllers
RAID.Integrated.1-1

Checking our physical disks FQDD:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid get pdisks
Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1
Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1

Example of creating the virtual disk with RAID0, write-through and no read-ahead (YES, IT’S ALL ONE LINE):


C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid createvd:RAID.Integrated.1-1 -rl r0 -wp wt -rp nra -name raid_0 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1

Example of creating the virtual disk with RAID0, write-back cache and read-ahead enabled (YES, IT’S ALL ONE LINE):


C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid createvd:RAID.Integrated.1-1 -rl r0 -wp wb -rp ra -name raid_0 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1

Schedule the job:
C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin jobqueue create RAID.Integrated.1-1

Restart to execute the job:
C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin serveraction hardreset

View the virtual disk once created:

C:\Users\Administrator.DSC>racadm -r 192.168.0.1 -u root -p calvin raid get vdisks
Disk.Virtual.0:RAID.Integrated.1-1

Set NTP settings on a Dell server with iDRAC7

Set the DNS first to ensure the iDRAC can resolve the NTP host names:
racadm -r 10.1.1.100 -u root -p calvin set idrac.ipv4static.dns1 8.8.8.8

Set the NTP server names:
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp1 0.asia.pool.ntp.org
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp2 1.asia.pool.ntp.org
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp3 2.asia.pool.ntp.org

In case it won’t update the time when FQDN’s are used, IP addresses can also be used:
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp1 129.250.35.250
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp2 180.211.88.50
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.ntp3 202.112.29.82

Enable NTP and set max hops:
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.NTPEnable Enabled
racadm -r 10.1.1.100 -u root -p calvin set idrac.NTPConfigGroup.NTPMaxDist 16

Set the timezone:
racadm -r 10.1.1.100 -u root -p calvin set idrac.time.timezone Japan

Enabling VNC on iDRAC7 with RACADM

Example of enabling the VNC server on an iDRAC and setting the password:
racadm -r 10.1.1.200 -u root -p calvin set idrac.vncserver.enable Enabled
racadm -r 10.1.1.200 -u root -p calvin set idrac.vncserver.Password calvin

Note: Default port for VNC on the iDRAC is 5901

Connection example can be found here.

RACADM – Change BIOS settings, Create commit job, Reboot and apply

Pull current settings:
C:\Users\Administrator>racadm -r 10.6.26.241 -u root -p calvin get BIOS.BiosBootSettings.HddSeq
[Key=BIOS.Setup.1-1#BiosBootSettings]
HddSeq=RAID.Integrated.1-1,Disk.SDInternal.1-1

Update boot order:
C:\Users\Administrator>racadm -r 10.6.26.241 -u root -p calvin set BIOS.BiosBootSettings.HddSeq Disk.SDInternal.1-1,RAID.Integrated.1-1
[Key=BIOS.Setup.1-1#BiosBootSettings]
RAC1017: Successfully modified the object value and the change is in
pending state.
To apply modified value, create a configuration job and reboot
the system. To create the commit and reboot jobs, use “jobqueue”
command. For more information about the “jobqueue” command, see RACADM
help.

Verify setting is in PENDING state:
C:\Users\Administrator>racadm -r 10.6.26.241 -u root -p calvin get BIOS.BiosBootSettings.HDDSeq
[Key=BIOS.Setup.1-1#BiosBootSettings]
HddSeq=RAID.Integrated.1-1,Disk.SDInternal.1-1
(Pending Value=Disk.SDInternal.1-1,RAID.Integrated.1-1)

Create job!
C:\Users\Administrator>racadm -r 10.6.26.241 -u root -p calvin jobqueue create BIOS.Setup.1-1
RAC1024: Successfully scheduled a job.
Verify the job status using “racadm jobqueue view -i JID_xxxxx” command.
Commit JID = JID_995403790233

Reset machine to get Lifecycle Controller to execute change:
C:\Users\Administrator>racadm -r 10.6.26.241 -u root -p calvin serveraction hardreset

SOL / Serial Over Lan connection from Linux to Dell iDRAC or BMC

Enable SOL with Racadm (or via the web interface – whichever):
racadm -r 10.2.2.2 -u root -p calvin config -g cfgIpmiLan -o cfgIpmiLanEnable 1

NOTE: for the ipmitool commands, create a new user with SOL permission first if root/root or root/calvin doesn’t work. This seems to be the case with the C series servers.

Connect using ipmitool:
jonas@erebus:~$ ipmitool -I lanplus -U jonas -P jonas -H 10.2.2.2 sol activate
jonas@erebus:~$

Terminate session:
▒~. [terminated ipmitool] (yes, termninate with “~.”)
jonas@erebus:~$

Identify and close iDRAC sessions via SSH

An iDRAC can run out of available sessions and hence refuse any new connections over the web interface. This happens if the admin logs on multiple times and doesn’t log out (just closing the window). Luckily this is easy to remedy:

SSH to iDRAC of server:
ssh root@10.6.26.222

Get session list:
racadm getssninfo
SSNID Type User IP Address Login Date/Time
—————————————————————————
6 GUI root 10.3.2.147 12/06/2013 09:34:49
7 GUI root 10.3.2.147 12/06/2013 09:35:25
11 GUI root 10.3.2.147 12/06/2013 10:43:57
12 SSH root 10.3.2.155 12/16/2013 12:46:31

Kill the session we want to get rid of:
racadm closessn -i 6
Session 6 closed successfully.

Power control and capping on Dell servers using RACADM

RACADM:
Usage: SSH -> racadm ->
Get current value: getconfig -g <group> -o <object>
Set a value: config -g <group> -o <object> <new_value>
Do “help” to get list of groups.
Do “help <groupname>” to get objects for a particular group.

Get current draw:
racadm getconfig -g cfgServerPower -o cfgServerActualPowerConsumption
108 W | 369 Btu/hr

Enable power capping:
racadm config -g cfgServerPower -o cfgServerPowerCapEnable 1
Object value modified successfully

Set cap:
racadm config -g cfgServerPower -o cfgServerPowerCapWatts 400
Object value modified successfully

Verify:
racadm getconfig -g cfgServerPower -o cfgServerPowerCapWatts
400 W

Get total kVh:
racadm getconfig -g cfgServerPower -o cfgServerCumulativePowerConsumption
292.370 KWh | 997859 Btu