diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-03 08:59:23 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-11 18:33:36 -0700 |
| commit | 67b96f01e4ab549ddc24bae05014bbd18d695426 (patch) | |
| tree | d3efa6913583708b77cc2778899501266b717db6 /README.md | |
| parent | Customize the disk layout via disklabel templates (diff) | |
| download | site-server-images-67b96f01e4ab549ddc24bae05014bbd18d695426.zip | |
Update README for new openbsd-image/ and hcloud-snapshot/ layout
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 58 |
1 files changed, 24 insertions, 34 deletions
@@ -1,12 +1,11 @@ # OpenBSD Packer Template -This repository contains a template for building OpenBSD boxes for QEMU using Packer. +This repository contains a template for: +- Building OpenBSD boxes for QEMU using Packer (`openbsd-image/`). +- Creating an OpenBSD snapshot in Hetzner for starting up new servers in Hetzner + using that OpenBSD image you just created (`hcloud-snapshot/`). -I only use it for running OpenBSD on an ARM Mac and for building QEMU images to -run in Hetzner on x86_64 machines, so that is the only configuration that is -actively tested. - -## Installation +## Building an OpenBSD Image First, ensure you have QEMU installed: @@ -14,42 +13,33 @@ First, ensure you have QEMU installed: brew install qemu ``` -Then, you can build the box with the following, either for ARM64 or AMD64: +Then, you can build the box with the following: ```sh -ARCH=amd64 make -ARCH=arm64 make +./build-openbsd-image.sh ``` -## Usage - -Once your image is built, you can run it: +If you have a custom disk layout you want, you can pass in a disklabel template. +e.g. ```sh -ARCH=arm64 make run +./build-openbsd-image.sh --disklabel-template ./openbsd-image/disk-layouts/cgit.disklabel ``` -Once the system is up, you can SSH in using: +## Creating a Hetzner Snapshot from your OpenBSD Image -```sh -make ssh -``` +Once you've built your image, you can now create a Hetzner snapshot for that +image. Hetzner doesn't support OpenBSD out of the box, so this allows you to +spin up new servers on demand using your snapshot of this OpenBSD image. -``` -The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established. -ED25519 key fingerprint is: SHA256:GnVug9cxjtROdVCbDsaxG7Co/E1j060B9U+bmY2lqOk -This key is not known by any other names. -Are you sure you want to continue connecting (yes/no/[fingerprint])? yes -Warning: Permanently added '[127.0.0.1]:2222' (ED25519) to the list of known hosts. -OpenBSD 7.9 (GENERIC) #211: Wed May 6 17:30:57 MDT 2026 - -Welcome to OpenBSD: The proactively secure Unix-like operating system. - -Please use the sendbug(1) utility to report bugs in the system. -Before reporting a bug, please try to reproduce it with the latest -version of the code. With bug reports, please try to ensure that -enough information to reproduce the problem is enclosed, and if a -known fix for it exists, include that as well. - -openbsd-vm$ +To get started, you'll need to: + +1. Create an SSH key within Hetzner's Console +2. Create an API key you can use within Hetzner's Console + +Then: + +```sh +export HCLOUD_TOKEN="xxxx-xxxx-xxxx" +./build-hcloud-snapshot.sh --ssh-key <your-name-you-gave-your-ssh-key> ``` |