Add mmap cache option to QEMU mount

This is required for mmap'ing on mounted files on MacOS Host.
Closes #19639, #20055.

Signed-off-by: Byoungchan Lee <daniel.l@hpcnt.com>
This commit is contained in:
Byoungchan Lee 2023-12-26 18:37:10 +09:00
parent 7dc7cbfd9b
commit f10a7bfd4c
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ func (v *MachineVM) mountVolumesToVM(opts machine.StartOptions, name string) err
case MountType9p:
mountOptions := []string{"-t", "9p"}
mountOptions = append(mountOptions, []string{"-o", "trans=virtio", mount.Tag, mount.Target}...)
mountOptions = append(mountOptions, []string{"-o", "version=9p2000.L,msize=131072"}...)
mountOptions = append(mountOptions, []string{"-o", "version=9p2000.L,msize=131072,cache=mmap"}...)
if mount.ReadOnly {
mountOptions = append(mountOptions, []string{"-o", "ro"}...)
}