Run Ubuntu Vm On Mac

Posted on  by 



On a Mac, you must open Virtual Machine - Settings. And choose Sharing to bring up a dialog where you can add the folders you want to be visible in Ubuntu. Just choose your home folder. Then turn on the file sharing button (or turn off and on again). Go to Ubuntu and check if you can see all your host system's files in /mnt/hgfs/. Download VirtualBox. Visit www.virtualbox.org/wiki/Downloads. Under VirtualBox binaries. Install macOS in the virtual machine. When you're done close Disk Utility, and you'll get to the macOS Utility dialog again. From this dialog choose Reinstall macOS. Click Continue a couple of times and you'll get to a screen where you must choose the HDD formatted in step 4: Next, click Install and the installation will begin: The virtual.

  1. Mac Install Ubuntu
  2. Ubuntu On Mac Mini

In this blog post we’re going to create a Ubuntu 20.04 VM using QEMU on MacOS.

Note for users on macOS 11.0: follow this post first to get qemu to run.

Mac

QEMU is a hardware emulator which can make use of different accelerators when running VMs. The most popular accelerator is KVM which is built into the Linux kernel and allows Linux hosts to run VMs with native performance.

Using QEMU on macOS used to be very slow as no accelerator was available. This changed 2 years ago when the project added support for the macOS native hypervisor with Hypervisor.framework (HVF) as an accelerator.

Before we begin with the setup I assume that the Ubuntu 20.04 Desktop ISO has been downloaded in the current working directory.

QEMU Installation

We can use Homebrew to install QEMU. The version we’re using in this tutorial is 5.1.0:

It will pull in a few dependencies (the package depends on 14 other packages) and the installation can take a few minutes.

Create the disk image

Once the installation is done, we can create the disk image that we’re going to install Ubuntu on.

We’re using the QCOW2 format to create a 20GB image. This can be resized later on if needed. The Ubuntu installation took around 5GB of space when I installed it.

Boot machine with Ubuntu ISO mounted

We can now boot up the machine with the Ubuntu ISO attached as a

In this step we boot up the machine with the Ubuntu ISO mounted in the CD drive:

The options are:

  • -machine: The emulated machine and the accelerator. q35 is the newest machine type and HVF is the macOS native hypervisor.
  • -smp: Number of CPUs to use
  • -m: Amount of memory to use
  • -hda: Disk drive (the one we created earlier)
  • -cdrom: The ISO image to put into the CD drive
  • -vga: The graphic card to use. I found virtio (based on Virgil to have the best performance
  • -usb: Enable USB host controller
  • -device Adding a “usb-tablet” as an input device. I’m running this on a laptop and without this setting the mouse did not work.
  • -display: To show the mouse cursor (disabled by default)

During testing I had problems with the Linux kernel as it would panic during the boot process. The issue was the -cpu parameter. I fixed it by specifying the CPU architecture manually (see qemu-system-x86_64 -cpu help for a list of all available architectures).

My machine has an IvyBridge processor (Core i7): Min kyung lee.

And using -cpu IvyBridge would fail. However when using -cpu Nehalem (also an i7 CPU) everything worked well.

Now after the machine is booted up the Ubuntu installer will run. Follow the installation steps and don’t restart the VM at the end of the installation, instead shut it down by stopping the qemu process with CTRL-C on the host.

Boot without ISO mounted

When running the VM we don’t need the Ubuntu ISO mounted and can remove it by leaving out the -cdrom option:

Conclusion

In my experience QEMU is faster, more responsive and uses less CPU/RAM than VirtualBox. I didn’t have to configure any display scaling for HiDPI screens as it worked out of the box. The only thing I’m missing are shared clipboards and drag-and-drop of files (which are available when installing the VirtualBox Guest Additions).

We’ve outlined how to run Linux on Mac® and how easy it is to get started!

Linux is an incredibly versatile operating system that has been designed to run on a wide range of devices—from mobile devices, to desktop computers, and even servers. Due to the open-source nature that ensures code has active community support, Linux is widely loved by developers. Think of Linux as an operating system “of the people, by the people, for the people.” (Yes, we just quoted the Gettysburg Address to enable readers to understand Linux as a whole.)

Users online have expressed a desire to run Linux on their Mac computer without rebooting. This is where Parallels Desktop® for Mac enters as a solution. Virtualization of Linux is a powerful and easy installation process that allows for an interruption-free environment.

Parallels Desktop provides several popular distributions of Linux for free directly in the product itself. Additionally, Parallels Desktop users can download .ISO files of and install other Linux distributions (for example: Kali Linux & use Vagrant to download and setup Linux environments like a pro!)

Run ubuntu vm on mac m1

The free included systems are shown below. There’s no need to take any additional steps to find the right Linux distribution for you. We’ve made it very easy to run Linux on Mac!

Ubuntu: One of the most popular open-source softwares; based on the Debian GNU/Linux distribution.

Fedora: Formerly Fedora Core. Based on the Linux kernel, developed by the community-supported Fedora project, and sponsored by Red Hat.

Mac Install Ubuntu

CentOS: Provides a stable, predictable, manageable, and reproducible platform.

Debian GNU/Linux: A popular Unix-like operating system that is composed entirely of free software, which is utilized for personal computers and network servers.

Linux Mint: An easy-to-use free distribution that requires little maintenance and goes with full multimedia support.

Android: A Linux-based operating system for mobile devices, such as smartphones and tablet PCs.

All of these Linux distributions are free and easy to install as a virtual machine on your Mac through Parallels Desktop. Linux distributions can be located under the “Free Systems” options available to users within the Installation Assistant when creating a new virtual machine. See the full list of free systems below:

Ubuntu On Mac Mini

Get started with Linux on Mac with Parallels Desktop and try a free 14-day trial now.





Coments are closed