hdiutil attach /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_apphdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+Jhdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_buildasr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -eraserm /Volumes/OS\ X\ Base\ System/System/Installation/Packagescp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklistcp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmghdiutil detach /Volumes/install_apphdiutil detach /Volumes/OS\ X\ Base\ System/hdiutil convert /tmp/Sierra.cdr.dmg -format UDTO -o /tmp/Sierra.isomv /tmp/Sierra.iso.cdr ~/Desktop/Sierra.iso
- Create a new El Capitan (there is no option for Sierra at the moment) machine. Leave everything at default
- Boot the virtual machine from the Sierra.iso you created, which you'll find on your desktop. I had to mash F12 while the machine was starting up and then choose 'EFI CD/DVD' in the boot manager. YMMV.
- The install process should be familiar to you. If not, you probably shouldn't be playing with a beta OS ;)
- Grab a coffee, the 15 minute estimation the installer gives you is a complete work of fiction. My install took over an hour.
- Once installed, reboot and complete the new user process. Skip the AppleID login bit, it'll fail on a VirtualBox.
- Shut down the virtual machine and quit VirtualBox.
since the official macOS app already embedded with a tool to help us make install media, there's no need to manually create install image by those cp commands.
try the commands below which I've verified on my mac and successfully create a VM on my mac host.
mount the blank disk image you've created and find out the volume name (normally should be '/Volumes/untitled' )
create the install media by using the official tool
notice: replace the content in the double quotation mark with the volume name you found in 2)
unmount the disk image that mounted automatically in 3), which should be named 'Install macOS Sierra'.
convert the disk image to a loadable virtual drive image (by using the command provided in Step 1.11)
then here you go.