Last active
September 27, 2021 20:12
-
-
Save rcarrata/5451c2c0bd9e335cc0bb80256a992654 to your computer and use it in GitHub Desktop.
Mount iDrac Virtual Media Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /etc/yum.repos.d/racadm.repo <<EOF | |
[racadm] | |
name=Racadm | |
baseurl=http://linux.dell.com/repo/hardware/dsu/os_dependent/RHEL8_64 | |
enabled=1 | |
gpgcheck=0 | |
EOF | |
yum clean all | |
yum repolist | |
yum install -y srvadmin-idracadm7 | |
export USER="xxx" | |
export PASSWORD=“yyy” | |
export SERVER="xx.xx.xx.xx" | |
export ISO_URL="http://xx.xx.xx.xx/CentOS-8-x86_64-1905-dvd1.iso" | |
/opt/dell/srvadmin/bin/idracadm7 -r $SERVER -u $USER -p $PASSWORD remoteimage -d | |
/opt/dell/srvadmin/bin/idracadm7 -r $SERVER -u $USER -p $PASSWORD remoteimage -c -l $ISO_URL | |
/opt/dell/srvadmin/bin/idracadm7 -r $SERVER -u $USER -p $PASSWORD set iDRAC.VirtualMedia.BootOnce 1 | |
/opt/dell/srvadmin/bin/idracadm7 -r $SERVER -u $USER -p $PASSWORD set iDRAC.ServerBoot.FirstBootDevice VCD-DVD | |
/opt/dell/srvadmin/bin/idracadm7 -r $SERVER -u $USER -p $PASSWORD serveraction powercycle | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment