Run Linux On Mac Virtual Machine



With the newly released M1 Macs, there have been lots of questions about being able to run other operating systems on it, particularly from developers that are used to running Window or Linux in Virtual Machines using virtualization on their Intel Macs. So what challenges do the M1 Macs bring in this regard?

You can run Linux on an M1 Mac if you have the patience A USB drive is just the start of the requirements. How to install macOS in a virtual machine (QEMU) on Linux using Sosumi snap package 1. Install the Sosumi snap package: sudo snap install sosumi -edge Why edge? In my test, the macOS virtual machine did. Run Sosumi for the first time by typing sosumi in a terminal. This is only required the.

If you are new to all this, it is important to understand the parts involved. First there are virtual machines, which act as virtual computers running on a main or host computer. Second, there are the instruction sets for the computer and OS. These virtual computers run an operating system (OS) of some kind and in most cases this OS has to have the same instruction set as the host computer. This allows the instruction to be passed through the VM to the CPU and allows for good performance. Which is what makes it so easy to run Windows 10 x86 on an Intel Mac — they both are using Intel CPUs with the same instruction sets.

Run Linux On Mac Virtual Machine

But what if the instruction sets differ as they do with Intel and M1 Macs? Obviously you can no longer pass an x86 instruction to an M1 chip and expect anything to happen. So some translation or emulation needs to happen. This is typically much, much slower.

In general this is what Apple is doing with Rosetta 2 on Big Sur to allow your x86 Mac apps to run on an M1 Mac. They do an entire app translation on first launch (and also re-do it at times) and then run the translated app. This is a great technique but it doesn’t really work at a virtual machine level. And in fact, Apple specifically says that Rosetta 2 cannot be used with virtualization software.

That’s the bad news. But there are options on the horizon.

Emulation

The first option is OS-level emulation. What would happen here is that emulation software (say, QEMU, a popular open-source emulator and virtualizer) would translate x86 instructions to ARM instructions (usually on-the-fly) so that an x86 operating system could run on an M1 Mac. In theory this would allow Windows 10 x86 for example to run as a (virtual computer) on an M1 Mac.

Technically this is more than a theory since it has been done before. You may remember it was possible to run Windows 98 x86 on a PowerPC Mac back in the day using software such as Connectix Virtual PC. The downside to this approach is that it can be quite slow. Fortunately the M1 Macs are proving to be very speedy and might be able make this technique acceptable for casual use. I expect the QEMU project will be updated to eventually allow emulation of x86 operating systems on M1 Macs.

OS Vendors

You might remember in the WWDC 2020 keynote Apple showed Linux running as a virtual machine with Parallels on an M1 Mac. This demo was actually running an ARM Linux distro in that virtual machine. Since it was not an x86 distro, its usefulness depends on its ability to run the apps you need. If you wanted to run an x86 Linux app then it would not work on an ARM distro.

However, the OS vendors are working on this. Much like what Apple did with Rosetta 2, they can add OS-level support to translate individual apps from x86 to ARM, thus allowing them to work in a virtual machine. I haven’t heard of progress on this front with Linux, but I expect there will be some convoluted way to do it at some point.

Microsoft does have an ARM version of Windows, but right now it is only licensed for OEM use to include with a computer, so virtualizing it is not yet an option. And even if you could virtualize ARM Windows on your M1 Mac, it also is only useful to you if it can run the apps you want.

Currently ARM Windows has a translator that lets it run 32-bit x86 apps, but performance is poor, especially when compared to what Apple has done with Rosetta 2 in Big Sur. Microsoft has said they are working on adding the ability to run 64-bit x86 apps on ARM Windows, but that feature is not ready yet and performance is unknown.

I expect virtualizers such as Parallels, VMware and VirtualBox will all eventually have versions that run on M1 Macs and can run ARM operating systems, although perhaps just Linux to start. I don’t expect them to include emulators in their products.

Update (2020-4-14): Parallels has just released 16.5 with support for running Windows for ARM on M1 Macs.

Run linux on mac virtual machines

When Microsoft adds 64-bit x86 translation and has it working at a decent speed and if it decides to make ARM Windows available for use in virtual machines then you would also be able to run Windows on an M1 Mac and run common Windows apps. But for now, we wait.

Update (2020-12-08): Some progress continues to be made on this. Here are some rough instructions on how to get Windows ARM running in a VM (UTM running on QEMU).

Other Options

Another option is the CodeWeavers product that is based on the WINE open-source project. This project essentially provides a translated Windows API that allows some Windows apps to run on a Mac. It does not run Windows itself, only apps, and only a small subset at that.

But because it translates the apps to essentially a Mac x86 app, they are a candidate for Rosetta 2 on Big Sur to translate. That’s a lot of levels of translation, but in the end you end up with a Windows app running on an M1 Mac.

CodeWeavers recently posted some information about their early testing of this.

Wrap Up

With all this said, if you require the ability to run an x86 version of Windows or Linux, then an M1 Mac cannot be your sole machine at this time. You’ll either want to also have an Intel Mac to run those in virtual machines or get dedicated separate hardware for them.

And if you want to make your own native apps for M1 Macs, Xojo now has the ability to create native apps for M1 Macs.

If you want to run Windows on your Mac there are two ways to do it. One is to partition your main drive using the built-in Bootcamp Assistant and then install Windows on the partition that doesn’t house macOS. You can then boot into whichever operating system you choose.

While that method means running Windows natively and so is optimal in terms of performance, it means you have to reboot every time you want to move between operating systems and you can’t, for example, copy and paste between macOS and Windows. If you want to run Windows and macOS side by side, you’ll need to create a Windows virtual machine for Mac.

What is a virtual machine?

Virtual

A virtual machine (VM) is a computer that’s created in software and looks and feels just like a real PC. But it runs inside a Mac application. The whole virtual machine, with the operating system and all its applications, is stored inside one big file on your Mac. That means you can have multiple virtual machines on the same Mac. Once you launch it and ‘boot’ the virtual PC, Windows VM on Mac behaves like any other Windows machine, except that it’s running inside a window on your Mac.

If you have two screens connected to your Mac, you can have macOS on one and Windows on the other. Or you can use Mission Control to swipe between them. A virtual machine can share accessories like printers and external storage with your Mac, and you can copy and paste between the two operating systems. You can even set up the virtual machine to use Mac keyboard shortcuts instead of their Windows equivalents.

Mac

Can I run a virtual machine on my Mac?

As long as your Mac has an Intel processor (and it will have unless it’s more than 12 years old), in theory it can run a virtual machine. However, running a virtual machine alongside macOS needs lots of memory (at least 8GB in total, and more if you want to run more than one virtual machine) and at least two processor cores. You’ll also need at least 16-20GB of hard drive space, and that’s before you start installing applications and saving files. Most modern Macs should run any of the virtual machine applications described here without a problem.

Mac Os Vm On Linux

The other thing you’ll need is a copy of Windows. Virtual machine applications don’t come with Windows installers, so you’ll need to supply your own, along with a licence key.

Best virtual machine software for Mac

There are three contenders here: Parallels Desktop, VMWare Fusion, and VirtualBox. We’ll discuss Virtual Box in the next section.

Parallels Desktop 13

The latest version of Parallels Desktop has support for features in the latest Macs, like the MacBook Pro’s Touch Bar. It also allows you to make the Windows desktop ‘invisible’ when you’re running apps, so it looks like you’re just running Windows apps in macOS. Or, if you prefer, you can shrink Windows desktop down to a thumbnail preview, so it doesn’t get in the way but you can keep an eye on what it’s doing.

Of course, virtual machines aren’t just about running Windows on your Mac. Parallels Desktop allows you to install Linux, or a different version of macOS, say a beta of the next version if you don’t want to install it on your Mac. If you’ve previously installed Windows on a Boot Camp partition, you can use that partition as a virtual machine, allowing you to boot into it from within Parallels without re-booting your Mac.

Touch Bar support includes functions in Microsoft Office apps, as well as Windows Task Bar.

When it comes to performance, Parallels Desktop is about as good as it gets for virtual machines. That means you can run most applications just fine, but demanding 3D graphics-intensive games, and other apps that place lots of demands on the CPU and GPU are still a bit of a struggle. If you want to run those in Windows, you’re still better off using Boot Camp.

VMWare Fusion

The other main contender when it comes to running a virtual machine on your Mac is VMWare Fusion. It comes in two versions, Fusion 10, which costs about the same as Parallels Desktop, and Fusion 10 Pro, which is more expensive but adds feature aimed at enterprise customers, such as support for managing virtual servers.

In terms of features, there’s little to choose between Parallels Desktop and Fusion. Like its rival, Fusion allows you to choose between running Windows inside a window on your Mac (or full-screen if you prefer) and in what it calls Unity mode, where the operating system disappears and Windows apps look like they’re running natively on the Mac. That means you can run Windows and Mac apps alongside each other and switch between them seamlessly. You can also copy and paste between Mac and Windows, share peripherals, and map Mac keyboard shortcuts in Windows.

Support for OpenGL and DX10, as well as Apple’s Metal technology means that playing resource-hungry games is theoretically possible. But, as with Parallels, performance in the latest games lags behind Boot Camp and may prove frustrating.

The latest version of Fusion adds support for the MacBook Pro’s Touch Bar.

Choosing between Parallels Desktop and VMWare Fusion may be as much a matter of a preference for one or the other’s user interface. They have very similar features, and cost almost the same. Fortunately, both offer free trials — Parallels for 14 days and Fusion for 30 days — so you can download each one and try them out before making a decision on which to buy.

Best free virtual machine software for Mac

If you want to run a virtual machine on your Mac but can’t stretch to the $70 for Parallels or Fusion, there is a third option — VirtualBox. Owned by Oracle and made available as open-source software for personal or educational use, VirtualBox won’t cost you a penny if you fall into either of those two categories.

That’s the good news. The bad news is that VirtualBox, because it’s open source and free lacks all of the polish of Parallels Desktop and VMWare Fusion. While it does the basics competently, it’s much less user friendly and much less easy to use than the other two. And while there is help available online from other users, there’s no official support if you run into problems. And remember, while VirtualBox itself is free, you’ll still need to supply your own copy of Windows. Alternatively, you could use VirtualBox to run Linux on your Mac, instead of Windows.

Alternatives to a virtual machine

As we mentioned earlier, the alternative to running a virtual machine on your Mac is to partition your main drive using the built-in Boot Camp Assistant (it’s in the Utilities folder). You can then install Windows or Linux, or another version on macOS, on the other partition.

Best Virtual Machine To Run Linux On Mac

Boot Camp Assistant is very easy to use and once you’ve set it up, booting into, say, Windows, is just like using it natively on a PC. That means, of course, that you won’t be able to copy and paste between Mac and Windows, and you won’t be able to use external storage that’s formatted in APFS or Mac OS Extended, but Windows will run faster than it does on a virtual machine.

If you plan to use Boot Camp Assistant to partition your main drive, remember to back it up first. Partitioning a drive is not quite major surgery, but it definitely carries the risk of losing data.

How to make space for a virtual machine on your Mac

Run Linux On Mac Virtual Machine Download

Depending on how many applications you plan to install on your virtual machine and what you plan to use it for, you may need tens of gigabytes of free space on your Mac. If space is tight, don’t worry, there’s plenty you can do to make room. As a first step, we recommend installing CleanMyMac X. It scans your Mac and looks for files that can be safely deleted. These include “junk” system files like cache files and other temporary files that are still hanging around, as well as language support files, and data in Photos and iTunes you may not need. Once it’s scanned your Mac and found all those files, you can delete them all with a click, or review the results of the scan and decide for yourself what you want to trash.

Linux Virtual Machine On Mac

CleanMyMac can also uninstall files completely, getting rid of all the files that are left if you just drag and app to the Trash, and highlight large and old files that you haven’t opened for a while. Best of all, you can download it free here and give it a try. You’ll be surprised about how much space you can free up.

Run Macos On Linux Virtual Machine

Virtual machines are the most convenient way of running a second operating system on your Mac. The ones we have highlighted here are the best VMs for Mac, so download one and give it a go.