A tool to build a Arch Linux Image for GCE
This project provides a script that creates an Arch Linux image that can run on Google Compute Engine.
The image is configured to be as close as possible to a base Arch Linux installation, while still allowing it to be fully functional and optimized for Compute Engine. Notable choices made and differences compared to a standard Arch Linux installation are the following:
You can use Cloud SDK to create instances with the latest prebuilt Arch Linux image. To do that follow the SDK installation procedure, and then run the following command:
$ gcloud compute instances create INSTANCE_NAME \
--image-project=arch-linux-gce --image-family=arch
For older images, see the current_images.txt file.
You can build the Arch Linux image yourself with the following procedure:
Install the required dependencies and build the image
$ sudo pacman -S --needed arch-install-scripts dosfstools e2fsprogs
$ git clone https://github.com/GoogleCloudPlatform/compute-archlinux-image-builder.git
$ cd compute-archlinux-image-builder
$ sudo ./build-arch-gce
You can also use the build-arch-gce
package from the AUR, and run
sudo /usr/bin/build-arch-gce
If the build is successful, this will create an image file named arch-vDATE.tar.gz in the current directory, where DATE is the current date.
Install and configure the Cloud SDK.
Copy the image file to Google Cloud Storage:
$ gsutil mb gs://BUCKET_NAME
$ gsutil cp arch-vDATE.tar.gz gs://BUCKET_NAME
Import the image file to Google Cloud Engine as a new custom image:
$ gcloud compute images create IMAGE_NAME \
--source-uri=gs://BUCKET_NAME/arch-vDATE.tar.gz \
--guest-os-features=GVNIC,UEFI_COMPATIBLE,VIRTIO_SCSI_MULTIQUEUE
You can now create new instances with your custom image:
$ gcloud compute instances create INSTANCE_NAME --image=IMAGE_NAME
The Google Cloud Storage file is no longer needed, so you can delete it if you want:
$ gsutil rm gs://BUCKET_NAME/arch-vDATE.tar.gz
All files in this repository are under the Apache License, Version 2.0 unless noted otherwise.
Google Inc. does not provide any support, guarantees, or warranty for this project or the images provided.