To prevent the `qcow2` image file from inevitably ballooning or expanding on the
host, we need to tell qcow2 image format block driver to unmap on discard/TRIM.
Due to how `qcow2` sparse images integrate with SSD TRIM (a.k.a. "`discard`"),
we also must set `discard=unmap`, and `detect-zeroes=unmap`.
However, these parameters are usually specified on the block device, so we must
fallback to the more declarative `-blockdev ...` + `-device ...` form of QEMU
CLI args to specify them [^1]. For example:
```console
# need to specify 'discard=unmap, detect-zeroes=unmap' on blockdev
-blockdev driver=qcow2,node-name=MacHDD,file.driver=file,file.filename="$REPO_PATH/mac_hdd_ng.img",file.aio=threads,discard=unmap,detect-zeroes=unmap
-device ide-hd,bus=sata.4,drive=MacHDD,id=macssd,rotation_rate=1
```
[^1]: See: [_QEMU User Documentation: Block device options_][1] or `man qemu` "_Block device options_" section:
> The most explicit way to describe disks is to use a combination of
> `-device` to specify the hardware device and `-blockdev` to describe the
> backend. The device defines what the guest sees and the backend describes how
> QEMU handles the data. _**It is the only guaranteed stable interface for
> describing block devices and as such is recommended for management tools and
scripting**_.
> The `-drive` option combines the device and backend into a single command line
> option which is a more human friendly. There is however
> _no interface stability guarantee_ although some older board models still need
> updating to work with the modern `blockdev` forms.
Signed-off-by: James Cuzella <james.cuzella@lyraphase.com>
Suggested-by: Daniel Collins <solemnwarning@solemnwarning.net>
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.
Changes:
- Update to OpenCore 0.9.5
- Switch around the emulated video device (required for Ventura)
- Change default resolution to 1920x1080
- Include ventura in shortname CLI help
- Add notes on 'bridged networking'
- Better networking documentation (thomaspaulb)
- Support for offline installations (kwadwokyeremeh)
- Initial WIP macOS Sonoma support (via 'luchina-gabriel')
Changes:
- Upgrade to OpenCore 0.6.7-RELEASE
- Big Sur image building script updates (Nick)
- See https://github.com/kholia/OSX-KVM/pull/169 for details.
- Removed history to reduce repository size