#参考文档
#?guid=guid-6b6564ab-ee63-49ef-a7d6-47154c343841&lang=en-us
racadm语法
racadm -r <racIpAddr> -u <username> -p <password> <subcommand> racadm -r <racIpAddr> -u <username> -p <password> get <devicename>.<groupname>.[<index>].[<objectname>] racadm -r <racIpAddr> -u <username> -p <password> set <devicename>.<groupname>.[<index>].<objectname> <value> * -r <racIpAddr>[ : <port number> ] :指定IDRAC IP,端口号默认是443 * -u <username> : IDRAC用户名 * -p <password> : IDRAC密码 * -S :安全认证无效时停止命令执行(所有正常执行命令基本都包含无效认证安全警告,非需求时不要配置此选项) * -i :交互式登陆,手动输入账号密码;和-u、-p选项不能同时使用。 * --nocertwarn :忽略认证相关警告信息racadm常用命令
# 获取系统信息 racadm -r 10.10.10.8 -u root -p xxxx getsysinfo # 获取IP信息 racadm -r 10.10.10.8 -u root -p xxxx getniccfg # 获取IP信息(包含DNS) racadm -r 10.10.10.8 -u root -p xxxx getconfig -g cfgLanNetworking racadm -r 10.10.10.8 -u root -p xxxx set idrac.ssh.port 22 racadm -r 10.10.10.8 -u root -p xxxx --nocertwarn get idrac.ssh.port 硬件资源: racadm get BIOS.memSettings.SysMemSize # 获取内存大小 racadm get BIOS.MemSettings.SysMemSpeed # 获取内存工作速率 racadm get BIOS.MemSettings.SysMemType # 获取内存类型 BIOS相关: racadm get BIOS.MiscSettings.ErrPrompt # 错误提示状态: racadm set BIOS.MiscSettings.ErrPrompt Disabled # 关闭错误提示 racadm get BIOS.BiosBootSettings.BootMode(默认BIOS,另有UEFI) # BIOS启动模式: racadm get BIOS.BiosBootSettings.BootSeq # 系统启动顺序: racadm set BIOS.BiosBootSettings.BootSeq NIC.Integrated.1-1-1,HardDisk.List.1-1,Optical.SATAEmbedded.E-1 # 更改系统启动顺序: jobqueue create BIOS.Setup.1-1 # 提交BIOS objects job: racadm get BIOS.SysInformation.SystemServiceTag # 获取sn: racadm get BIOS.SysInformation. SystemModelName # 获取型号: racadm get BIOS.SysInformation. SystemBiosVersion # 获取bios版本: 网卡相关: racadm getsysinfo -s ( racadm nicstatistics | racadm racdump ) # 获取网卡mac: racadm get nic.NICConfig.3.LegacyBootProto # 获取网卡3是否开启pxe: racadm set nic.NICConfig.3.LegacyBootProto PXE # 启用网卡pxe: racadm jobqueue create NIC.Integrated.1-3-1 # PXE配置应用生效: racadm jobqueue create NIC.Integrated.1-1 -r pwrcycle -s TIME_NOW -e 20120501100000 # 提交NIC objects job: 磁盘相关: racadm storage get pdisks # 获取物理磁盘: racadm storage get vdisks -o [ -p status,size,layout,state ] # 获取虚拟磁盘信息: raid相关: racadm storage get controllers # 获取raid控制器: racadm storage get controllers -o -p name,status # 获取raid控制器属性name、status: racadm storage resetconfig:RAID.Integrated.1-1 # 删除所有raid: racadm jobqueue create RAID.Integrated.1-1 -s TIME_NOW -r none ( forced | pwrcycle | graceful) [ -—realtime ] # 提交storage作业: racadm storage createvd:RAID.Integrated.1-1 -rl r5 -size 300g -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 # 创建raid5,分配300G做系统: racadm storage createvd:RAID.Integrated.1-1 -rl r5 -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 # 创建raid5: 用户相关: 注:数字2、15为用户ID。 racadm get idrac.users.2 # 查看用户信息: racadm set idrac.users.15.username chenss # 添加用户: racadm set idrac.users.15.password wuyancs # 设置密码: racadm set idrac.users.15.Privilege 0x1ff # 设置为idrac管理员: racadm set idrac.users.15.enable enabled # 启用用户: 日志相关: racadm get System.LCD.CurrentDisplay # 获取前置面板LCD显示信息: 系统相关: racadm serveraction powerup # 开机: racadm serveraction powerdown # 关机: racadm serveraction powercycle # 重启: racadm serveraction powerstatus # 状态: racadm get iDRAC.SNMP # 获取idrac snap info: