This repository contains scripts and configuration files to create a QEMU-based VM template and use it to create a full clone on a Proxmox hypervisor. Follow the steps below to set up and execute the process.
- Ensure you have a Proxmox hypervisor set up and accessible.
- Install necessary tools like
curl
,gpg
, andwget
on the machine where you will run the scripts.
To install Mise, navigate to the .mise
directory and execute the setup.sh
script:
cd .mise
bash setup.sh
This script will:
- Import the Mise GPG key.
- Download and verify the Mise installation script.
- Install Mise and configure it for your shell.
Follow the instructions printed by the script to activate Mise for your shell.
The .env
file contains environment variables required by the create-template-jammy-minimal.sh
script. To set it up:
-
Copy the
.env.template
file to.env
:cp .env.template .env
-
Edit the
.env
file to customize the variables as needed:nano .env
Example variables:
VMUSER
: The username for the VM.VMPASSWORD
: The password for the VM.TEMPLATE_ID
: The ID for the VM template.CLONE_ID
: The ID for the cloned VM.CLONE_NAME
: The name for the cloned VM.
To create a QEMU-based VM template and a full clone:
-
Ensure the
.env
file is properly configured. -
Run the
create-template-jammy-minimal.sh
script:bash create-template-jammy-minimal.sh
This script will:
- Download the Ubuntu Jammy cloud image.
- Create a VM template with the specified configuration.
- Clone the template to create a new VM with the specified ID and name.
- The
authorized_keys
file is used to set up SSH access for the VM. Ensure it contains the correct public key. - The
.gitignore
file excludes sensitive files like.env
andauthorized_keys
from version control.
For any issues or questions, refer to the script comments or contact the repository maintainer.