Sound Solutions LLC


  • Home
  • Active control systems
  • Passive control systems
  • Measurement and evaluation
  • Prototype design and delivery
  • Good reading
  • SS Blog
  • Principle Bio
  • Contact

Running a virtual Mac on Ubuntu using VirtualBox




We needed a Mac to program iPhone apps. ...or so we were told. The problem is that we didn't really need a Mac beyond that programming environment. Macs are nice and all. We just don't need one.

The obvious solution was to install a Mac OS running in a virtual machine in VirtualBox. We already had an instance of Windows (Win 7) running as a virtual machine. We use it for programs that do what we will characterize as "misbehave" in Ubuntu. ...or are just unavailable. Similarly, a Mac virtual machine should solve the problem, yes?

Yes. But, it was not as easy to install. The following steps describe the process.

We relied heavily on online advice from Jeremy Cheng in Hong Kong. You can find his blog entry here: https://medium.com/@hkdb/running-macos-in-virtualbox-with-ubuntu-31ec745f21ae . As you will see, we are adding information to his original post and running the commands from the Github script explicitly.



Mac on Ubuntu



1.



Install VirtualBox If Needed



Download and install VirtualBox and the Guest Addons. As you can see, mine is shown with my already-installed virtual machines (including the Mac). Your installation will either have your existing machines or be empty (if new).



2.



Download the Mac OS



Download macOS High Sierra 10.13.6 (6.8GB) made available by Techsviewer. You can get it by clicking on the Google Drive browser image shown. I used the original image on the left. It looks like either would work.



3.



Create your Virtual Machine



Click NEW in VirtualBox and create your Mac machine. Various sources recommended a machine name without space. I am guessing that is because the later command line modifications get more complicated with spaces in the machine name. I - like most people - used MacOS as my machine name. Choose Mac OS X as the type and selected "10.12 Sierra from the Version dropdown. Dial in a 4GB memory size. ...and choose "Create a virtual hard disk now". Then, click "Create".



5.



Change System Motherboard settings



Under Settings-System-Motherboard, change the base memory to 4GB. Then, unclick floppy drive from the boot order, and demote it below the optical and hard drive. Then, click OK.



6.



Change System Processor Settings



Under Settings-System-Processor, change the number of CPUs to the maximum that VirtualBox will allow. For me, it was two. Then, click OK.



7.



Delete The Currently Assigned Hard Drive



Under Settings-Storage, select the currently assigned hard drive and use the small disk-minus icon to the lower right of it to delete it.



8.



AssigN A New Hard Drive



Now, use the small disk-plus icon to the upper right to add a hard drive to the selected SATA controller. Clicking on that icon generates a selection box.



9.



Choose an Existing Disk



Click on choose and existing disk. This will open a file selection box.



10.



AssigN the Downloaded Drive



Use the selection box to navigate to the downloaded disk image. Select that image. You can now return to the main VirtualBox window.



11.



Run Configuration Commands from the Command line



You will need to run some last configuration commands from the command line. To do this, exit VirtualBox completely and open a terminal window (Ctrl-T). Then, open the GitHub project shown by clicking on the image. One-by-one, copy and paste the seven VBoxManage commands from the GitHub project to your command window and hit <ENTER>. You should receive no responses.



12.



Boot Your Mac



You can now restart VirtualBox, select your Mac, and clock on RUN. You will need to go through some initial configuration such as declaring an iCloud account, selecting your country and keyboard, ... completely and open a terminal window (Ctrl-T). It will run slow while doing this. But... eventually... you will see your new Mac screen. Subsequent boots should run faster and faster.


Enjoy!







Sound Solutions LLC



5776 Grape Road Suite 51-154, Mishawaka, IN 46545