Install MacOSX in KVM

Create a MacOSX ElCapitan ISO image as described in OSX-KVM - Running Mac OS X El Capitan and macOS Sierra on QEMU/KVM.

  1. Create a new virtual machine with architecture x86_64:
    macos-kvm-1

  2. Select the MacOSX ElCapitan iso file:
    macos-kvm-2

  3. Select a reasonable amount of memory, 2048MB is recommended:
    macos-kvm-3

  4. Create a virtual disk with reasonable amount of space, 40GB will be more then enought:
    macos-kvm-4

  5. Name the virtual machine, for example macosx-elcapitan. Select Customize configuration before install:
    macos-kvm-5

  6. From the Hypervisor Details section in the Overview pane, select for Firmware BIOS and for Chipset Q35.

    This settings does not support IDE devices, so remove the IDE Disk 1 and the IDE CDROM 1:
    macos-kvm-6

  7. Add again the disk. Press Add Hardware > Storage > Select or create custom storage and select the previous created disk with the Manage… button.

    After, make sure the Device type is Disk device and Bus type is SATA:
    macos-kvm-7

  8. Add again the CDROM. Press Add Hardware > Storage > Select or create custom storage and select the MacOSX ISO with the Manage… button.

    After, make sure the Device type is CDROM device and Bus type is SATA:
    macos-kvm-8

  9. Compare the list of hardware of your virtual machine with the image bellow. Make sure they are similar.

    Then press Begin Installation:
    macos-kvm-9

  10. Power off the virtual machine and press Show virtual machine details > Boot options > Direct kernel boot

    Select Enalbe direct kernel boot and for Kernel path, search for file enoch_rev2839_boot:
    macos-kvm-10

  11. Now, select CPUs pane. In the CPUs section, for Current allocation type the number of cores that you want.For maximum performance select the number shown on Logical host CPUs.

    From section Configuration, select core2duo for model.

    Open Topology section and select Manually set CPU topology. Choose a topology that you want. The resulting number CPUs is given by Sockets x Cores x Threads and should not be greater than Current allocation:
    macos-kvm-11

  12. Start the virtual machine and good luck!