-
Notifications
You must be signed in to change notification settings - Fork 37
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
virtualisation.msize error #52
Comments
Not sure what is going wrong on your device. This option definitely exists on 21.11: https://github.com/NixOS/nixpkgs/blob/17ee68bc368e175369258b97316328d6bca11d3b/nixos/modules/virtualisation/qemu-vm.nix#L306 |
I did as described in https://github.com/Mic92/nixos-shell#channelsnix_path Then started nixos-shell as in NIX_PATH=nixpkgs=channel:nixos-19.09-small make test Reason:
I want to circumvent this error by using the old channel. Does not seem to use the channel though. |
With kvm disabled and 21.11 channel I got the same error message. |
the virtualisation module in nixos uses qemu-kvm by default: https://github.com/NixOS/nixpkgs/blob/17ee68bc368e175369258b97316328d6bca11d3b/nixos/modules/virtualisation/qemu-vm.nix#L563 |
diff --git a/examples/vm.nix b/examples/vm.nix
index 54480b8..9751765 100644
--- a/examples/vm.nix
+++ b/examples/vm.nix
@@ -1,4 +1,8 @@
{ pkgs, ... }: {
+ virtualisation.qemu = {
+ package = pkgs.qemu;
+ options = [ "-cpu max" ];
+ };
boot.kernelPackages = pkgs.linuxPackages_latest;
services.openssh.enable = true;
} The error persists. |
I'd have to replace the options differently I guess as they seem to not get picked up. |
aarch64 seems to pass -enable-kvm regardless: https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/qemu-common.nix#L27 |
qemu-common-patched.nix: aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -machine virt -cpu max"; changes in local copies of the files you linked, qemu-vm.nix importing the locally patched copy NIXOS_EXTRA_MODULE_PATH=~/nixos-shell/qemu-vm.nix NIX_PATH=nixpkgs=file:///data/data/com.termux.nix/files/home/nixexprs.tar.xz nix-shell -p gnumake --run "bin/nixos-shell -v --show-trace examples/vm.nix" diff --git a/examples/vm.nix b/examples/vm.nix
index 54480b8..d37f371 100644
--- a/examples/vm.nix
+++ b/examples/vm.nix
@@ -1,4 +1,11 @@
{ pkgs, ... }: {
boot.kernelPackages = pkgs.linuxPackages_latest;
services.openssh.enable = true;
+ nixos-shell = {
+ mounts = {
+ mountHome = false;
+ mountNixProfile = false;
+ cache = "none"; # default is "loose"
+ };
+ };
}
diff --git a/share/modules/nixos-shell.nix b/share/modules/nixos-shell.nix
index c0fec7a..e55365f 100644
--- a/share/modules/nixos-shell.nix
+++ b/share/modules/nixos-shell.nix
@@ -1,7 +1,7 @@
{ lib, options, pkgs, modulesPath, ... }:
{
- imports = [
+ disabledModules = [
"${toString modulesPath}/virtualisation/qemu-vm.nix"
]; |
error: The option `virtualisation.msize' defined in `<unknown-file>' does not exist.
"aarch64-linux"
Linux 4.4.111-21427293
no
no
nix-env (Nix) 2.3.16
"home-manager-21.11, nix-on-droid-21.11, nixpkgs-21.11.336020.2128d0aa28e"
/nix/store/3xxi7mfxzc2cr39z7slpiksl524aj9ma-nixexprs.tar.xz
The text was updated successfully, but these errors were encountered: