The VM will boot from the Optical drive remove the disk from the virtual drive and reboot the VM. Make sure that you do not set the new virtual hard drive as an SSD, otherwise the High Sierra installer will format the drive as APFS, which is not yet recognized by VirtualBox's EFI BIOS and you will be unable to boot from the hard drive.
Open the virtual machine from the repo, usually double clicking it will open the VirualBox GUI.Clone this repo or you can just download the macOS.vbox file.Hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso Setting up the VM Hdiutil detach /Volumes/Install \ macOS \ High \ Sierra Sudo /Applications/Install \ macOS \ High \ Sierra.app/Contents/Resources/createinstallmedia -volume /Volumes/install_build Hdiutil attach /tmp/ -noverify -mountpoint /Volumes/install_build
Hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J