To create a qcow2 template that is modified to contain certain programs. This is sometimes also referred to as a golden image. This image also contains my zsh config for a specified user. This means that a user is created and a list of programs are installed on top of the latest official cloud image provided by the arch linux community.
The following command will create a qcow2 image at 'output-archlinux/golden-arch.qcow2' and create a template with VM ID 9000. This command assumes that you'll be using the same public key to ssh into the proxmox node as well as the VMs created by the template to keep things simple.
WARNING: If a VM/Template has ID 9000, then these commands will destroy and replace it with the golden image template for proxmox.
make -s template \
CLOUD_USER=<your_cloud_user> \
PROXMOX_USERNAME=<your_proxmox_username> \
PROXMOX_IP=<your_proxmox_ip> \
PATH_TO_PUB_KEY=<your_path_to_pub_key>
#Example
make -s template \
CLOUD_USER=arch \
PROXMOX_USERNAME=root \
PROXMOX_IP=192.168.0.100 \
PATH_TO_PUB_KEY=~/.ssh/id_rsa.pub
To use the created template [ID 9000], create a clone using it and attempt to ssh into the VM using user as CLOUD_USER.
The following command will delete the qcow2 file and reset the user-data file used to generate the template.
make clean
You can find the shell scripts and their usage here.
Follow along as I create the image and use it to deploy a virtual machine on proxmox!