vmTools: Make msize larger to silence warning

See https://issues.guix.gnu.org/47225
This commit is contained in:
Janne Heß 2021-10-22 17:27:03 +02:00
parent d5321ca4ad
commit ecf388e90b
No known key found for this signature in database
GPG Key ID: 69165158F05265DF
2 changed files with 8 additions and 3 deletions

View File

@ -306,7 +306,7 @@ in
virtualisation.msize =
mkOption {
type = types.ints.positive;
default = 16384;
default = pkgs.vmTools.default9PMsizeBytes;
description =
''
The msize (maximum packet size) option passed to 9p file systems, in

View File

@ -110,7 +110,7 @@ rec {
echo "mounting Nix store..."
mkdir -p /fs${storeDir}
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose,msize=${toString default9PMsizeBytes}
mkdir -p /fs/tmp /fs/run /fs/var
mount -t tmpfs -o "mode=1777" none /fs/tmp
@ -119,7 +119,7 @@ rec {
echo "mounting host's temporary directory..."
mkdir -p /fs/tmp/xchg
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,msize=${toString default9PMsizeBytes}
mkdir -p /fs/proc
mount -t proc none /fs/proc
@ -1174,4 +1174,9 @@ rec {
`debDistros' sets. */
diskImages = lib.mapAttrs (name: f: f {}) diskImageFuns;
# The default 9P msize value is 8 KiB, which according to QEMU is
# insufficient and would degrade performance.
# See: https://wiki.qemu.org/Documentation/9psetup#msize
# Use 500 KiB as a conservative default, see also https://github.com/NixOS/nixpkgs/pull/142577#issuecomment-953848731
default9PMsizeBytes = 512000;
}