Files
loc_az_hci/scripts/vm-management/create/create-template-quick.sh
defiQUG c39465c2bd
Some checks failed
Test / test (push) Has been cancelled
Initial commit: loc_az_hci (smom-dbis-138 excluded via .gitignore)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 09:04:46 -08:00

91 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
source ~/.bashrc
# Quick Template Creation Guide
# This provides step-by-step instructions for creating the template
set -e
cat <<'EOF'
========================================
Ubuntu Cloud-Init Template Creation
========================================
This guide will help you create a Ubuntu Cloud-Init template in Proxmox.
STEP 1: Download Ubuntu Cloud Image
------------------------------------
Run this command to download the image:
wget https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img
Or use the script:
./scripts/download-ubuntu-cloud-image.sh 24.04
STEP 2: Upload to Proxmox
--------------------------
1. Open Proxmox Web UI: https://192.168.1.206:8006
2. Go to: Datacenter → pve → Storage → local
3. Click "Upload" button
4. Select the downloaded .img file
5. Wait for upload to complete (may take a few minutes)
STEP 3: Create VM from Image
------------------------------
1. Click "Create VM" (top right)
2. General:
- VM ID: 9000
- Name: ubuntu-24.04-cloudinit
- Click "Next"
3. OS:
- Select "Do not use any media"
- Click "Next"
4. System:
- Keep defaults
- Click "Next"
5. Disks:
- Delete the default disk
- Click "Add" → "Hard Disk"
- Storage: local
- Import from: Select the uploaded .img file
- Disk size: 20GB (minimum)
- Click "Add"
- Click "Next"
6. CPU:
- Cores: 2
- Click "Next"
7. Memory:
- Memory: 2048 MB
- Click "Next"
8. Network:
- Bridge: vmbr0
- Model: VirtIO
- Click "Next"
9. Confirm:
- Review settings
- Click "Finish"
STEP 4: Configure Cloud-Init
-----------------------------
1. Select the VM (9000)
2. Go to "Options" tab
3. Click "Cloud-Init"
4. Configure:
- User: ubuntu
- Password: (leave empty, use SSH keys)
- SSH Public Keys: Paste your public key
- Click "OK"
STEP 5: Convert to Template
----------------------------
1. Right-click on VM 9000
2. Select "Convert to Template"
3. Confirm
Done! Template is ready.
Now you can run:
./scripts/recreate-vms-from-template.sh
EOF