Skip to content

Packer template that creates a modified cloud image using the official Arch Linux cloud image. Also creates a new user in the image that uses my zsh config.

License

Notifications You must be signed in to change notification settings

Naman1997/arch-cloud-image

Repository files navigation

arch-cloud-image

Validatate configs GitHub license

Objective of this repo

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.

Prerequisites

Usage

This repo uses the playbook.yml file in the root directory to create the golden image. In case you want to install any additional tools or make any changes, make sure to modify that file. The playbook installs a list of packages that are present in the pkglist.txt file that you can modify as well.

The following command will create a qcow2 image at output-archlinux/golden-arch.qcow2 and create a template with 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 sure you're able to ssh in the proxmox node using the key provided here]
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.

Creating a Full Clone

You will be able to see the IP address of the VM once it boots up as long as you didn't remove the installation of qemu-guest-agent from the ansible playbook.

A cloned node

Once the node is up and running, you can use the SSH key you provided to log in the node.

SSH Login

Cleanup

The following command will delete the qcow2 file and reset the user-data file used to generate the template.

make clean

Older way of doing the same thing

You can find the shell scripts and their usage here.

Video

Follow along as I create the image and use it to deploy a virtual machine on proxmox!

About

Packer template that creates a modified cloud image using the official Arch Linux cloud image. Also creates a new user in the image that uses my zsh config.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •