mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 10:50:15 +00:00
nixos/qemu-vm: virtiofsd requires shared memory
We recently switched to virtiofs for qemu-vms run on Linux
(https://github.com/NixOS/nixpkgs/pull/552774). I suspect we
only tested it with nixos tests, which just [happen to enable shared memory](673028b7b1/nixos/lib/testing/driver.nix (L259))
for the ssh backdoor. However, for folks using qemu-vm.nix outside of nixos
tests, they'll experience virtiofsd crashing with [some very obtuse
messages](https://gitlab.com/virtio-fs/virtiofsd/-/work_items/127).
Reported by @fricklerhandwerk in
<https://github.com/NixOS/nixpkgs/pull/552774#issuecomment-5668027063>.
This commit is contained in:
@@ -741,7 +741,11 @@ in
|
||||
};
|
||||
|
||||
virtualisation.qemu = {
|
||||
enableSharedMemory = mkEnableOption "shared memory";
|
||||
enableSharedMemory = mkOption {
|
||||
type = types.bool;
|
||||
default = useVirtiofs; # Need shared memory for virtiofs: <https://www.qemu.org/docs/master/system/devices/virtio/vhost-user.html#shared-memory-object>
|
||||
description = "Enable shared memory";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
|
||||
Reference in New Issue
Block a user