nixos-anywhere icon indicating copy to clipboard operation
nixos-anywhere copied to clipboard

kexec fails on Gandi IaaS platform

Open markpash opened this issue 2 years ago • 5 comments

Describe the bug

While the Gandi Cloud VPS offering supports NixOS their IaaS platform, which has some interesting features, doesn't.

In an attempt to use nixos-anywhere, I created a debian 11 instance with 2GB of RAM and prepared a flake to install. When running nixos-anywhere it failed with a kexec error. I can post a log if necessary, but the error itself was: Could not get memory layout.

I looked around for instances of this error and found a bug report that suggests that kexec needs to be compiled with the xen libraries in order for it to work on xen guests. I believe I was targeting a xen guest.

I looked at the default kexec bundle used, which uses a statically linked kexec from nixpkgs, and indeed it isn't compiled with xen libraries. Since the xen libraries are part of the whole xen package, and it is now marked as insecure, this is about as far as I'm willing to go with this on my own.

To Reproduce

Steps to reproduce the behavior:

  1. Create an instance of Gandi Cloud V5 server running debian 11, 2GB RAM
  2. Use nixos-anywhere

Expected behavior

I expected the server to reboot to NixOS.

System information

Running from a macOS system, targeting debian 11, Xen guest.

markpash avatar Jul 28 '23 17:07 markpash

Can you try with a 4GB instance? We had issues in the past where 2GB wasn't enough to hold the NixOS image in memory.

zimbatm avatar Jul 28 '23 17:07 zimbatm

Can you try with a 4GB instance? We had issues in the past where 2GB wasn't enough to hold the NixOS image in memory.

Just did, same issue.

markpash avatar Jul 28 '23 18:07 markpash

Maybe @nlewo knows something about this

zimbatm avatar Jul 30 '23 11:07 zimbatm

@zimbatm No i dont know more about this.

However to move forward, it would be required to compile kexec with the Xen support as suggested by @markpash and checks if it fixes the issue. (If it fixes the issue, we should then add some patches to the nixpkgs Xen.) If someone wants to try, I could provide an SSH access to a GandiCloud VPS for such kind of tests.

nlewo avatar Jul 30 '23 14:07 nlewo

I'm trying on a 2GB Xen VM on another provider. After kexec run the VPS control console thinks the machine is shutdown. I have to click the boot button to bring it up.

sedlund avatar Feb 10 '24 11:02 sedlund