Merge pull request #142577 from helsinki-systems/feat/larger-p9-msize

vmTools: Make msize larger to silence warning

authored by Kim Lindberger and committed by GitHub 76f5b6bb 1b7dd40a

+8 -3
+1 -1
nixos/modules/virtualisation/qemu-vm.nix
··· 306 virtualisation.msize = 307 mkOption { 308 type = types.ints.positive; 309 - default = 16384; 310 description = 311 '' 312 The msize (maximum packet size) option passed to 9p file systems, in
··· 306 virtualisation.msize = 307 mkOption { 308 type = types.ints.positive; 309 + default = pkgs.vmTools.default9PMsizeBytes; 310 description = 311 '' 312 The msize (maximum packet size) option passed to 9p file systems, in
+7 -2
pkgs/build-support/vm/default.nix
··· 110 111 echo "mounting Nix store..." 112 mkdir -p /fs${storeDir} 113 - mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose 114 115 mkdir -p /fs/tmp /fs/run /fs/var 116 mount -t tmpfs -o "mode=1777" none /fs/tmp ··· 119 120 echo "mounting host's temporary directory..." 121 mkdir -p /fs/tmp/xchg 122 - mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L 123 124 mkdir -p /fs/proc 125 mount -t proc none /fs/proc ··· 1174 `debDistros' sets. */ 1175 diskImages = lib.mapAttrs (name: f: f {}) diskImageFuns; 1176 1177 }
··· 110 111 echo "mounting Nix store..." 112 mkdir -p /fs${storeDir} 113 + mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose,msize=${toString default9PMsizeBytes} 114 115 mkdir -p /fs/tmp /fs/run /fs/var 116 mount -t tmpfs -o "mode=1777" none /fs/tmp ··· 119 120 echo "mounting host's temporary directory..." 121 mkdir -p /fs/tmp/xchg 122 + mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,msize=${toString default9PMsizeBytes} 123 124 mkdir -p /fs/proc 125 mount -t proc none /fs/proc ··· 1174 `debDistros' sets. */ 1175 diskImages = lib.mapAttrs (name: f: f {}) diskImageFuns; 1176 1177 + # The default 9P msize value is 8 KiB, which according to QEMU is 1178 + # insufficient and would degrade performance. 1179 + # See: https://wiki.qemu.org/Documentation/9psetup#msize 1180 + # Use 500 KiB as a conservative default, see also https://github.com/NixOS/nixpkgs/pull/142577#issuecomment-953848731 1181 + default9PMsizeBytes = 512000; 1182 }