Some checks failed
Test / test (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
109 lines
3.4 KiB
Bash
Executable File
109 lines
3.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Quick Run Script - Copy and paste commands to run on servers
|
|
|
|
cat << 'EOF'
|
|
|
|
╔══════════════════════════════════════════════════════════════╗
|
|
║ Run These Commands on Your Proxmox Servers ║
|
|
╚══════════════════════════════════════════════════════════════╝
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
📍 ON pve2 (R630) - 192.168.1.55:
|
|
|
|
# Step 1: Configure Network
|
|
cp /etc/network/interfaces /etc/network/interfaces.backup
|
|
cat > /etc/network/interfaces << 'INTERFACESEOF'
|
|
# Proxmox VE Network Configuration
|
|
# pve2 (R630) - 192.168.1.55
|
|
# nic3: LAN (192.168.1.0/24)
|
|
# nic2: WAN (Public IP from Spectrum modem)
|
|
|
|
auto lo
|
|
iface lo inet loopback
|
|
|
|
auto nic3
|
|
iface nic3 inet manual
|
|
|
|
auto vmbr0
|
|
iface vmbr0 inet dhcp
|
|
bridge-ports nic3
|
|
bridge-stp off
|
|
bridge-fd 0
|
|
bridge-vlan-aware no
|
|
metric 200
|
|
|
|
auto nic2
|
|
iface nic2 inet manual
|
|
|
|
auto vmbr1
|
|
iface vmbr1 inet dhcp
|
|
bridge-ports nic2
|
|
bridge-stp off
|
|
bridge-fd 0
|
|
bridge-vlan-aware no
|
|
metric 100
|
|
INTERFACESEOF
|
|
|
|
# Step 2: Update /etc/hosts
|
|
echo "192.168.1.207 pve pve.local" >> /etc/hosts
|
|
|
|
# Step 3: Update corosync.conf (if cluster exists)
|
|
if [ -f /etc/pve/corosync.conf ]; then
|
|
cp /etc/pve/corosync.conf /etc/pve/corosync.conf.backup
|
|
sed -i 's/ring0_addr:.*pve$/ring0_addr: 192.168.1.207/' /etc/pve/corosync.conf
|
|
sed -i 's/ring0_addr:.*pve2$/ring0_addr: 192.168.1.55/' /etc/pve/corosync.conf
|
|
fi
|
|
|
|
# Step 4: Apply network
|
|
ifreload -a
|
|
|
|
# Step 5: Restart cluster (if exists)
|
|
if [ -f /etc/pve/corosync.conf ]; then
|
|
systemctl restart corosync
|
|
systemctl restart pve-cluster
|
|
fi
|
|
|
|
# Step 6: Verify
|
|
ip addr show | grep -E "vmbr|inet "
|
|
pvecm status
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
📍 ON pve (ML110) - 192.168.1.207:
|
|
|
|
# Step 1: Check your NIC names first
|
|
ip link show | grep -E '^[0-9]+: (nic|eth|enp)'
|
|
|
|
# Step 2: Configure Network (replace NIC1 and NIC2 with your actual NIC names)
|
|
cp /etc/network/interfaces /etc/network/interfaces.backup
|
|
# Edit manually or use the template below - replace NIC1/NIC2 with your NIC names
|
|
|
|
# Step 3: Update /etc/hosts
|
|
echo "192.168.1.55 pve2 pve2.local" >> /etc/hosts
|
|
|
|
# Step 4: Update corosync.conf (if cluster exists)
|
|
if [ -f /etc/pve/corosync.conf ]; then
|
|
cp /etc/pve/corosync.conf /etc/pve/corosync.conf.backup
|
|
sed -i 's/ring0_addr:.*pve$/ring0_addr: 192.168.1.207/' /etc/pve/corosync.conf
|
|
sed -i 's/ring0_addr:.*pve2$/ring0_addr: 192.168.1.55/' /etc/pve/corosync.conf
|
|
fi
|
|
|
|
# Step 5: Apply network
|
|
ifreload -a
|
|
|
|
# Step 6: Restart cluster (if exists)
|
|
if [ -f /etc/pve/corosync.conf ]; then
|
|
systemctl restart corosync
|
|
systemctl restart pve-cluster
|
|
fi
|
|
|
|
# Step 7: Verify
|
|
ip addr show | grep -E "vmbr|inet "
|
|
pvecm status
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
EOF
|
|
|