Skip to content

nixos vm ignores additionall filesystems #112742

@mkg20001

Description

@mkg20001

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
1.

(import <nixpkgs/nixos> {
  configuration = ({ ... }: {
    users.users.root.password = "";

    services.getty.autologinUser = "root";

    virtualisation.qemu.options = [
      "-virtfs local,path=/home,security_model=none,mount_tag=testmount"
    ];

    fileSystems."/testmount" =
      { device = "testmount";
        fsType = "9p";
        options = [ "trans=virtio" "version=9p2000.L" ];
        neededForBoot = true;
      };
  });
}).vm
  1. nix-build
  2. result/bin/run-nixos-vm
  3. ls /testmount # will fail

Expected behavior
/testmount should exist and be mounted

Additional context
/testmount is not even mentioned in /etc/fstab

possibly the mkVMOverride on the whole fileSystems attrset is causing this

Notify maintainers

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.96, NixOS, 21.03pre-git (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.4pre20201205_a5d85d0
  • channels(root): "nixos-21.03pre268835.8c8731330b5, nixpkgs, solaros"
  • channels(maciej): "nixpkgs, solaros"
  • nixpkgs: /home/maciej/.nix-defexpr/channels/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions