# Template Recreation - Manual Steps (Option 1) Since SSH is not currently available, here are the manual steps to recreate the template from the Ubuntu cloud image. ## Prerequisites - SSH access to Proxmox host (192.168.1.206) - Ubuntu cloud image already uploaded: `/var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img` ## Step-by-Step Instructions ### Step 1: SSH to Proxmox Host ```bash ssh root@192.168.1.206 ``` ### Step 2: Stop and Remove Existing Template ```bash # Stop VM if running qm stop 9000 # Wait a moment sleep 3 # Delete VM and all associated disks qm destroy 9000 --purge ``` ### Step 3: Create New VM Shell ```bash qm create 9000 \ --name ubuntu-24.04-cloudinit \ --memory 2048 \ --cores 2 \ --net0 virtio,bridge=vmbr0 ``` ### Step 4: Import Cloud Image ```bash qm importdisk 9000 /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img local-lvm ``` **Note:** This may take a few minutes depending on image size. ### Step 5: Attach Imported Disk ```bash qm set 9000 \ --scsihw virtio-scsi-pci \ --scsi0 local-lvm:vm-9000-disk-0 ``` ### Step 6: Configure Boot Order ```bash qm set 9000 --boot order=scsi0 ``` ### Step 7: Enable UEFI/OVMF ```bash qm set 9000 --bios ovmf --efidisk0 local-lvm:1 ``` ### Step 8: Enable QEMU Guest Agent ```bash qm set 9000 --agent 1 ``` ### Step 9: Configure Cloud-Init ```bash qm set 9000 --ide2 local-lvm:cloudinit qm set 9000 --serial0 socket --vga serial0 ``` ### Step 10: Convert to Template ```bash qm template 9000 ``` ## Verification ```bash # Check template configuration qm config 9000 # Verify it's marked as template qm list | grep 9000 ``` ## After Template Recreation Once the template is recreated: 1. **Recreate VMs from updated template:** ```bash ./scripts/deploy/recreate-vms-smaller-disks.sh --yes ``` 2. **Verify VM boot and network:** ```bash # Wait 5-10 minutes for VMs to boot for ip in 192.168.1.60 192.168.1.188 192.168.1.121 192.168.1.82; do ping -c 1 -W 2 $ip && echo "✓ $ip" || echo "✗ $ip" done ``` ## Network IP Address Concerns ### Current Configuration - **Proxmox Host:** 192.168.1.206 (DHCP) - **VM IPs:** 192.168.1.188, 192.168.1.60, 192.168.1.121, 192.168.1.82 (Static) - **Gateway:** 192.168.1.254 ### Verification The VM IPs should work if: 1. **Same Subnet:** All IPs are in 192.168.1.0/24 ✓ 2. **Outside DHCP Range:** Ensure 192.168.1.188-80 are not in DHCP pool 3. **Correct Gateway:** Verify 192.168.1.254 is your router/gateway ### If IPs Don't Work If the VM IPs don't work after boot: 1. **Check DHCP Range:** Ensure 192.168.1.188-80 are reserved/outside DHCP 2. **Verify Gateway:** Check if gateway should be 192.168.1.1 instead of 192.168.1.254 3. **Update VM IPs:** If needed, update via Proxmox Web UI or API ### Alternative: Use DHCP for VMs If static IPs are problematic, you can configure VMs to use DHCP: ```bash # Remove static IP config from VMs # VMs will get IPs from DHCP automatically ``` ## Troubleshooting ### Template Not Booting - Check boot order: `qm config 9000 | grep boot` - Verify disk attachment: `qm config 9000 | grep scsi0` - Check UEFI: `qm config 9000 | grep bios` ### VMs Not Getting IPs - Verify cloud-init is installed in template - Check network bridge: `ip addr show vmbr0` - Verify gateway is reachable: `ping 192.168.1.254` ### SSH Access Issues - Ensure SSH is enabled: `systemctl status ssh` - Check firewall: `iptables -L` - Verify root login is allowed: `grep PermitRootLogin /etc/ssh/sshd_config` --- **Status:** Ready to execute once SSH access is available.