From 2e8439d37ec79f6e0896f29d26bca2d024bd27fe Mon Sep 17 00:00:00 2001 From: Roman Scherer Date: Thu, 27 Feb 2025 19:24:46 +0100 Subject: machine: hetzner: Fix deployment on smaller instances. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/machine/hetzner.scm (hetzner-machine-rescue-install-os): Avoid out of disk space error by bind mounting /mnt/tmp/gnu/store to /gnu/store. * tests/machine/hetzner.scm: Test with smaller instances. * doc/guix.texi (Invoking guix deploy): Mention unsupported instance. Change-Id: If8bfb6733de493b51813b3e82e255849192f7cba Signed-off-by: Ludovic Courtès --- gnu/machine/hetzner.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/machine/hetzner.scm') diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm index 1d9a3f43857..bc8d2efbd34 100644 --- a/gnu/machine/hetzner.scm +++ b/gnu/machine/hetzner.scm @@ -551,6 +551,13 @@ chmod 700 /mnt/root/.ssh cp /root/.ssh/authorized_keys /mnt/root/.ssh/authorized_keys chmod 600 /mnt/root/.ssh/authorized_keys +# Small instance don't have much disk space. Bind mount the store of the +# rescue system to the tmp directory of the new Guix system. +mkdir -p /mnt/tmp/gnu/store +mkdir -p /gnu/store +mount --bind /mnt/tmp/gnu/store /gnu/store + +apt-get install guix --assume-yes cat > /tmp/guix/deploy/hetzner-os.scm << EOF (use-modules (gnu) (guix utils)) (use-package-modules ssh) @@ -605,7 +612,7 @@ fdisk -l /dev/sda" (format #f "#!/usr/bin/env bash set -eo pipefail apt-get update -apt-get install guix cloud-initramfs-growroot --assume-yes")) +apt-get install cloud-initramfs-growroot --assume-yes")) (format #t "successfully installed rescue system packages on '~a'\n" name))) (define (hetzner-machine-delete machine server) -- cgit v1.3