Loading repository data…
Loading repository data…
lucab85 / repository
A lightweight, single-file Python CLI tool for mounting ISO images over HTTP/HTTPS to Dell iDRAC via Redfish API, setting one-time boot to virtual CD, and rebooting the server. Perfect for automating remote OS installations, rescue boots, and bare-metal provisioning on Dell PowerEdge servers.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A lightweight, single-file Python CLI tool for mounting ISO images over HTTP/HTTPS to Dell iDRAC via Redfish API, setting one-time boot to virtual CD, and rebooting the server.
Perfect for automating remote OS installations, rescue boots, and bare-metal provisioning on Dell PowerEdge servers.
requests librarycurl -O https://raw.githubusercontent.com/yourusername/redfish-iso/main/idrac_iso_tool.py
chmod +x idrac_iso_tool.py
git clone https://github.com/yourusername/redfish-iso.git
cd redfish-iso
chmod +x idrac_iso_tool.py
pip install requests
Or with a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install requests
python idrac_iso_tool.py \
-H 10.0.0.25 \
-u root \
-p calvin \
-i http://repo.example.com/ubuntu-24.04.iso
python idrac_iso_tool.py \
--host idrac.example.com \
--user admin \
--iso https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso
python idrac_iso_tool.py -H 10.0.0.25 -u root -i http://repo.local/installer.iso
# Password prompt appears (hidden input)
python idrac_iso_tool.py \
-H 10.0.0.25 \
-u root \
-p calvin \
-i http://repo.local/new-installer.iso \
--eject-first
python idrac_iso_tool.py \
-H 10.0.0.25 \
-u root \
-p calvin \
-i http://repo.local/installer.iso \
--insecure
| Option | Description |
|---|---|
-H, --host | iDRAC hostname or IP address |
-u, --user | iDRAC username |
-i, --iso | HTTP(S) URL to ISO image |
| Option | Description | Default |
|---|---|---|
-p, --password | iDRAC password (prompts if omitted) | - |
--insecure | Disable SSL certificate verification | False |
--timeout | Request timeout in seconds | 30 |
--debug | Enable debug logging | False |
--eject-first | Force eject existing media before insert | False |
--no-wait | Don't wait for status confirmation | False |
--manager-id | Manager ID | iDRAC.Embedded.1 |
--system-id | System ID | System.Embedded.1 |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Authentication or connection error |
| 2 | API error (invalid response, conflict, etc.) |
| 3 | Invalid arguments |
| 4 | Timeout |
#!/bin/bash
# deploy-server.sh
IDRAC_HOST="10.0.0.25"
IDRAC_USER="root"
IDRAC_PASS="calvin"
ISO_URL="http://repo.local/ubuntu-autoinstall.iso"
python idrac_iso_tool.py \
-H "$IDRAC_HOST" \
-u "$IDRAC_USER" \
-p "$IDRAC_PASS" \
-i "$ISO_URL" \
--eject-first
if [ $? -eq 0 ]; then
echo "Server is rebooting and will install Ubuntu"
else
echo "Failed to mount ISO"
exit 1
fi
# .github/workflows/provision.yml
- name: Mount installation ISO
run: |
python idrac_iso_tool.py \
-H ${{ secrets.IDRAC_HOST }} \
-u ${{ secrets.IDRAC_USER }} \
-p ${{ secrets.IDRAC_PASSWORD }} \
-i https://repo.example.com/os-install.iso \
--insecure
# Boot into rescue mode
python idrac_iso_tool.py \
-H server1-idrac.local \
-u admin \
-i https://boot.netboot.xyz/ipxe/netboot.xyz.iso \
--debug
--eject-first)--no-wait)Smart Power Management: The tool automatically detects the server's power state. If the server is powered off, it executes a startup from CD. If the server is already running, it performs a reboot.
GET /redfish/v1
GET /redfish/v1/Systems/System.Embedded.1
GET /redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia
GET /redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD
POST /redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.InsertMedia
POST /redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.EjectMedia
PATCH /redfish/v1/Systems/System.Embedded.1
POST /redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset
# Verify credentials
curl -k -u root:calvin https://10.0.0.25/redfish/v1
# Try with correct credentials
python idrac_iso_tool.py -H 10.0.0.25 -u root -p correct_password -i http://...
# For production: Add CA certificate to system trust store
# For testing only: Use --insecure flag
python idrac_iso_tool.py -H 10.0.0.25 -u root -p calvin -i http://... --insecure
# Force eject before inserting new media
python idrac_iso_tool.py -H 10.0.0.25 -u root -p calvin -i http://... --eject-first
# Increase timeout for slow networks
python idrac_iso_tool.py -H 10.0.0.25 -u root -p calvin -i http://... --timeout 60
# Enable debug logging to see all API calls
python idrac_iso_tool.py -H 10.0.0.25 -u root -p calvin -i http://... --debug
--insecure should only be used for testing)export IDRAC_HOST="10.0.0.25"
export IDRAC_USER="root"
export IDRAC_PASS="calvin"
python idrac_iso_tool.py \
-H "$IDRAC_HOST" \
-u "$IDRAC_USER" \
-p "$IDRAC_PASS" \
-i http://repo.local/installer.iso
Contributions are welcome! Please feel free to submit a Pull Request.
git clone https://github.com/yourusername/redfish-iso.git
cd redfish-iso
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Syntax check
python3 -m py_compile idrac_iso_tool.py
# Type hints check (if mypy installed)
mypy idrac_iso_tool.py
# Test help output
python idrac_iso_tool.py --help
MIT License - See LICENSE file for details
Created for automating Dell PowerEdge bare-metal provisioning
⚠️ Important: This tool reboots the target server. Always verify the correct iDRAC host before running!