Open d4g opened 4 years ago
Could be related to: https://github.com/NixOS/nixpkgs/issues/71157
I'm experiencing the same issue on 19.09
This package should be marked as broken in NixOS, I think. I will open an issue on nixpkgs and crosslink this one.
Workaround is to install nixops from git:
git clone https://github.com/NixOS/nixops.git
cd nixops
echo "nix-community/nixops-libvirtd" >> all-plugins.txt
./update-all
nix-build release.nix -A build.x86_64-linux --arg p "(p: [ p.libvirtd ])"
nix-env -i result/
I made an overlay from @mmilata's answer:
self: super:
let
nixopsLibvirtdSrc = self.fetchFromGitHub {
owner = "nix-community";
repo = "nixops-libvirtd";
sha256 = "0g2ag4mhgrxws3h4q8cvfh4ks1chgpjm018ayqd48lagyvi32l8m";
rev = "1c29f6c716dad9ad58aa863ebc9575422459bf95";
};
nixopsLibvirtdPlugin = self.callPackage "${nixopsLibvirtdSrc}/release.nix" {};
nixopsSrc = self.fetchFromGitHub {
owner = "NixOS";
repo = "nixops";
sha256 = "0irf9wha2rxla6z7mywj5z29bvjbpwlxqj2s29ygsbhp6hnlbzzz";
rev = "4cfb70513bad149183adc3ac741c176d83b0e9d5";
};
nixopsPlugins = _: [ nixopsLibvirtdPlugin ];
in
{
nixops = (self.callPackage "${nixopsSrc}/release.nix" { p = nixopsPlugins; }).build.x86_64-linux;
}
Having the overlay to install a more recent version of the libvirt plugin helped, though there are still a couple other problems (for me at least) preventing a trivial libvirt deployment. Opened some issues in the nix-community repo:
nix-community/nixops-libvirtd#7 nix-community/nixops-libvirtd#8
The Nix-caused NixOS-side regression at the root cause of this issue should be fixed soon in channel bumps. See https://github.com/NixOS/nixpkgs/pull/80680 for details.
It did not fix this particular issue.
This is because there is a chroot involved.
I made an overlay from @mmilata's answer:
self: super: let nixopsLibvirtdSrc = self.fetchFromGitHub { owner = "nix-community"; repo = "nixops-libvirtd"; sha256 = "0g2ag4mhgrxws3h4q8cvfh4ks1chgpjm018ayqd48lagyvi32l8m"; rev = "1c29f6c716dad9ad58aa863ebc9575422459bf95"; }; nixopsLibvirtdPlugin = self.callPackage "${nixopsLibvirtdSrc}/release.nix" {}; nixopsSrc = self.fetchFromGitHub { owner = "NixOS"; repo = "nixops"; sha256 = "0irf9wha2rxla6z7mywj5z29bvjbpwlxqj2s29ygsbhp6hnlbzzz"; rev = "4cfb70513bad149183adc3ac741c176d83b0e9d5"; }; nixopsPlugins = _: [ nixopsLibvirtdPlugin ]; in { nixops = (self.callPackage "${nixopsSrc}/release.nix" { p = nixopsPlugins; }).build.x86_64-linux; }
This overlay broke NixOps ec2 for me. In case anyone is wondering why ec2 isn't working after trying this overlay.
You probably also need to include the AWS plugin in nixopsPlugins
in addition to the libvirt one. Or did it break in some other way?
You probably also need to include the AWS plugin in
nixopsPlugins
in addition to the libvirt one. Or did it break in some other way?
I think that's it. I just wanted to mention it, because the current stable release does not require you to specify extra plugins for AWS.
Any idea how to override plugins with the new flakes build system?
Describe the bug When I try to deploy a vm via nixops to libvrtd on nixos, it fails with the error:
during the step
To Reproduce Steps to reproduce the behavior:
setup libvirtd in nixos according to https://nixos.org/nixops/manual/#idm140737322394336
create 2 config file: testvm.nix:
testvm.libvirtd.nix:
run
nixops create -d netsample testvm.nix testvm.libvirtd.nix
run
nixops deploy -d netsample
Expected behavior VM is setup successfully
Screenshots Console log:
Additional context Add any other context about the problem here.
Metadata