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

DblD/arch-cloud-image

 
 

Repository files navigation

arch-cloud-image

Ansible Packer 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

Create the golden image

The following commands will create a qcow2 image at 'output-archlinux/golden-arch.qcow2'

git clone https://github.com/Naman1997/arch-cloud-image.git
cd arch-cloud-image/
chmod +x scripts/create.sh
# Update CLOUD_USER here
./scripts/create.sh CLOUD_USER
# EXAMPLE
# ./scripts/create.sh arch

Create a proxmox template using the created image [Optional]

The following commands will create a template with VM ID 9000. WARNING: If a VM/Template has ID 9000, then these commands will destroy and replace it with the golden image template for proxmox.

chmod +x scripts/proxmox.sh
# Update variables here
./scripts/proxmox.sh PROXMOX_USERNAME PROXMOX_IP CLOUD_USER PATH_TO_PUB_KEY
# EXAMPLE
# ./scripts/proxmox.sh root 192.168.0.106 arch ~/.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

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 55.5%
  • Shell 44.5%