Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.3 KiB
Bash
Executable File
48 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Proxmox Utility Functions
|
|
# Consolidated functions from small Proxmox-related scripts
|
|
# Usage: source "$(dirname "${BASH_SOURCE[0]}")/../utils/proxmox-utils.sh"
|
|
|
|
set -euo pipefail
|
|
|
|
# Load shared modules
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
source "$SCRIPT_DIR/../lib/ip-config.sh" 2>/dev/null || true
|
|
source "$SCRIPT_DIR/../lib/logging.sh" 2>/dev/null || true
|
|
source "$SCRIPT_DIR/../lib/proxmox-api.sh" 2>/dev/null || true
|
|
|
|
# List all VMs
|
|
proxmox_list_vms() {
|
|
local host="${1:-${PROXMOX_HOST_ML110:-192.168.11.10}}"
|
|
ssh_proxmox "$host" "qm list" || true
|
|
}
|
|
|
|
# List all containers
|
|
proxmox_list_containers() {
|
|
local host="${1:-${PROXMOX_HOST_ML110:-192.168.11.10}}"
|
|
ssh_proxmox "$host" "pct list" || true
|
|
}
|
|
|
|
# Get VM status
|
|
proxmox_vm_status() {
|
|
local vmid="$1"
|
|
local host="${2:-${PROXMOX_HOST_ML110:-192.168.11.10}}"
|
|
ssh_proxmox "$host" "qm status $vmid" || true
|
|
}
|
|
|
|
# Get container status
|
|
proxmox_container_status() {
|
|
local vmid="$1"
|
|
local host="${2:-${PROXMOX_HOST_ML110:-192.168.11.10}}"
|
|
check_container_status "$vmid" "$host"
|
|
}
|
|
|
|
# Proxmox API call wrapper
|
|
proxmox_api() {
|
|
local method="$1"
|
|
local endpoint="$2"
|
|
local host="${3:-${PROXMOX_HOST_ML110:-192.168.11.10}}"
|
|
proxmox_api_call "$method" "$endpoint" "$host"
|
|
}
|