mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
66fb2f539a
Context summary: 'vma create' can't otherwise write to tmpfs such as /dev/shm. This is important when used from non-nixos machines which may have /build as tmpfs. VMA is Proxmox's virtual machine image format that wraps QEMU images, augmenting these with proxmox-specific configuration file. proxmox-image.nix uses the VMA tool to create vma image files. The VMA tool exists as a patchset ontop of QEMU. VMA writes its output with open() and O_DIRECT flag. O_DIRECT does not work on Linux tmpfs [1]. Thus: $ vma create ~/output.vma ... # works, assuming home isn't tmpfs. $ vma create /dev/shm/output.vma ... # fails since /dev/shm is tmpfs Failure results in assert(*errp == NULL). O_DIRECT is a cache performance hint. But it currently blocks our usage of nixos-generate -f proxmox from Non-NixOS hosts and Docker. The patch here simply removes O_DIRECT: vma-writer.c later performs memalign due to O_DIRECT, but this is safe to do with or without O_DIRECT. Ideally, this should be fixed in upstream Proxmox: Perhaps by falling back to open without O_DIRECT. Another attempt to fix this SIGABRT is [2], which writes the vma file directory to $out/ folder -- however that may still be tmpfs mounted which it is in our case. [1] https://lore.kernel.org/lkml/45A29EC2.8020502@tmr.com/t/ [2] https://github.com/NixOS/nixpkgs/pull/224282 |
||
---|---|---|
.. | ||
doc/manual | ||
lib | ||
maintainers | ||
modules | ||
tests | ||
COPYING | ||
default.nix | ||
README | ||
release-combined.nix | ||
release-small.nix | ||
release.nix |
*** NixOS *** NixOS is a Linux distribution based on the purely functional package management system Nix. More information can be found at https://nixos.org/nixos and in the manual in doc/manual.