Initial commit: loc_az_hci (smom-dbis-138 excluded via .gitignore)
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
90
scripts/vm-management/create/create-template-quick.sh
Executable file
90
scripts/vm-management/create/create-template-quick.sh
Executable file
@@ -0,0 +1,90 @@
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user