Again please note these instructions are for use on virtualized Apple hardware only!
In a previous blog we noted how to virtualize a MacPro 6,1 or a Mac Mini with a few set of steps. A large part of that was how to create a VMware bootable iso to be able to install the MacOS onto (and how to generate it from the Mac system. Here is an update that pertains to Mojave as the process is slightly changed
hdiutil attach /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/Mojave
hdiutil create -o ./MojaveBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach ./MojaveBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\Mojave.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt –noverify –erase
rm -rf /Volumes/OS\ X\ Base\ System/System/Installation/Packages
mkdir -p /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -R /Volumes/Mojave/Packages/* /Volumes/OS\ X\ Base\ System/System/Installation/Packages/ hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/Mojave/ mv ./MojaveBase.cdr.dmg ./BaseSystem.dmg
hdiutil create -o ./Mojave.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil attach ./Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt –noverify –erase cp ./BaseSystem.dmg /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil convert ./Mojave.cdr.dmg -format UDTO -o ./Mojave.iso
mv ./Mojave.iso.cdr ~/Desktop/Mojave.iso
rm ./Mojave.cdr.dmg