MacOsInstallerToDiskImg is a command line utility to transform the macOS installer you found on the app store in an Disk Image you can use to install a VM for example
#Usage: ./MacOsInstallerToDiskImg /Applications/Install\ macOS\ Mojave.app/ ~/MacOSMojave.iso
#Build: go build