From 63b9cc496a5d1a1094a710f38694e15076edc1bf Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Sat, 5 Apr 2025 11:05:46 +0100 Subject: [PATCH] Enable TRIM support for the macOS hard drive image. We need to tell macOS the emulated drive is an SSD *and* run `trimforce enable` in the guest because we can't emulate a specific (i.e. Apple-approved) drive. --- OpenCore-Boot.sh | 2 +- README.md | 2 ++ macOS-libvirt-Catalina.xml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenCore-Boot.sh b/OpenCore-Boot.sh index e027851..08688fc 100755 --- a/OpenCore-Boot.sh +++ b/OpenCore-Boot.sh @@ -57,7 +57,7 @@ args=( -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw -drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2 - -device ide-hd,bus=sata.4,drive=MacHDD + -device ide-hd,bus=sata.4,drive=MacHDD,rotation_rate=1 # -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27 -netdev user,id=net0,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27 # -netdev user,id=net0 -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 # Note: Use this line for High Sierra diff --git a/README.md b/README.md index a7225bf..474ced2 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,8 @@ work, patience, and a bit of luck (perhaps?). ### Post-Installation +* Run `sudo trimforce enable` to enable TRIM support on the macOS hard drive. + * See [networking notes](networking-qemu-kvm-howto.txt) on how to setup networking in your VM, outbound and also inbound for remote access to your VM via SSH, VNC, etc. * To passthrough GPUs and other devices, see [these notes](notes.md#gpu-passthrough-notes). diff --git a/macOS-libvirt-Catalina.xml b/macOS-libvirt-Catalina.xml index 05cb13f..d91657d 100644 --- a/macOS-libvirt-Catalina.xml +++ b/macOS-libvirt-Catalina.xml @@ -70,7 +70,7 @@ - +