This project automates the creation of an Arch Linux ARM (aarch64) cloud image suitable for use with Lima-VM on macOS and Linux hosts. It provides scripts to build, convert, and prepare images, and to generate a Lima-VM template for easy VM deployment.
- Lima-VM installed on your host (macOS or Linux)
- Sufficient disk space (at least 10GB recommended)
- Internet connection (for package downloads)
build.sh
— Main entrypoint. Orchestrates VM setup, image build, and template generation.create-image.sh
— Runs inside a Lima-VM. Builds the Arch Linux ARM image, installs packages, and prepares the disk.create-archlinux-template.sh
— Generates a Lima-VM YAML template referencing the latest built image.
First, clone this repository and change into its directory:
git clone https://github.com/SuperGregM/archlinux-arm-lima.git
cd archlinux-arm-lima
Run the main build script from your host (macOS or Linux):
./build.sh [options]
-v <version>
or--version <version>
: Set a custom version suffix for the image filename.-c
or--compress <0|1>
Enable or disable compression (default: 1 Enabled).-s
or--sid
: Use a Debian Sid VM as the build environment (default is Ubuntu).-k
or--kill
: Force delete the existingbuild-arch
Lima VM.
Example:
./build.sh -v 1
This will:
- Start (or reuse) a Lima VM named
build-arch
- Run
create-image.sh
inside the VM to build the Arch Linux ARM image - Generate a Lima template YAML referencing the new image
If you run ./build.sh
with no options, it will build the default version (version 0).
Note: If you reuse a version (e.g., run ./build.sh
or ./build.sh -v 1
again), any previous build files for that version will be deleted before building a new image.
After a successful build, a file like archlinux.yaml
will be created in the project directory. You can start a Lima VM using this template:
limactl start ./archlinux.yaml
This will launch a VM using your custom Arch Linux ARM image.
- Images are saved in
/tmp/lima/output/
(e.g.,.img.xz
,.qcow2.xz
,.vmdk.xz
) - The Lima template is
archlinux.yaml
in the project directory
- The build process requires root privileges inside the build VM for disk and package operations.
- The image includes cloud-init, OpenSSH, and is pre-configured for DHCP networking.
- For troubleshooting, check the console output of each script for error messages.
- mschirrmeister/archlinux-lima — Builds for Archlinux Lima images
- gmanka-containers/archlinuxarm — Builds for Archlinux Docker images