If you know the Scaleway API you can do equivalent steps via API instead of using the webinterface.
Open Scaleway "Create a server" page
Enter name
Select region
Select server type
This will only work for the V and X types of servers (e.g. VC1M or X64-15GB)
Select "Debian Sid" from the distributions tab
Note: At the time of writing of this guide the Ubuntu Xenial did not have a kexec enabled kernel and will therefore not work!
Create server
Wait until server has been provisioned and is done booting
The status of the system can be checked on by looking at the console in the webinterface
Build NixOS kexec Tarball
remote build
First you will need to build a NixOS kexec tarball. To do this follow the steps outlined below:
gitclonehttps://github.com/cleverca22/nix-tests.git
cdnix-tests/kexec/
# Edit configuration.nix according to your needs. An example can be found below:
nix-build'<nixpkgs/nixos>'-Aconfig.system.build.kexec_tarball-Inixos-config=./configuration.nix-Q-j4
copy the NixOS tarball
Copy the prepared NixOS kexec tarball to the server
(removed autoreboot.nix from imports, added SSH key)
# new cmd: nix-build '<nixpkgs/nixos>' -A config.system.build.kexec_tarball -I nixos-config=./configuration.nix -Q -j 4{ lib, pkgs, config,...}:with lib;{imports=[<nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>./kexec.nix./justdoit.nix];#boot.supportedFilesystems = [ "zfs" ];
boot.loader.grub.enable=false;
boot.kernelParams=["console=ttyS0,115200"# allows certain forms of remote access, if the hardware is setup right"panic=30""boot.panic_on_fail"# reboot the machine upon fatal boot issues];
systemd.services.sshd.wantedBy= mkForce ["multi-user.target"];
networking.hostName="kexec";# example way to embed an ssh pubkey into the tar
users.users.root.openssh.authorizedKeys.keys=["ssh-rsa AAAAB3.... Your-SSH-key"];}
If your server is aarch64, there is no working kexec on initrd image provided by Scaleway. So KEXEC_KERNEL tag won't work.
This can be worked around by compiling static kexec and copying in to /boot and also by providing fake /sbin/init (a file which Scaleway's initrd launches at the end)