We haven’t yet tested it ourselves, but we’ve heard good things. It promises to take you through the process of installing and setting up a macOS virtual machine. If you want to install a newer version of macOS in VirtualBox, check out this script on GitHub. Update: The instructions here apply to older versions of macOS.