From 19c44f265e5d4f180595bd2b7f32411da14ab937 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 20 Sep 2023 01:54:04 +0200 Subject: [PATCH] Add installation script for the guix installer iso. This script is supposed to only run on the Guix installer and checks that it's the case through various ways. Signed-off-by: Denis 'GNUtoo' Carikli --- README | 39 ++++++++ guix-vm-installer.xml | 111 +++++++++++++++++++++ mumble-vm-install.sh | 221 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 371 insertions(+) create mode 100644 guix-vm-installer.xml create mode 100755 mumble-vm-install.sh diff --git a/README b/README index cc74619..cd7ba21 100644 --- a/README +++ b/README @@ -40,6 +40,45 @@ Once the image is booted: # first-boot.sh - You then need to set the root password. +The mumble-vm-install.sh installation script +============================================ +This script is supposed to only run inside a VM on the Guix installer +and checks that it's the case through various ways. The specification +of the VM it runs on is provided in guix-vm-installer.xml for +reference. It is very specific to the Libre en communs infrastructure, +so you might need to modify it to use it on your infrastructure. + +The Libre en Communs infrastructure on which this VM is being deployed +has libvirt but it doesn't have Guix on the host. So the option +provided by Libre en Communs was to do the installation from a +VM. + +This is also common for many infrastructure providers due to security +concerns with access outside the VM. + +Since the Guix installer is trusted and is now provided by Libre en +communs, and that we also have access to the vm management interfaces +we simply use a script to do all the installation work. + +If instead you have a VM with only SSH access you will also need to +modify the script to fit that use case. + +It is also possible to convert an existing VM to Guix but that +requires significantly more work (see gnu/machine/digital-ocean.scm +inside the Guix source code for more detail on how to do that). + +To use this script, the admin with privileged access to the vm +management interface needs to boot the installer and copy the script +inside. This can be done by running the following command (the script +can be named like you want): + # cat /dev/ttyS0 > i.sh +and then by pasting the script through the first serial port, and +typing ctrl+d at the end, so that the file is closed and written. + +The script can then run like that: + # chmod +x i.sh + # ./i.sh + License ======= This project is free software: you can redistribute it and/or modify diff --git a/guix-vm-installer.xml b/guix-vm-installer.xml new file mode 100644 index 0000000..4d6110d --- /dev/null +++ b/guix-vm-installer.xml @@ -0,0 +1,111 @@ + + guix-vm-installer + 16777216 + 16777216 + + /machine + + + hvm + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/qemu-system-x86_64 + + + + + +
+ + + + + +
+ + +
+ + + +
+ + + +
+ + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +