Files
Sankofa/scripts/verify-guest-agent-after-fix.sh
defiQUG 9daf1fd378 Apply Composer changes: comprehensive API updates, migrations, middleware, and infrastructure improvements
- Add comprehensive database migrations (001-024) for schema evolution
- Enhance API schema with expanded type definitions and resolvers
- Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth
- Implement new services: AI optimization, billing, blockchain, compliance, marketplace
- Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage)
- Update Crossplane provider with enhanced VM management capabilities
- Add comprehensive test suite for API endpoints and services
- Update frontend components with improved GraphQL subscriptions and real-time updates
- Enhance security configurations and headers (CSP, CORS, etc.)
- Update documentation and configuration files
- Add new CI/CD workflows and validation scripts
- Implement design system improvements and UI enhancements
2025-12-12 18:01:35 -08:00

72 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Verify guest agent configuration after fix
# Run on Proxmox node: root@ml110-01
VMID=100
echo "=========================================="
echo "Guest Agent Verification for VM $VMID"
echo "=========================================="
echo ""
# Method 1: Check via qm config
echo "Method 1: qm config"
echo "--------------------------------------"
AGENT_QM=$(qm config $VMID | grep '^agent:' || echo "")
if [ -z "$AGENT_QM" ]; then
echo "❌ NOT SET via qm config"
else
echo "✅ Found: $AGENT_QM"
fi
echo ""
# Method 2: Check config file directly
echo "Method 2: Config file"
echo "--------------------------------------"
CONFIG_FILE="/etc/pve/qemu-server/${VMID}.conf"
if [ -f "$CONFIG_FILE" ]; then
AGENT_FILE=$(grep '^agent:' "$CONFIG_FILE" || echo "")
if [ -z "$AGENT_FILE" ]; then
echo "❌ NOT SET in config file"
echo ""
echo "Config file location: $CONFIG_FILE"
echo "First 20 lines of config:"
head -20 "$CONFIG_FILE"
else
echo "✅ Found in file: $AGENT_FILE"
fi
else
echo "❌ Config file not found: $CONFIG_FILE"
fi
echo ""
# Summary
echo "=========================================="
echo "Summary"
echo "=========================================="
if [ -n "$AGENT_QM" ] || [ -n "$AGENT_FILE" ]; then
echo "✅ Guest agent IS configured"
if [ -n "$AGENT_QM" ]; then
echo " - Verified via qm config: $AGENT_QM"
fi
if [ -n "$AGENT_FILE" ]; then
echo " - Verified in config file: $AGENT_FILE"
fi
echo ""
echo "Next steps:"
echo " 1. If VM is running, restart it to apply:"
echo " qm shutdown $VMID && sleep 5 && qm start $VMID"
echo ""
echo " 2. Once VM boots, verify guest agent service inside VM:"
echo " qm guest exec $VMID -- systemctl status qemu-guest-agent"
else
echo "❌ Guest agent is NOT configured"
echo ""
echo "Try the fix again:"
echo " qm set $VMID --agent 1"
echo " echo 'agent: 1' >> $CONFIG_FILE"
echo " qm config $VMID | grep '^agent:'"
fi
echo ""