Jephe Wu - http://linuxtechres.blogspot.com
Environment: DRAC PowerEdge R610, Oracle Linux 6.3 64bit
Objective: serial login from drac ssh cli to Oracle Linux 6.3 and use Oracle VM server xm console command to access VM guest
Steps:
1. create file /etc/init/ttyS1.conf based on the comment in /etc/init/serial.conf
[root@util01 init]# more ttyS1.conf
# /etc/init/ttyS0.conf with content:
# # ttyS0 - agetty
# #
# # This service maintains a agetty on ttyS0.
#
stop on runlevel [S016]
start on runlevel [23]
#
respawn
exec agetty -h -L -w /dev/ttyS1 115200 vt102
2. start it
initctl start ttyS1
3. enable console root login
append ttyS1 at the end of /etc/securetty
4. ssh into DRAC IP address
admin> console com2
go back: ctrl + \
----
optional kernel parameter and bios boot redirection to com2
5. add the following into /etc/grub.conf current kernel parameter
default=0
timeout=5 # wait for 10s on serial console to let you to press any key, otherwise, it won't display
#splashimage=(hd0,0)/grub/splash.xpm.gz # if you are going to use serial console, comment it out to see text on serial console
serial --unit=1 --speed=115200
#terminal --timeout=5 serial console # if you don't have serial device connected, or you stand in the front of the server with VGA monitor connected, you should not uncomment this line, otherwise, you won't see on VGA monitor untiil it finish boot up.
console=ttyS1,115200 console=tty0 [rd_NO_PLYMOUTH]
As the system boots, it starts udev to handle hardware devices. The /lib/udev/rules.d/10-console.rules file tells udev to check a number of devices, including /dev/console, and run the /lib/udev/console_check helper program against each device:
If console_check determines that /dev/console is a serial console
If console_check determines that /dev/console is a serial console (by running some ioctl() system calls on it), then it runs this command:
/sbin/initctl emit --no-wait fedora.serial-console-available DEV=ttyS0 SPEED=115200
This command sends a fedora.serial-console-available event to the init daemon. The init daemon is configured for this event by /etc/init/serial.conf:
Note: the last console definition is the primary console.
Q: when kernel boots up, once control is transferred to init, the messages from init
only appear on the VGA console, not on the serial console.
A: The kernel prints diagnostic output to all console devices you have
configured on the kernel command line, but /dev/console, which is what
userland (such as init) uses, can only be connected to *one* device (the
last one specified).
Refer to: http://fixunix.com/unix/238795-seeing-kernel-messages-multiple-vga-serial-consoles.html
6. use http://serverip:1311 after installing Dell Openmanager to change bios settings
login as root
go to system-bios-setup tab, change it as follows:
Serial Communications
Instructions: Click each BIOS setup object to set its state.
Serial Communications On with Console Redirection via COM2
Console Redirection After Boot Enabled
External Serial Connector Serial Device2
Console Redirection Failsafe BAUD Rate 115200
Serial Address Select Serial Device1=COM1, Serial Device2=COM2
or modify bios settings through Linux OS itself (Dell OpenManage must be installed first)
# racadm config -g cfgSerial -o cfgSerialBaudRate 115200
# racadm config -g cfgSerial -o cfgSerialCom2RedirEnable 1
# racadm config -g cfgSerial -o cfgSerialSshEnable 1
optional for ipmi
# racadm config -g cfgIpmiSol -o cfgIpmiSolEnable 1
# racadm config -g cfgIpmiSol -o cfgIpmiSolBaudRate 115200
7. Useful dell iDRAC 6 commands:
a. restart server through ssh into drac and issue command racadm
/admin1-> racadm help serveraction
serveraction -- perform system power management operations
Usage:
racadm serveraction <action>
action server power management operation to peform
Valid actions:
powerdown - power server off
powerup - power server on
powercycle - perform server power cycle
hardreset - force hard server power reset
powerstatus - display current power status of server
/admin1-> racadm serveraction powerstatus
Server power status: ON
/admin1 -> racadm serveraction hardreset
b. check configuration:
[root@util01 boot]# racadm getconfig -g cfgServerPowerSupply -i 1
# cfgServerPowerSupplyIndex=1
# cfgServerPowerSupplyMaxInputPower=945 W
# cfgServerPowerSupplyMaxOutputPower=717 W
# cfgServerPowerSupplyOnlineStatus=Present
# cfgServerPowerSupplyFwVer=04.18.00
# cfgServerPowerSupplyCurrentDraw=5.00 Amps
# cfgServerPowerSupplyType=AC
[root@util01 boot]# racadm getconfig -g cfgSerial
cfgSerialBaudRate=115200
cfgSerialConsoleEnable=1
cfgSerialConsoleQuitKey=^\
cfgSerialConsoleIdleTimeout=300
cfgSerialConsoleNoAuth=0
cfgSerialConsoleCommand=
cfgSerialHistorySize=2000
cfgSerialCom2RedirEnable=1
cfgSerialTelnetEnable=0
cfgSerialSshEnable=1
c. system event log
# racadm racresetcfg # reset to factory default
[root@util01 boot]# racadm getsel
Record: 1
Date/Time: 08/20/2012 23:44:22
Source: system
Severity: Ok
Description: Log cleared.
-------------------------------------------------------------------------------
Record: 2
Date/Time: 08/22/2012 13:33:40
Source: system
Severity: Critical
Description: The power input for power supply 1 is lost.
-------------------------------------------------------------------------------
d. configure drac user and ip address
$ racadm getconfig -g cfgUserAdmin -i 2 # display root user info for drac
$ racadm config -g cfgUserAdmin -o cfgUserAdminUserName -i 2 jwu # create user id 2 or change username to jwu
$ racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 newpassword # set user id 2 new password
$ racadm config -g cfgUserAdmin -o cfgUserAdminUserName -i 2 "" # remove user id 2
$ racadm setniccfg -s 192.168.0.1 255.255.255.0 192.168.0.254 # configure drac new ip address
Static IP configuration enabled and modified successfully
[root@util01 boot]# racadm racreset # restart drac os
RAC reset operation initiated successfully. It may take up to a minute
for the RAC to come back online again.
[root@util01 boot]# racadm getsysinfo | grep 'Current' # get drac ip address info
Current DNS Domain =
Current IP Address = 192.168.0.1
Current IP Gateway = 192.168.0.254
Current IP Netmask = 255.255.255.0
$ ipmitool sdr # check hardware info realtime
$ ipmitool sel # sel means System Event Log
$ ipmitool sel list
8. How to access VM guest console from Oracle VM server 3.1.1 hypervisor
# /etc/grub.conf
timeout=5
serial --unit=0 --speed=115200
terminal --timeout=5 serial console
xm console 2
9. references:
http://www.wikihow.com/Configure-Dell-Drac-Console-Redirection-for-SSH-Connections
http://www.symantec.com/business/support/index?page=content&id=HOWTO54470
http://support.citrix.com/article/CTX131909
http://blog.coolzero.info/blogs/index.php/drac-5-rhel-5-2-centos-xen-based-and-ser?blog=5
No comments:
Post a Comment