
Things to set/look out for:
- "Manual Install": as OpenCore loader can only deal SATA disks, you'll have to
add the install media yourself after the creation process
- "Generic or unknown OS"
- Memory: leave about 2GB to the host
- CPUs: match or fewer than host's count
- Disk image size: create one during the process or manually after creation
- Tick "Customize configuration before install", Finish
- Click on "Apply" before leaving the view
- Chipset: Q35
- Firmware: UEFI
- Delete the NIC, audio, tablet, usb redirection
- Change the IDE disk to SATA
- Manually edit the xml
- Change the EFI images to the non secboot variant
- Turn smm off
```xml
/usr/share/edk2/ovmf/OVMF_CODE.fd
...
```
Start editing the XML manually. Here's the breakdown of the changes.
Add the xmlns spec. Without this, `` tag won't persist.
Without the tag, the xmlns spec won't persist either, so add the command line
passthrough first.
The qemu commandline passthrough is unavoidable because it is not possible to
set up Apple SMC and custom CPU flags in Libvirt. It is also to circumvent the
issue of libvirt's mandatory use of pcie-root-ports for the Q35 machine type.
See [cloud+libvirt.md#caveats](cloud+libvirt.md#caveats) for detail.
The PCI addresses are crafted so that they won't conflict with libvirt's
allocation.
```xml
...
```
Turn off memballoon.
```xml
```
That's pretty much it!