Skip to content

qemu-vm: add virtualisation.fileSystems to allow extra vm mounts#112746

Merged
mkg20001 merged 2 commits intoNixOS:masterfrom
mkg20001:qemu-extra-disks
Feb 14, 2021
Merged

qemu-vm: add virtualisation.fileSystems to allow extra vm mounts#112746
mkg20001 merged 2 commits intoNixOS:masterfrom
mkg20001:qemu-extra-disks

Conversation

@mkg20001
Copy link
Copy Markdown
Member

Motivation for this change

Resolves #112742

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mkg20001
Copy link
Copy Markdown
Member Author

mkg20001 commented Feb 11, 2021

testable with

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

    services.getty.autologinUser = "root";

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

    virtualisation.fileSystems."/testmount" =
      { device = "testmount";
        fsType = "9p";
        options = [ "trans=virtio" "version=9p2000.L" ];
        neededForBoot = true;
      };
  });
}).vm

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Feb 11, 2021
@mkg20001
Copy link
Copy Markdown
Member Author

Ran the changed tests locally, tests succeed

@mkg20001 mkg20001 merged commit 8429831 into NixOS:master Feb 14, 2021
@mkg20001 mkg20001 deleted the qemu-extra-disks branch February 14, 2021 12:20
@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/mount-an-old-lvm1-disk-image/39381/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nixos vm ignores additionall filesystems

2 participants