Files
proxmox/scripts/archive/small-scripts/migrate-to-pve2-thin1-simple.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- 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>
2026-02-12 15:46:57 -08:00

44 lines
1.4 KiB
Bash

#!/usr/bin/env bash
# Simple approach: Migrate 2 containers, then move storage to thin1
# This works around the pct migrate storage limitation
set -euo pipefail
# Load IP configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
PROXMOX_HOST="${PROXMOX_HOST:-192.168.11.10}"
PROXMOX_PASS="${PROXMOX_PASS:-L@kers2010}"
ssh_proxmox() {
sshpass -p "$PROXMOX_PASS" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 root@"$PROXMOX_HOST" "$@"
}
echo "========================================="
echo "Migrate 2 containers to pve2 thin1"
echo "========================================="
echo ""
echo "Note: pct migrate doesn't support --storage parameter"
echo "We'll need to:"
echo "1. Migrate containers to pve2 (they'll try to use local-lvm which fails)"
echo "2. OR: Change storage approach"
echo ""
echo "Actually, let me check if we can use the API with storage parameter..."
echo ""
# Try API approach with storage
echo "Testing API migration with storage parameter..."
VMID=1500
# Get current container info
echo "Container 1500 current config:"
ssh_proxmox "pvesh get /nodes/ml110/lxc/$VMID/config --output-format json" 2>&1 | python3 -c "import sys, json; d=json.load(sys.stdin); print(f\"rootfs: {d.get('rootfs', 'N/A')}\")" 2>&1
echo ""
echo "Let's try migrating container 1500 using a two-step process:"
echo ""