Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix thinks the vm is offline #51

Open
dsilvasc opened this issue Oct 16, 2023 · 1 comment
Open

nix thinks the vm is offline #51

dsilvasc opened this issue Oct 16, 2023 · 1 comment

Comments

@dsilvasc
Copy link

Repro:

krunvm create --name nix nixos/nix
krunvm start nix nix -- --extra-experimental-features 'nix-command flakes' profile install 'nixpkgs#google-cloud-sdk'

This fails with:

warning: you don't have Internet access; disabling some network-dependent features
error: builder for '/nix/store/5jrd75v747s76s16zxk59384xfcjqn58-bash-5.2.tar.gz.drv' failed with exit code 1;
       last 4 log lines:
       > error:
       >        … writing file '/nix/store/v28dv6l0qk3j382kp40bksa1v6h7dx9p-bash-5.2.tar.gz'
       >
       >        error: unable to download 'https://ftpmirror.gnu.org/bash/bash-5.2.tar.gz': Timeout was reached (28)

Looks like it's because of this check:

https://github.com/NixOS/nix/blob/2.18.1/src/nix/main.cc#L456-L459

https://github.com/NixOS/nix/blob/2.18.1/src/nix/main.cc#L30-L54

I wonder if it's common for programs to inspect getifaddrs like that, and if so, what other problems would come up if it returned a fake non-loopback/link-local network interface.

@dsilvasc dsilvasc changed the title nix thinks krunvm is offline nix thinks the vm is offline Oct 16, 2023
@Rucadi
Copy link

Rucadi commented Oct 29, 2023

virito-net got merged into libkrun, I assume that using the virtio-net backend will make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants