# Migration Quick Reference

## Quick Fix for Migration Failures

### Step 1: Run Diagnostic and Fix (Recommended)

```bash
cd /home/intlc/projects/proxmox
./scripts/diagnose-and-fix-migration-storage.sh
```

This single command will:
- ✅ Check all nodes (ml110, pve, pve2)
- ✅ Find container locations
- ✅ Fix storage issues
- ✅ Migrate containers 1504, 2503, 2504, 6201 to pve

### Step 2: If Step 1 Fails, Fix Storage First

```bash
./scripts/fix-migration-storage.sh
```

Then retry Step 1.

## Manual Migration (If Scripts Fail)

```bash
# Connect to source node
ssh root@192.168.11.10
# Password: L@kers2010

# Stop and migrate each container
for vmid in 1504 2503 2504 6201; do
    pct stop $vmid
    pct migrate $vmid pve --restart
done
```

## Verify Migration

```bash
# Check container locations
ssh root@192.168.11.10 "for vmid in 1504 2503 2504 6201; do echo -n \"\$vmid: \"; pvesh get /nodes/pve/lxc/\$vmid/status/current 2>/dev/null | jq -r '.status' && echo \" (pve)\" || echo \"not on pve\"; done"
```

## Container Details

| VMID | Hostname | Target Node |
|------|-----------|-------------|
| 1504 | besu-sentry-ali | pve |
| 2503 | besu-rpc-ali-0x8a | pve |
| 2504 | besu-rpc-ali-0x1 | pve |
| 6201 | firefly-ali-1 | pve |

## Common Issues

### "migration aborted"
- **Cause**: Storage incompatibility
- **Fix**: Run `./scripts/fix-migration-storage.sh` first

### "storage not found"
- **Cause**: Target storage not configured
- **Fix**: Ensure `thin1` storage exists on target node

### "volume group not found"
- **Cause**: VG mismatch between source and target
- **Fix**: Use `local` storage instead: `pct migrate <VMID> pve --storage local`

## Full Documentation

See `docs/MIGRATION_STORAGE_FIX.md` for complete details.

