Virtualbox For Mac M1



Here’s one way you can run some Windows applications on an M1 Mac: By using CodeWeavers Crossover for Mac. This application is based on the open-source Wine software that became famous for letting Linux users run some Windows applications without Windows itself. Programs such as Parallels Desktop, VMWare Fusion and VirtualBox allow you to create a virtual machine (VM), that runs on your Mac just like any other Mac app. The VirtualBox interface can be intimidating, as it shows a lot of technical details and specifications without many tips or descriptions for beginners. Creating a new virtual machine is much more time-consuming than in Parallels Desktop or VMWare Fusion Player, and you’ll need to know details such as the amount of RAM, CPU cores, and hard.

Virtualbox For Macbook Pro M1

  • Finally after a few day's I find a way to install windows on M1 Mac. I find a website that tells you step by step how to do it. If u are interested on that there is a link for the Website below.
  • This group won't bat an eye at Windows not being available, but will welcome the ability to run Linux in VirtualBox, VMWare and Parallels when the Pro M1 Mac configurations come out in 2021.

Windows, macOS – which one do you want to use today? On a traditional setup, you’re stuck with one or the other. But with virtual box, you actually have macOS on a Windows PC.

It’s the freedom that computer users have enjoyed with Linux and other operating systems.

But Apple has made it difficult to install their operating system on anything other than their own hardware. All of that is changing, and Virtual Box is responsible for it and the rise of the Hackintosh.

New to hackintosh? Learn more about it in our what is hackintosh? overview.

Note: A lot of people will be able to get a mac virtual machine one Windows running smoothly, but sound doesn’t seem to work well. That’s really not an issue because you’ll still be able to access all of your apps and software.

I also recommend that you have access to a real Mac. You might be able to find some distributions of the High Sierra ISO online, but there is always a risk when downloading from an unofficial source. Instead, borrow a Mac from a friend, or use your own and download the High Sierra OS from the App Store.

Check out our high sierra installation guide for hackintosh

Everything You Need to Get Started with Installing macOS on VirtualBox

Before we go through the steps on how to install macOS on Virtual Box, let’s get everything together that you’ll need to get started.

  1. Open up your Mac
  2. Go to the App Store
  3. Type in “High Sierra”

You’ll want to search for your desired operating system (we’ll be using High Sierra), and Download it.

Note: You’ll need a decent computer to be able to run Virtual Box. Your computer will need to meet these minimum requirements:

  • Dual core processor
  • 4GB Ram or higher
  • 64-bit

If your computer doesn’t meet these requirements, you won’t be able to run macOS properly. You’ll be able to download VirtualBox from the official website. I’m not going to go through the installation process, as the website will have all of the information you need to be able to install VirtualBox.

I do recommend that you read all of the documentation and ask any questions that you have in the community section of the website.

VirtualBox 6.0 was just released, so it’s definitely a great time to get started with your own macOS.

Extract macOS Sierra

Make sure you’ve downloaded High Sierra, and then you’ll want to run a few commands from your terminal . You’ll be able to open the terminal at: Applications > Utilities > Terminal. Once inside of the terminal, you’ll want to run the following commands:

Go to your desktop and rename the file, removing the “.cdr” extension. You need this extension to read “.iso” for it to work properly.

You’ve successfully created your own ISO file so that you can bootup your macOS.

The next step is to copy the file over to your Windows machine (using a large USB drive seems to work best). This file will be mounted in your virtual machine later on in the article, so it’s very important that this step is completed successfully.

Creating a mac Virtual Machine on Windows

You’ll want to create a virtual machine, and this is really easy. You’ll open up VirtualBox and click New. You’ll want to have the following parameters selected or entered before clicking Next.

  • Name: High Sierra
  • Type: Mac OS X
  • Version: Mac OS X (64-bit)

Pay attention when selecting the version because you may find that High Sierra is offered as a version when you go to install it. But if it’s not, you can just choose the settings I listed above and they should work fine.

You’ll then be proceeding through all of the settings.

When you come up to the RAM setting, you’ll want to be generous. VirtualBox requires a minimum of 4GB or RAM to run, but the more the better.

Why?

You’ll want to provide at least 4GB to your macOS, or 4096MB to be precise. A general rule of thumb is that if you can spare it, supply more RAM to your virtual machine. RAM will allow the operating system to put more information into memory and retrieve it faster.

For better overall performance, supply as much RAM as you can.

The next steps are also important, and they’ll include:

  • Hard Disk: Choose the “Create a virtual hard disk now” setting.
    • Choose VDI when choosing the hard disk type.
    • Choose Fixed Size instead of Dynamic for added speed.
    • Set the size of the drive to at least 25GB.

You’ll now have your virtual machine using the RAM and disk space properly, and you’ll have to work your way through a few screen prompts before having everything setup properly.

Configuring Your VirtualBox to Run macOS High Sierra

We’ve made a lot of progress so far, and now it’s time to configure your virtual machine properly. You’ll see in the main window of VirtualBox that “High Sierra” is listed. Click on this and then click on the “Settings” button.

You’ll want to go to “System” and make sure that the following are unchecked on the Motherboard tab:

  • Floppy
  • Network

Click on the Processor tab and make sure that you have 2 or more CPUs set for your virtual machine.

The next few settings are rather simple:

  • Display: Video Memory with a minimum of 128MB
  • Storage: Click “Empty” and then click on the CD at the top right. Choose your High Sierra ISO file

Now you’ll need to click “Ok,” and save all of the changes you’ve made. Close out your VirtualBox now.

Apple is very strict on the system that their operating system runs on, so it’s very important that you do your best to configure your virtual machine in such a way that it tricks the installer to thinking you’re on a retail machine.

We’ll now be going into the Windowscommand prompt.

You’ll do this by:

  • Clicking the Start Menu
  • Typing “Command Prompt”
  • Right-clicking on the Command Prompt desktop app
  • Choosing Run as administrator

It’s very important to follow all of the following command prompts exactly. Your goal is to run each command, one by one, hitting the Enter button and waiting for the command to complete successfully.

Remember that VirtualBox needs to be closed before running these commands, or it won’t work properly.

You have to make sure that the virtual machine is properly named “High Sierra” for this method to work. If not, you’ll be able to go back and make changes to the name to get everything to work properly.

Once all of the commands are completed, and there are no errors, you’ll then be able to open up your VirtualBox and get macOS High Sierra installed properly on VirtualBox.

It’s a long process, but we’re almost done with your installation.

Running VirtualBox and the macOS Installer

You’ve almost learned how to install macOS on VirtualBox entirely, and we’re on the home stretch. You’ll want to open up your VirtualBox and then click on your virtual machine that you set up earlier.

Now, click “Start.”

There will be a lot of information displayed on the screen as everything starts running. I recommend stepping away from the machine and letting it run for a few minutes before coming back. Some errors can hang for 5 minutes or longer.

If you’ve done everything properly, you can be confident that the installer will boot properly.

You’ll eventually be presented with the option to pick a Language. If you’ve reached this point, you’re doing very well and are almost ready to run your macOS.

The next steps can be followed:

  • Choose your desired language, and click
  • Click “Disk Utility” and then
  • Click “View” and then “Show All Devices.”
  • Click on your empty virtual drive that has been setup and click “Erase.”
  • Choose the following settings:
    • Name: Macintosh HD
    • Format: Mac OS Extended (Journaled)
    • Scheme: GUID Partition Map
  • Click “Erase” and close Disk Utility when the process is complete.
  • Click “Reinstall macOS.”
  • Click “Continue.”

You’ll come up to one point where you’ll be asked to choose a hard drive, and you’ll want to select the Macintosh HD partition that you just created with the Disk Utility.

We’ve successfully copied all of the files on the virtual machine, but we’re not done just yet.

Exit your virtual machine and then go back to your virtual machine’s settings. You’ll need to change up your Storage settings. Click on your ISO for High Sierra in the “Storage Tree.” You’ll click that CD icon just like we did earlier and then choose “Remove Disk from Virtual Disk.”

Linux

You need to do this to unlink the ISO from your virtual machine.

Start up your virtual machine and you should come across a black screen with the EFI Internal Shell. You’ll want to look for FS1. If this is listed in yellow, click on the virtual machine and then type fs1: and hit the Enter button.

You should be in the fs1 directory.

Type in the following commands:

  1. cd “macOS Install Data”
  2. cd “Locked Files”
  3. cd “Boot Files”

Now we’ll run the installer by running: boot.efi and hitting enter.

If everything goes well, you’ll come across a graphical installer and will just have to work through the prompts. The virtual machine will reboot eventually and then you’ll need to go through the settings and the rest of the setup process.

Soon enough, you’ll be right inside of macOS, where you’ll be able to start using your mac virtual machine on Windows.

Having a virtualbox mac OS is the easiest method of using mac as and when you need it. In addition, using virtualbox is far less complicated than the dual boot hackintosh method we have looked at previously.

Ever since I read Kay Singh’s Apple Silicon M1: Black. Magic. Fuckery article, I couldn’t stop wanting one. My 2012 MacBook Air was in need of a replacement, and although still very serviceable for a 8+year old laptop, not upgrading OSX and a shortened battery lifespan were getting irritating. So, Santa (well, you know) bought me a M1 2020 MacBook Air. At first, I wanted to hold off for a while, after many of the developer tools I use were officially supporting ARM64. But hey, what the heck.

As there’s not a lot of information out there on the M1 from a developers perspective, except a fewother blogs here and there, I wanted to chime in and share my initial findings. Bear in mind that this will very likely change in the near future, as many developers are starting to support the new architecture. An interesting site to check whether your software works is isapplesiliconready.com and doesitarm.com - although these are not always up to date and sometimes provides false information! Be sure to go after the source yourself.

Whatever you do, be sure to upgrade Big Sur to 11.1 first - that will take a while (and eat up more HDD space). I went with the 512GB Air version with eight cores. I don’t care about CPU throttling - even with the 25% performance hit, it still outperforms heavyweight Intel MacBook Pros!

Productivity tools

Before getting to the programming part, let’s take a look at the basic tools I couldn’t live without. First, install iTerm 2. It’s already M1-ready, and Big Sur moved from Bash to Zsh, another good shell I still know from my Gentoo days. Check out technofob.com’s oh-my-zsh config for colors and such, and maybe add extras in your ~.zsh.

Now that you have a shell, we need cmdline stuff. The master branch of Homebrew is ARM64-complaint and you can install two homebrews for the bottles that are still lagging behind - or compile them from source using brew install --build-from-source. I’ve successfully built these from source: sqlite, openssh, python3.9, imagemagick. I set up the M1 homebrew version in /opt/homebrew - and so far, every installation didn’t need a Rosetta alternative - yet. (Heads up: unrar is gone! See link for alternate formula.)

A few other critical pieces of software:

Already running native:

  • The Brave nightly build. Most Chromium-based browsers work.
  • Rectangle, the upgraded Spectacle one.
  • Alfred - of course! I became a convert after fiddling with it, replacing Spotlight and Clipy (see below).

Still on Rosetta - but development on the way:

  • Clipy clipboard utility, the upgraded ClipMenu one.
  • Hopefully Opera someday soon.
  • Sublime Text 3. Preview builds of Visual Studio code are already released.
  • Evernote. It runs on Electron, a known-to-be CPU hungry JS shell. The Rosetta one works, but is a bit sluggish and uses a significant amount of battery.
  • Update jan. 2021: The latest GIMP 2.10 is finally released for OSX, but there are known Big Sur issues. I didn’t run into a single one.

Update 12 jan. 2021: Sublime Build Systems still use /bin/bash to execute the exec_cmd or cmd commands. This means that your $PATH will be screwed up. There are a couple of options to mitigate this. Fiddling with the internal exec.py file did not work for me. In the end, I simply re-created a .bash_profile file in my home dir to set the path for Sublime Text 3 builds. Using Terminus does not help.

Spotify is a mess, according to some, while others claim that Rosetta is “good enough”. I’d like to run as much stuff as possible native, I guess we’ll have to wait. For now, “it just works”, but as Evernote, is far from optimized.

Java development

The Azul community released ARM64 Java builds that are blazingly fast. There are other solutions, but the Zulu builds I tested so far are great. They even ported the JDK13/JDK11/JDK8 older ones. I settled for v15, since Gradle does not like Java 16 yet, according to the compatibility matrix. Gradle 6.7 builds fine with the ARM64 development kit.

The biggest hurdle for me was JavaFX, the UI libraries we use to teach students the Model-View-Controller principle. It reportedly works under Rosetta, but I wanted to try it native anyway, and got a nice no toolkit found exception, not unlike this one. Funnily enough, it builds fine, but it does not execute: JavaFX looks for a native UI renderer and cannot find one.

Installing JDKs with different architectures turned out not to be problematic, and I can quickly switch between both using an alias:

Paths shouldn’t be hardcoded, but /usr/libexec/java_home -a didn’t work for me. Building this sample FXML project using ./gradlew clean build took about a second natively:

  • ARM64: 1378ms
  • x86_64 Rosetta2: 9646ms! (second time: 2459ms, still almost double)
  • x86_64 MacBook Air 2012: 14590ms (second time: 3200ms)

As you can see, combining Rosetta with another “Virtual” Machine is not a particularly great idea. Remember that the 2012 MacBook Air only has 4GB of memory, with eight year old tech.

NetBeans IDE

NetBeans: 12.2 includes Big Sur/Rosetta2 support, but is not running natively. It auto-detects the JDK ARM64 build, which is even more annoying, as setting the default Java Platform is a pain. The “best” way is to manually override netbeans_jdkhome in netbeans.conf. Compared to IntelliJ, NetBeans truly is a piece of shit. Of course, the x86_64 setting also slows down NetBeans itself, not only the project you wish to compile/run.

IntelliJ IDE

IntelliJ: 2020.3 ARM64 test builds are available. It seems that the Rust debugger is not hitting the breakpoints. There’s also a preview PHPStorm build, although I haven’t tried it yet. After opening a Gradle 6.3 project, IntelliJ complains about an invalid Gradle configuration, claiming that JDK15 isn’t compatible with this version of Gradle, although it builds fine on cmdline. Fixing the distribution URL in gradle-wrapper.properties to 6.7.1 does the trick:

After that, the Azul JDK combined with the IntelliJ preview build is a snappy experience and pleasant to work with. Debugging works fine, just as a few third-party libraries I tried - as long as you stay away from JavaFX.

.NET Development

Rosetta

I still need to try this with Rider and Mono. Khalid Abuhakmeh wrote about his experience in a jetbrains blogpost, concluding that it was pleasant to work with .NET on the M1. Bear in mind that he’s talking about Rosetta.

C/C++/Cross-compiling

First, get Xcode from the App Store. Yoink, 12GB!

Next, the CLion IDE: the debugger cannot be launched, official ARM support is currently not there yet, but they’re working on it (last update: 25th of December). One of the perks of being an early adopter, I guess… I don’t want to try this in Rosetta as I only need CLion every odd semester for my teaching activities, and hopefully, by then it’ll be okay.

Until then, I’ll compile and debug cmdline. CMake works flawlessly, using the master version of brew: > Pouring cmake-3.19.2.arm64_big_sur.bottle.tar.gz. Using it to compile the 1.10 release of Google Test gives C++11 errors so you’ll have to add a -DCMAKE_CXX_STANDARD=17 flag to CMake as per this ticket. Compiling itself was extremely quick, compared to what I’m used to on my 2012 MacBook Air.

Game Boy Advance

Cross-compiling GBA stuff using pacman worked flawlessly, obviously in Rosetta mode. I doubt it will ever be released natively. Cross-compiling the whole gba-sprite-library, including four demo projects, took 15343ms. I was surprised that this worked without any problems, and a Rosetta-enabled mGBA happily plays my binaries! On the 2012 laptop, it takes more than twice that long: 32950ms.

Arduino

After finding not so promising Reddit posts, I had to try it out myself. A Github issue tells us Rosetta is supported and “somewhere in the future” native support should be coming - Linux ARM64 builds are already available.

After installing the Arduino IDE (which runs on a JRE, by the way), right-clicking and pressing “Get Info” reveals Kind: Application (Intel). It boots up fairly slowly, but compiling and uploading work without problems. Performance is a non-issue here, you won’t be compiling megabytes of C code anyway.

JavaScript

Node 15.5.0 and its package manager have native bottles uploaded in the master Homebrew repository. Everything works flawlessly after a brew install npm. Do yourself a favor and install a Chromium-based browser to check out Lighthouse.

Go

Virtualbox For Mac M11

It’s been a while since I programmed in Go, but Dids created a gist entitled “Compile Go for Apple Silicon (M1)', where he explains how to compile Go natively. I have yet to try it out.

Python

Although python 3.8 comes included with Big Sur, python 3.9 compiled without any issues from source using Homebrew. However, since OSX always seems to come with an annoyingly old 2.7 version, you have to create a symlink in /usr/local/bin to set the default version to 3.9. You may also need to re-link Python:

Writing

Hugo extended works like a charm on ARM64. Pfew!

As for my needed LaTeX tools: the MacTeX about ARM page tells me that full native support will arrive in spring 2021. Until then, Rosetta to the rescue (it also requires 6.7GB…). I do hope that switching will not be problematic, as I can’t wait until then.

As for pandoc that converts my Markdown to LaTeX, compiling from source downloads the x86_64 version of the GHC Haskell compiler. As expected, compilation crashed:

So, I reverted to the x86 installer pkg, which seems to work fine. After the necessary installations, I re-compiled a recently accepted ICSE paper (involving make, pandoc, panflute, pdflatex, bibtex, yaddayadda), and it took 7700ms on the 2012 Air, while the Rosetta x86_64 version took 4447ms. Consider me happy! It will be very interesting to see this number further reduced in spring 2021.

Virtualization

The universal memory structure of the M1 architecture has its advantages, but these obviously fade when dual booting. Furthermore, using something like VirtualBox gets you into further trouble by evenly splitting RAM. It looks like VirtualBox support will never be coming as it requires a x86 CPU.

Alternative options are Parallels, which has a technical preview already published, and VMWare Fusion, which announced on Twitter that they’re working on it.

As of now, there is no possibility for me to run my virtual image of Linux for the Operating Systems course I’m teaching. I guess I’ll be using a Dell laptop for this purpose… I don’t mind, my 2012 MacBook Air didn’t have the required memory to comfortably work with it anyway, so I already resorted to another machine.

Edit 25 jan. 20121: Eleanor pointed me towards a gist to get qemu running on M1. This means it is possible to run Windows 10 and Ubuntu Server on your ARM Mac! On performance: A simple factorial program in ghci is noticeably faster on Ubuntu (ARM64) via qemu than on MacOS via Rosetta. Follow Sevarg’s recent guide to get Ubuntu running under QEmu!

So… Is it worth it?

It depends. If you’re like me, and you have been waiting for a long time to upgrade, now is the best possible time to take the plunge. However, if you already own a more recent MacBook (I hope it’s with a decent keyboard: this one types lovely, compared to my wife’s 2017 butterfly keyboard on the MacBook Pro - what a train-wreck), it might be a better idea to wait half a year.

Virtualbox For Mac M1

Currently, with the software I daily use, about 50% of them are running under Rosetta. It is impressive nonetheless: it is seamless and still very fast - except if you’re a Java developer and somehow have to support JavaFX. Don’t forget that the M1 chip comes with other awesome perks:

Virtualbox For Mac M1 Chip

  • 18h battery life (more like 10+ with regular compile jobs, but still great)
  • Greatly improved screen compared to my 2012 laptop
  • I finally bought a QUERTY one.
  • 8GB is more than 4GB.
  • We used the 2020 Air to video-call (using browser-based Jitsi) over Christmas, while we used the 2012 Air during Christmas Eve - the fan went on and it crashed once.
  • The instant-on effect is amazing, compared to waiting up to ten seconds.
  • I can finally play Baldur’s Gate III!

Like Kay said: Black. Magic. Fuckery!