Steps to create a macOS virtual machine

From blinkenwiki

  • Create 32 GB ramdisk.
  • Copy ‘Install macOS Mojave.app’ to ramdisk.
  • File->New…
    1. Choose Install Windows or another OS from a DVD or image file. Continue.
    2. Click ‘Choose Manually’ and drop install image on installation assistant. Continue.
    3. Warning about creating a bootable image file. Continue.
    4. . Change location to ramdisk. Save.
    5. Change name to ‘macOS Mojave’. Change location to ramdisk. Choose ‘Customize settings before installation.’ Create.
    6. Change Memory to 8192 MB. Close. Continue.
    7. Warning about camera access. Ignore. Continue.
    8. Wait for VM to boot.
  • Install OS
    1. Choose Language: English. Next.
    2. Choose Install macOS. Continue.
    3. Agree.
    4. Choose Macintosh HD. Install.
    5. VM will reboot, and briefly show text console. QUICKLY! Pause VM.
    6. Stop VM. Remove disk ‘macOS image file.hdd’ and file.
    7. Remove ‘Install macOS Mojave.app’.
      NB: Removing these files ensures the full 32GB in the ramdisk is available to the VM.
    8. Start VM.
    9. Wait for macOS to install.