VirtualBox/Setting up a Virtual Machine/Mac OS X

From Wikibooks, open books for an open world
Jump to navigation Jump to search

License violations[edit]

According to the macOS and OS X software license agreement[1], macOS should only be installed on Apple Mac devices. Neither the editors of this book nor Wikibooks have any liability over the installation of macOS or OS X guests on VirtualBox or any other violations of the software license.

Installation script[edit]

The following installation script:

  • Doesn't require a ready-made bootable installation ISO
  • Downloads macOS Mojave directly from the Apple Store servers
  • Runs on Windows and Linux
  • Uses only open-source software, no custom bootloader, and original Apple files directly from Apple
  • Has easily-installed dependencies: VirtualBox>5.2, bash>4 (cygwin bash on Windows), unzip, wget, dmg2img
  • Can use a genuine Mac serial number to allow iCloud and iMessage functionality.

https://github.com/img2tab/okiomov - One-Key-Installation of macOS Mojave 10.14.1 on VirtualBox

Manual installation[edit]

The manual installation requires access to the Mac App Store through an existing installation of macOS.

Create ISO Installation Media[edit]

  1. Download the macOS Installer file from the App Store[2].
  2. When download finishes, find the app, right-click and select "Show Package Contents".
  3. Inside Contents/SharedSupport you will find a InstallESD.dmg file.
  4. Open "Disk Utility"
  5. Choose Images > Convert
  6. In the window, choose the InstallESD.dmg to convert and the disk type to be "DVD/CD-R master for export". Also choose the name for installer disk and the final destination. Then click "Convert".
  7. After conversion completes, you will see a .cdr file in your destination folder.
  8. Open "Terminal"
  9. Type hdiutil convert /(source path)/OSXInstaller.cdr -format UDTO -o /(destination path)/OSXInstaller.iso in "Terminal"
  10. Check destination folder. This is your file for installation in VirtualBox. There should be a .iso file extension.

Installation in VirtualBox[edit]

  1. Open VirtualBox. Click "New"
  2. Type the name for virtual machine and OS X for type. Choose your version.
  3. Select memory size.
  4. Select "Create Virtual Disk Now"
  5. Choose VDI for format.
  6. Select storage name and size. The size should be at least 32 GB.
  7. Go to "Settings"
  8. Go to "Storage" Tab
  9. In the SATA controller, click "Add Optical Disk".
  10. Insert the .iso file.
  11. Go to "Display" tab.
  12. Set video memory to maximum value.
  13. Quit "Settings"
  14. Boot by clicking "Start".
  15. When it boots, you will see some data being displayed.
  16. After a while, you will need to choose the language for installation. Choose your own language.
  17. Then you will be asked where to install the OS X.
  18. On the upper-left corner, you will see a "Utilities" button. Click it and select "Disk Utility".
  19. You will see a window with different storages on the left. Choose "VBOX HARDDISK Media". Note: You may have to select View/View All Devices
  20. Erase the Storage by clicking the "Erase" button on the top.
  21. You will be prompted to enter the name for the storage. Enter your desired name and continue.
  22. Wait for the process to complete. Then quit Disk Utility.
  23. You will find a new storage media, which is like a hard disk. Choose that storage for the installation of OS X to install.
  24. After installation completes, the virtual machine will automatically shut down. Go to "Settings".
  25. Go to "Storage" section to eject the .iso file.
  26. Boot virtual machine again.
  27. Choose system language.
  28. Choose allow location or not.
  29. You will be asked to enter your Apple ID. Even if you have an Apple ID, do not enter now.
  30. Accept EULA of OS X
  31. Restore Time Machine Backups (if you have)
  32. You will see the main page of OS X, open App Store.
  33. Enter your Apple ID and sign in...


There should be 2 scenarios...

  • Scenario 1: You will sign in within a short time. Congratulations! You have done it!
  • Scenario 2: It took ages. Stop signing in and check the FAQ below.

References[edit]