# Pre-Start Checklist - Hostnames and IP Addresses

**Date:** 2025-01-20  
**Purpose:** Complete audit and fixes before starting VMs on pve and pve2

---

## ✅ IP Address Audit - COMPLETE

**Status:** All IPs audited, no conflicts found

**Results:**
- All 34 VMs/containers are currently on **ml110** (192.168.11.10)
- **pve** (192.168.11.11) and **pve2** (192.168.11.12) have no VMs/containers yet
- **No IP conflicts detected** across all hosts
- **No invalid IPs** (network/broadcast addresses)

**Allocated IPs (34 total):**
- 192.168.11.57, .60-.64, .80, .100-.106, .112, .120, .130, .150-.156, .201-.204, .240-.242, .250-.254

---

## ⏳ Hostname Migration - PENDING

### Current State
- **pve** (192.168.11.11) - hostname: `pve`, should be: `r630-01`
- **pve2** (192.168.11.12) - hostname: `pve2`, should be: `r630-02`

### Migration Steps

**Script Available:** `scripts/migrate-hostnames-proxmox.sh`

**What it does:**
1. Updates `/etc/hostname` on both hosts
2. Updates `/etc/hosts` to ensure proper resolution
3. Restarts Proxmox services
4. Verifies hostname changes

**To execute:**
```bash
cd /home/intlc/projects/proxmox
./scripts/migrate-hostnames-proxmox.sh
```

**Manual steps (if script fails):**
```bash
# On pve (192.168.11.11)
ssh root@192.168.11.11
hostnamectl set-hostname r630-01
echo "r630-01" > /etc/hostname
# Update /etc/hosts to include: 192.168.11.11    r630-01 r630-01.sankofa.nexus pve pve.sankofa.nexus
systemctl restart pve-cluster pvestatd pvedaemon pveproxy

# On pve2 (192.168.11.12)
ssh root@192.168.11.12
hostnamectl set-hostname r630-02
echo "r630-02" > /etc/hostname
# Update /etc/hosts to include: 192.168.11.12    r630-02 r630-02.sankofa.nexus pve2 pve2.sankofa.nexus
systemctl restart pve-cluster pvestatd pvedaemon pveproxy
```

---

## Verification Steps

### 1. Verify Hostnames
```bash
ssh root@192.168.11.11 "hostname"  # Should return: r630-01
ssh root@192.168.11.12 "hostname"  # Should return: r630-02
```

### 2. Verify IP Resolution
```bash
ssh root@192.168.11.11 "getent hosts r630-01"  # Should return: 192.168.11.11
ssh root@192.168.11.12 "getent hosts r630-02"  # Should return: 192.168.11.12
```

### 3. Verify Proxmox Services
```bash
ssh root@192.168.11.11 "systemctl status pve-cluster pveproxy | grep Active"
ssh root@192.168.11.12 "systemctl status pve-cluster pveproxy | grep Active"
```

### 4. Re-run IP Audit
```bash
./scripts/check-all-vm-ips.sh
```

---

## Summary

### ✅ Completed
- [x] IP address audit across all hosts
- [x] Conflict detection (none found)
- [x] Invalid IP detection (none found)
- [x] Documentation of all IP assignments

### ⏳ Pending
- [ ] Hostname migration (pve → r630-01)
- [ ] Hostname migration (pve2 → r630-02)
- [ ] Verification of hostname changes
- [ ] Final IP audit after hostname changes

### 📋 Ready to Execute
1. Run hostname migration script
2. Verify changes
3. Start VMs on pve/pve2

---

## Scripts Available

1. **`scripts/check-all-vm-ips.sh`** - ✅ Working - Audits all IPs
2. **`scripts/migrate-hostnames-proxmox.sh`** - Ready - Migrates hostnames
3. **`scripts/diagnose-proxmox-hosts.sh`** - ✅ Working - Diagnostics

---

**Status:** IP audit complete, ready for hostname migration
