Closed rgri closed 2 months ago
I fixed this by mounting the drive with the option cache=mmap
[1], which is not set on NixOS by default when creating virtual machines with nixos-rebuild build-vm
. Attached is a screenshot of the working /etc/fstab line.
Also, here is the nixos option I used to set this flag:
virtualisation.vmVariant.virtualisation.fileSystems."/home/USER/Videos/Media".options =
[ "cache=mmap" ];
Thank you, I've had the same issue in an Unraid VM running in the docker image on ubuntu, with the download dir set to my Unraid Share mount (9p/virtio) for quite some time, and worked around it by downloading to my os and then move it to the share.
This was the tip I needed, adding a cache=mmap to my /etc/fstab fixed it: media /mnt/media 9p [...],cache=mmap 0 0
qBittorrent & operating system versions
qBittorrent: 4.6.5 x64 Operating system: NixOS 24.11.20240809.5e0ca22 (Vicuna) Qt: 6.7.2 Libtorrent: 2.0.10.0 Boost: 1.81.0 OpenSSL: 3.0.14 zlib: 1.3.1
What is the problem?
In a qemu VM, qBittorrent will download perhaps .1-.5% of a torrent which targets a directory shared between the host and guest before stopping with
Errored: Invalid Argument
..part
files as well as partially completed files and directories are written to the shared directorysecurity_model
ofpassthrough
ornone
on the shared directory makes no differenceSteps to reproduce
On non-NixOS (I don't have a non-NixOS computer to test with)
-virtfs local,path=/home/USER/temp,security_model=none,mount_tag=temp
/home/USER/temp
On NixOS (easiest if you do not have knowledge of qemu, and how I've tested this)
nixos-rebuild build-vm
:/home/USER/temp
Additional context
No response
Log(s) & preferences file(s)
preferences_logs.zip