Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

steve217

macrumors 6502a
Original poster
Nov 11, 2011
547
844
NC
While the default VirtualBox settings are appropriate for Sierra, the trick is creating a bootable dmg for the installer. These steps assume you have saved the installer in your application folder.

hdiutil attach /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/SharedSupport/InstallESD.dmg
hdiutil create -o tmp.dmg -size 10g -layout SPUD -fs HFS+J
hdiutil attach tmp.dmg
asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/untitled --erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -Rv /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
cp -v /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/OS\ X\ Base\ System
hdiutil detach /Volumes/OS\ X\ Install\ ESD
hdiutil convert -format UDZO -o InstallSierra.dmg tmp.dmg​

To create the VM using VirtualBox 5.0.24(r108355):
1. In VirtualBox Manager, Name (Sierra), Type (Mac OS/X), Version (Mac OS X 10.11 El Capitan)
2. Memory 4gb, Create a dynamic hard drive of at least 32gb, leave the defaults alone. Be sure EFI is selected and on the motherboard chipset option, PIIX3 is selected.
3. For storage, attach the bootable dmg (InstallSierra) create above. If all goes well, delete the tmp.dmg.​

Credit to Matt Behrens for the bootable dmg steps.
 
Last edited:
  • Like
Reactions: grahamperrin
A couple of corrections:

asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/OS\ X\ Base\ System --erase

should be

asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/untitled --erase

and you need the full path towards tmp.dmg in the final command.

hdiutil convert -format UDZO -o InstallSierra.dmg /Users/yourhomefolder/tmp.dmg
 
  • Like
Reactions: grahamperrin
A couple of corrections:

asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/OS\ X\ Base\ System --erase

should be

asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/untitled --erase

and you need the full path towards tmp.dmg in the final command.

hdiutil convert -format UDZO -o InstallSierra.dmg /Users/yourhomefolder/tmp.dmg

Thanks for double checking my work, weckart. I've updated the original post with your correction.

I'm going to quibble about that last step, however, the present working directory will suffice; no need to supply the full path.
 
  • Like
Reactions: grahamperrin
Thanks for double checking my work, weckart. I've updated the original post with your correction.

I'm going to quibble about that last step, however, the present working directory will suffice; no need to supply the full path.

I would agree that it should but I tried it and it didn't like it until I put the full path in.
 
  • Like
Reactions: grahamperrin
Thank you both :)

Previously I found an alternative method at YouTube, part of which involves https://goo.gl/pDehcA – Windows-oriented commands, easily adjusted to work with VirtualBox on PC-BSD (the forerunner to TrueOS Desktop).

If (in lieu of TrueOS) I install an Apple OS less than Sierra as the host OS on the MacBookPro8,2 that I use for testing, I'll follow the hints above.
 
I installed Sierra in VirtualBox. Installation went fine but for some reason I can't update to public beta 2.

I tried every suggestion in developer forums without success:

Link 1
Link 2

First time download stopped at 17 Mb and never progressed. Next I removed the contents of updates folder and tried terminal with softwareupdate without success.
Even renaming folders and downloading files manually as outlined in the developer forum didn't help. Either software update got stuck without installing anything or it complained that updates have changed and pressing details button didn't work.

For some reason recovery update installed just fine so I'm not sure why Public Beta 2 isn't installing.

I installed Sierra in VirtualBox because I wanted a less risky way to install Sierra for testing. I currently have no officially compatible Mac and there is no way I'm going to install beta OS into my Mac Pro, I need it to be reliable.
 
I installed Sierra in VirtualBox because I wanted a less risky way to install Sierra for testing. I currently have no officially compatible Mac and there is no way I'm going to install beta OS into my Mac Pro, I need it to be reliable.

The Mac Pro has 4 internal SATA ports. For a couple of $ you can get a used SATA drive dedicated to Sierra without affecting any of your other volumes. You could even install to an external USB drive if you don't mind the speed drop. Probably an easier option than fighting with VBox.
 
I considered that option but I have no real need to run Sierra, I tried the VirtualBox mainly out of curiosity and installing beta the usual way isn't very tempting because Sierra won't work on my old iMac 2007 which I used to test Yosemite and El Capitan betas. I might be able to install it by upgrading to a newer processor but its frankly too much hassle to be worthwhile.

If I can't update Sierra beta so be it, I might consider testing it again in VM once its released.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.