ILD

macOS disable swap file on vmware for linux
作者:Herbert Yuan 邮箱:yuanjp@hust.edu.cn
发布时间:2018-9-8 站点:Inside Linux Development

在vmware for linux中安装macOS 10.13,发现运行的时候奇卡无比,由于虚拟机OS放在机械硬盘,写入速度才80M/S,怀疑是交换分区导致的卡顿。因此禁掉swap功能。


Disable System Integrity Protection

需要先关闭该功能。


.vmx文件添加一行

1
bios.bootdelay = 2000


启动时,按Win + R 键,进入一个启动选择页面,选择EFI Internal Shell (Unsupported option)。


进入一个shell,输入下述命令回车:

1
fs2:\com.apple.recovery.boot\boot.efi


进入recovey mode,选择 Utilities > Terminal。


在终端输入

1
rcsutil disable


然后输入reboot重启。


Disable swap

重启进入mac系统,在终端执行下述命令。

1
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist


然后发现 /private/var/vm 中不再有swap文件。


mac os不再卡顿。


参考

https://apple.stackexchange.com/questions/210817/disable-system-integrity-protection-on-os-x-running-on-vmware

http://hints.macworld.com/article.php?story=201106020948369


Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.