Initial commit: loc_az_hci (smom-dbis-138 excluded via .gitignore)
Some checks failed
Test / test (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-02-08 09:04:46 -08:00
commit c39465c2bd
386 changed files with 50649 additions and 0 deletions

View File

@@ -0,0 +1,118 @@
# Install Intel NIC Drivers
# Supports: i350-T4, i350-T8, X550-T2, i225 Quad-Port
param(
[string]$DriverPath = "",
[switch]$Force = $false
)
$ErrorActionPreference = "Stop"
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Intel NIC Driver Installation" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
# Check if running as Administrator
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "This script requires Administrator privileges." -ForegroundColor Red
exit 1
}
# Detect Intel NICs
Write-Host "`nDetecting Intel network adapters..." -ForegroundColor Yellow
$intelNics = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like "*Intel*" }
if ($intelNics.Count -eq 0) {
Write-Host "No Intel network adapters detected." -ForegroundColor Red
exit 1
}
Write-Host "Found $($intelNics.Count) Intel network adapter(s):" -ForegroundColor Green
foreach ($nic in $intelNics) {
Write-Host " - $($nic.Name): $($nic.InterfaceDescription)" -ForegroundColor White
}
# Download Intel PROSet if not provided
if ([string]::IsNullOrEmpty($DriverPath)) {
Write-Host "`nDownloading Intel PROSet drivers..." -ForegroundColor Yellow
$downloadUrl = "https://downloadcenter.intel.com/download/25016/Intel-Network-Adapter-Driver-for-Windows-10"
$tempPath = "$env:TEMP\IntelPROSet.exe"
try {
Write-Host "Please download Intel PROSet from: $downloadUrl" -ForegroundColor Yellow
Write-Host "Save to: $tempPath" -ForegroundColor Yellow
Read-Host "Press Enter after downloading"
if (-not (Test-Path $tempPath)) {
Write-Host "Driver file not found at $tempPath" -ForegroundColor Red
exit 1
}
$DriverPath = $tempPath
}
catch {
Write-Host "Error downloading drivers: $_" -ForegroundColor Red
exit 1
}
}
# Install Intel PROSet
if (Test-Path $DriverPath) {
Write-Host "`nInstalling Intel PROSet drivers..." -ForegroundColor Yellow
$installArgs = "/S /v/qn"
if ($Force) {
$installArgs += " FORCE=1"
}
try {
$process = Start-Process -FilePath $DriverPath -ArgumentList $installArgs -Wait -PassThru -NoNewWindow
if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) {
Write-Host "Intel PROSet installed successfully." -ForegroundColor Green
}
else {
Write-Host "Installation completed with exit code: $($process.ExitCode)" -ForegroundColor Yellow
}
}
catch {
Write-Host "Error installing drivers: $_" -ForegroundColor Red
exit 1
}
}
else {
Write-Host "Driver file not found: $DriverPath" -ForegroundColor Red
exit 1
}
# Verify installation
Write-Host "`nVerifying driver installation..." -ForegroundColor Yellow
Start-Sleep -Seconds 5
$updatedNics = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like "*Intel*" }
foreach ($nic in $updatedNics) {
$driverInfo = Get-NetAdapterDriver -Name $nic.Name
Write-Host " $($nic.Name): Driver Version $($driverInfo.DriverVersion)" -ForegroundColor Green
}
# Enable all Intel NICs
Write-Host "`nEnabling Intel network adapters..." -ForegroundColor Yellow
foreach ($nic in $updatedNics) {
if ($nic.Status -ne "Up") {
Enable-NetAdapter -Name $nic.Name -Confirm:$false
Write-Host " Enabled: $($nic.Name)" -ForegroundColor Green
}
else {
Write-Host " Already enabled: $($nic.Name)" -ForegroundColor Green
}
}
Write-Host "`n=========================================" -ForegroundColor Cyan
Write-Host "Intel NIC Driver Installation Complete" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
# Display final status
Write-Host "`nFinal Status:" -ForegroundColor Yellow
Get-NetAdapter | Where-Object { $_.InterfaceDescription -like "*Intel*" } | Format-Table Name, InterfaceDescription, Status, LinkSpeed -AutoSize

View File

@@ -0,0 +1,140 @@
# Install LSI HBA Drivers and Flash to IT Mode
# Supports: LSI 9207-8e (SAS2308)
param(
[string]$DriverPath = "",
[string]$FirmwarePath = "",
[switch]$FlashITMode = $true,
[switch]$Force = $false
)
$ErrorActionPreference = "Stop"
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "LSI HBA Driver Installation" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
# Check if running as Administrator
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "This script requires Administrator privileges." -ForegroundColor Red
exit 1
}
# Detect LSI HBAs
Write-Host "`nDetecting LSI storage controllers..." -ForegroundColor Yellow
$lsiControllers = Get-PnpDevice | Where-Object {
$_.FriendlyName -like "*LSI*" -or
$_.FriendlyName -like "*SAS2308*" -or
$_.FriendlyName -like "*9207*"
}
if ($lsiControllers.Count -eq 0) {
Write-Host "No LSI storage controllers detected." -ForegroundColor Yellow
Write-Host "This may be normal if controllers are not yet installed or drivers not loaded." -ForegroundColor Yellow
}
else {
Write-Host "Found $($lsiControllers.Count) LSI controller(s):" -ForegroundColor Green
foreach ($controller in $lsiControllers) {
Write-Host " - $($controller.FriendlyName): Status $($controller.Status)" -ForegroundColor White
}
}
# Download LSI driver if not provided
if ([string]::IsNullOrEmpty($DriverPath)) {
Write-Host "`nLSI mpt3sas driver information:" -ForegroundColor Yellow
Write-Host "For Windows: Download from Broadcom support site" -ForegroundColor Yellow
Write-Host "URL: https://www.broadcom.com/support" -ForegroundColor Yellow
Write-Host "`nFor Linux/Proxmox: mpt3sas driver is built into kernel 5.15+" -ForegroundColor Yellow
$tempPath = "$env:TEMP\LSI_Driver.exe"
Write-Host "Please download LSI driver and save to: $tempPath" -ForegroundColor Yellow
Read-Host "Press Enter after downloading (or Ctrl+C to skip Windows driver install)"
if (Test-Path $tempPath) {
$DriverPath = $tempPath
}
}
# Install Windows driver if provided
if (-not [string]::IsNullOrEmpty($DriverPath) -and (Test-Path $DriverPath)) {
Write-Host "`nInstalling LSI driver..." -ForegroundColor Yellow
try {
$process = Start-Process -FilePath $DriverPath -ArgumentList "/S /v/qn" -Wait -PassThru -NoNewWindow
if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) {
Write-Host "LSI driver installed successfully." -ForegroundColor Green
}
else {
Write-Host "Installation completed with exit code: $($process.ExitCode)" -ForegroundColor Yellow
}
}
catch {
Write-Host "Error installing driver: $_" -ForegroundColor Red
}
}
# Flash to IT Mode (Linux/Proxmox)
if ($FlashITMode) {
Write-Host "`n=========================================" -ForegroundColor Cyan
Write-Host "LSI HBA IT Mode Firmware Flash" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nWARNING: Flashing firmware will erase current firmware!" -ForegroundColor Red
Write-Host "Ensure you have the correct IT mode firmware for your controller." -ForegroundColor Yellow
Write-Host "`nFor LSI 9207-8e (SAS2308), use firmware version P20 IT mode." -ForegroundColor Yellow
if (-not $Force) {
$confirm = Read-Host "`nDo you want to proceed with IT mode flash? (yes/no)"
if ($confirm -ne "yes") {
Write-Host "IT mode flash cancelled." -ForegroundColor Yellow
exit 0
}
}
Write-Host "`nIT mode firmware flash instructions:" -ForegroundColor Yellow
Write-Host "1. Boot into Linux/Proxmox or use Linux live USB" -ForegroundColor White
Write-Host "2. Download sas2flash or sas3flash utility" -ForegroundColor White
Write-Host "3. Download IT mode firmware (P20 for SAS2308)" -ForegroundColor White
Write-Host "4. Run: ./sas2flash -listall (to identify controller)" -ForegroundColor White
Write-Host "5. Run: ./sas2flash -o -f <firmware_file> -b <bios_file>" -ForegroundColor White
Write-Host "`nExample commands:" -ForegroundColor Cyan
Write-Host " ./sas2flash -listall" -ForegroundColor White
Write-Host " ./sas2flash -o -f 2308p20.fw -b mptsas2.rom" -ForegroundColor White
Write-Host "`nFor automated flash script, see: infrastructure/storage/flash-lsi-it-mode.ps1" -ForegroundColor Yellow
}
# Verify installation
Write-Host "`nVerifying LSI controller status..." -ForegroundColor Yellow
Start-Sleep -Seconds 5
$updatedControllers = Get-PnpDevice | Where-Object {
$_.FriendlyName -like "*LSI*" -or
$_.FriendlyName -like "*SAS2308*" -or
$_.FriendlyName -like "*9207*"
}
if ($updatedControllers.Count -gt 0) {
Write-Host "Detected controllers:" -ForegroundColor Green
foreach ($controller in $updatedControllers) {
Write-Host " $($controller.FriendlyName): $($controller.Status)" -ForegroundColor White
}
}
else {
Write-Host "No LSI controllers detected. This may be normal if:" -ForegroundColor Yellow
Write-Host " - Controllers are not installed" -ForegroundColor White
Write-Host " - Running on Linux (use 'lspci | grep -i storage' to check)" -ForegroundColor White
Write-Host " - Drivers need to be installed" -ForegroundColor White
}
Write-Host "`n=========================================" -ForegroundColor Cyan
Write-Host "LSI HBA Driver Installation Complete" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nNext Steps:" -ForegroundColor Yellow
Write-Host "1. Verify storage shelves are detected" -ForegroundColor White
Write-Host "2. Check HBA status in OS" -ForegroundColor White
Write-Host "3. Verify IT mode firmware (if flashed)" -ForegroundColor White
Write-Host "4. Run storage health monitoring script" -ForegroundColor White

View File

@@ -0,0 +1,137 @@
# Install Intel QAT 8970 Drivers and OpenSSL Engine
# Supports: Intel QAT 8970 PCIe card
param(
[string]$QatLibPath = "",
[string]$OpenSSLEnginePath = "",
[switch]$InstallOpenSSLEngine = $true,
[switch]$Force = $false
)
$ErrorActionPreference = "Stop"
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Intel QAT Driver Installation" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
# Check if running as Administrator
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "This script requires Administrator privileges." -ForegroundColor Red
exit 1
}
# Detect Intel QAT card
Write-Host "`nDetecting Intel QAT card..." -ForegroundColor Yellow
$qatDevices = Get-PnpDevice | Where-Object {
$_.FriendlyName -like "*QAT*" -or
$_.FriendlyName -like "*QuickAssist*" -or
$_.FriendlyName -like "*8970*"
}
if ($qatDevices.Count -eq 0) {
Write-Host "No Intel QAT devices detected." -ForegroundColor Yellow
Write-Host "This may be normal if:" -ForegroundColor Yellow
Write-Host " - QAT card is not installed" -ForegroundColor White
Write-Host " - Running on Linux (use 'lspci | grep -i qat' to check)" -ForegroundColor White
Write-Host " - Drivers need to be installed" -ForegroundColor White
}
else {
Write-Host "Found $($qatDevices.Count) QAT device(s):" -ForegroundColor Green
foreach ($device in $qatDevices) {
Write-Host " - $($device.FriendlyName): Status $($device.Status)" -ForegroundColor White
}
}
# Download qatlib if not provided
if ([string]::IsNullOrEmpty($QatLibPath)) {
Write-Host "`nIntel QAT driver information:" -ForegroundColor Yellow
Write-Host "Download qatlib from Intel Download Center" -ForegroundColor Yellow
Write-Host "URL: https://www.intel.com/content/www/us/en/download-center/home.html" -ForegroundColor Yellow
Write-Host "Search for: 'Intel QuickAssist Technology Software for Linux'" -ForegroundColor Yellow
$tempPath = "$env:TEMP\qatlib.exe"
Write-Host "`nPlease download QAT driver and save to: $tempPath" -ForegroundColor Yellow
Write-Host "Or press Ctrl+C to skip Windows driver install (Linux installation will be documented)" -ForegroundColor Yellow
Read-Host "Press Enter after downloading"
if (Test-Path $tempPath) {
$QatLibPath = $tempPath
}
}
# Install Windows qatlib if provided
if (-not [string]::IsNullOrEmpty($QatLibPath) -and (Test-Path $QatLibPath)) {
Write-Host "`nInstalling Intel QAT driver (qatlib)..." -ForegroundColor Yellow
try {
$process = Start-Process -FilePath $QatLibPath -ArgumentList "/S /v/qn" -Wait -PassThru -NoNewWindow
if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) {
Write-Host "Intel QAT driver installed successfully." -ForegroundColor Green
}
else {
Write-Host "Installation completed with exit code: $($process.ExitCode)" -ForegroundColor Yellow
}
}
catch {
Write-Host "Error installing QAT driver: $_" -ForegroundColor Red
}
}
# Install OpenSSL QAT Engine
if ($InstallOpenSSLEngine) {
Write-Host "`n=========================================" -ForegroundColor Cyan
Write-Host "OpenSSL QAT Engine Installation" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nOpenSSL QAT Engine installation:" -ForegroundColor Yellow
Write-Host "The OpenSSL QAT engine is typically bundled with qatlib." -ForegroundColor White
Write-Host "`nFor Linux installation:" -ForegroundColor Cyan
Write-Host "1. Build qatlib from source (includes OpenSSL engine)" -ForegroundColor White
Write-Host "2. Configure OpenSSL to use QAT engine" -ForegroundColor White
Write-Host "3. Test QAT acceleration" -ForegroundColor White
Write-Host "`nExample Linux installation:" -ForegroundColor Yellow
Write-Host " # Download and extract qatlib" -ForegroundColor White
Write-Host " tar -xzf qat*.tar.gz" -ForegroundColor White
Write-Host " cd qat*" -ForegroundColor White
Write-Host " ./configure" -ForegroundColor White
Write-Host " make && make install" -ForegroundColor White
Write-Host "`nFor detailed OpenSSL QAT configuration, see:" -ForegroundColor Yellow
Write-Host " infrastructure/crypto/configure-openssl-qat.ps1" -ForegroundColor White
}
# Verify installation
Write-Host "`nVerifying QAT installation..." -ForegroundColor Yellow
Start-Sleep -Seconds 5
# Check QAT service status (Linux)
Write-Host "`nTo verify QAT on Linux:" -ForegroundColor Yellow
Write-Host " qat_service status" -ForegroundColor White
Write-Host " lsmod | grep qat" -ForegroundColor White
Write-Host " openssl speed -engine qat -elapsed -async_jobs 36 rsa2048" -ForegroundColor White
# Check Windows QAT status
$updatedQatDevices = Get-PnpDevice | Where-Object {
$_.FriendlyName -like "*QAT*" -or
$_.FriendlyName -like "*QuickAssist*"
}
if ($updatedQatDevices.Count -gt 0) {
Write-Host "`nDetected QAT devices:" -ForegroundColor Green
foreach ($device in $updatedQatDevices) {
Write-Host " $($device.FriendlyName): $($device.Status)" -ForegroundColor White
}
}
Write-Host "`n=========================================" -ForegroundColor Cyan
Write-Host "Intel QAT Driver Installation Complete" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "`nNext Steps:" -ForegroundColor Yellow
Write-Host "1. Configure OpenSSL QAT engine (see configure-openssl-qat.ps1)" -ForegroundColor White
Write-Host "2. Configure IPsec/IKEv2 QAT integration (see setup-ipsec-qat.ps1)" -ForegroundColor White
Write-Host "3. Test QAT acceleration (see test-qat-acceleration.ps1)" -ForegroundColor White
Write-Host "4. Verify QAT performance improvements" -ForegroundColor White

View File

@@ -0,0 +1,146 @@
# Verify Driver Installation and Health
# Checks all drivers: Intel NICs, LSI HBAs, Intel QAT
param(
[switch]$Detailed = $false
)
$ErrorActionPreference = "Continue"
Write-Host "=========================================" -ForegroundColor Cyan
Write-Host "Driver Verification and Health Check" -ForegroundColor Cyan
Write-Host "=========================================" -ForegroundColor Cyan
# Check if running as Administrator
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host "Warning: Not running as Administrator. Some checks may be limited." -ForegroundColor Yellow
}
$allHealthy = $true
# Check Intel NICs
Write-Host "`n[1/3] Checking Intel Network Adapters..." -ForegroundColor Yellow
$intelNics = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like "*Intel*" }
if ($intelNics.Count -eq 0) {
Write-Host " No Intel network adapters found." -ForegroundColor Red
$allHealthy = $false
}
else {
Write-Host " Found $($intelNics.Count) Intel adapter(s):" -ForegroundColor Green
foreach ($nic in $intelNics) {
$driverInfo = Get-NetAdapterDriver -Name $nic.Name -ErrorAction SilentlyContinue
$status = $nic.Status
$linkSpeed = $nic.LinkSpeed
$statusColor = if ($status -eq "Up") { "Green" } else { "Red" }
Write-Host " $($nic.Name):" -ForegroundColor White
Write-Host " Status: $status" -ForegroundColor $statusColor
Write-Host " Link Speed: $linkSpeed" -ForegroundColor White
Write-Host " Driver: $($driverInfo.DriverVersion)" -ForegroundColor White
if ($status -ne "Up") {
$allHealthy = $false
}
if ($Detailed) {
$nicDetails = Get-NetAdapterStatistics -Name $nic.Name -ErrorAction SilentlyContinue
if ($nicDetails) {
Write-Host " Bytes Sent: $($nicDetails.SentBytes)" -ForegroundColor Gray
Write-Host " Bytes Received: $($nicDetails.ReceivedBytes)" -ForegroundColor Gray
}
}
}
}
# Check LSI HBAs
Write-Host "`n[2/3] Checking LSI Storage Controllers..." -ForegroundColor Yellow
$lsiControllers = Get-PnpDevice | Where-Object {
$_.FriendlyName -like "*LSI*" -or
$_.FriendlyName -like "*SAS2308*" -or
$_.FriendlyName -like "*9207*"
}
if ($lsiControllers.Count -eq 0) {
Write-Host " No LSI storage controllers found." -ForegroundColor Yellow
Write-Host " Note: This may be normal if running on Linux or controllers not installed." -ForegroundColor Gray
}
else {
Write-Host " Found $($lsiControllers.Count) LSI controller(s):" -ForegroundColor Green
foreach ($controller in $lsiControllers) {
$status = $controller.Status
$statusColor = if ($status -eq "OK") { "Green" } else { "Red" }
Write-Host " $($controller.FriendlyName):" -ForegroundColor White
Write-Host " Status: $status" -ForegroundColor $statusColor
if ($status -ne "OK") {
$allHealthy = $false
}
}
}
# Check Intel QAT
Write-Host "`n[3/3] Checking Intel QAT Card..." -ForegroundColor Yellow
$qatDevices = Get-PnpDevice | Where-Object {
$_.FriendlyName -like "*QAT*" -or
$_.FriendlyName -like "*QuickAssist*" -or
$_.FriendlyName -like "*8970*"
}
if ($qatDevices.Count -eq 0) {
Write-Host " No Intel QAT devices found." -ForegroundColor Yellow
Write-Host " Note: This may be normal if running on Linux or QAT card not installed." -ForegroundColor Gray
}
else {
Write-Host " Found $($qatDevices.Count) QAT device(s):" -ForegroundColor Green
foreach ($device in $qatDevices) {
$status = $device.Status
$statusColor = if ($status -eq "OK") { "Green" } else { "Red" }
Write-Host " $($device.FriendlyName):" -ForegroundColor White
Write-Host " Status: $status" -ForegroundColor $statusColor
if ($status -ne "OK") {
$allHealthy = $false
}
}
}
# Linux-specific checks (if running on Linux via WSL or remote)
Write-Host "`nLinux System Checks (if applicable):" -ForegroundColor Yellow
Write-Host " Run these commands on Linux systems:" -ForegroundColor White
Write-Host " lspci | grep -i network # Check NICs" -ForegroundColor Gray
Write-Host " lspci | grep -i storage # Check HBAs" -ForegroundColor Gray
Write-Host " lspci | grep -i qat # Check QAT" -ForegroundColor Gray
Write-Host " lsmod | grep igb # Check Intel NIC driver" -ForegroundColor Gray
Write-Host " lsmod | grep mpt3sas # Check LSI HBA driver" -ForegroundColor Gray
Write-Host " lsmod | grep qat # Check QAT driver" -ForegroundColor Gray
Write-Host " qat_service status # Check QAT service" -ForegroundColor Gray
# Summary
Write-Host "`n=========================================" -ForegroundColor Cyan
if ($allHealthy) {
Write-Host "Driver Health Check: PASSED" -ForegroundColor Green
}
else {
Write-Host "Driver Health Check: FAILED" -ForegroundColor Red
Write-Host "Some drivers or devices are not functioning properly." -ForegroundColor Yellow
}
Write-Host "=========================================" -ForegroundColor Cyan
# Recommendations
Write-Host "`nRecommendations:" -ForegroundColor Yellow
Write-Host "1. Ensure all hardware is properly installed" -ForegroundColor White
Write-Host "2. Verify drivers are up to date" -ForegroundColor White
Write-Host "3. Check device manager for any errors" -ForegroundColor White
Write-Host "4. Review system logs for driver-related errors" -ForegroundColor White
Write-Host "5. Test network connectivity for NICs" -ForegroundColor White
Write-Host "6. Verify storage shelves are detected for HBAs" -ForegroundColor White
Write-Host "7. Test QAT acceleration if QAT is installed" -ForegroundColor White
exit $(if ($allHealthy) { 0 } else { 1 })