Virtualbox for mac linux

How to Run an Ubuntu Linux Virtual Machine on macOS running M1/M2 processor.

This guide will walk through the complete steps for configuring a Linux Ubuntu VM on M1/M2 Mac computers. To be precise, we will cover all the required steps to customize your first Linux VM to run in quickly.

Here are the steps at a high level before you start.

  • Install the Virtualization platform, UTM
  • Get an ARM-supported OS iso
  • Configure a Linux VM on M1/M2 mac
    • Getting started with UTM
    • Choose Virtualization option
    • Choosing the OS flavour
    • Linux VM Configuration
    • Hardware customization – Memory & CPU
    • Storage size settings
    • Shared Directory
    • Configuration Summary
    • Start the OS installation
    • Running the Ubuntu installer

    Step #1 Install a Virtualization platform

    Software Virtualization has two primary components:

    1. Host Machine, in our case, this is your m1 / m2-based macOS
    2. Guest Machine, also called Virtual Machine or VM – in our case, is Ubuntu Linux.

    The virtualization platform facilitates the guest os, a Virtual environment. Here we use UTM, so you can run a complete sandbox environment inside your Virtual Machine without impacting any other files on your host-machine base OS.

    We have chosen UTM for ARM-based macOS since it is an Open source and a free solution. (there are other platforms available, such as Parallels and VMware Fusion).

    1. Download the free version of UTM virtualization software for your Apple silicon
    2. Install the UTM app on your macOS.

    If you are using the UTM App on mac for the first time, I would recommend you to go to this article first:

    Step #2 Get an ARM-supported OS iso

    You would require an ARM-supported Linux Operating system to run Linux on M1/M2-based Mac.

    Ubuntu and many other OS currently support arm architecture, and we will use Ubuntu in this guide.

    Step #3 Configuring a Linux VM on M1/M2 mac

    VM config step #1 Getting started with UTM

    Firstly, Open your UTM app, and open a new VM creation menu (the plus symbol)

    As mentioned before, please refer to this complete guide on UTM if required. Here is a preview of what the UTM Virtual Machine app console looks like:

    mac virtualization console - utm

    UTM Virtualization on m1 mac

    VM config step #2 Choose Virtualization option

    New VM customization menu, select the Virtualize option.

    VM Virtual vs emulate option selection

    VM config step #3Choosing the OS flavour

    Under the Operating System selection, select Linux since we will be using Ubuntu Linux as our guest OS.

    VM guest os selection

    VM config step #4 Linux VM Configuration

    From here on, you will get an advanced Linux VM customization menu.

    From the first page, map your Ubuntu iso file, as shown below.

    UTM Virtualmachine, mapping the ISO image

    You can download the latest version of Ubuntu ARM isos from the official pages, and links are given below.

    VM config step #5 Hardware customization – Memory & CPU

    Memory – Under Hardware, you can set the RAM – Memory. I recommend leaving it at the default value (4096 or 4GB).

    CPU Selection – again, do not change this unless you are aware of the performance issue to your host OS if you add more virtual CPUs to the guest.

    VM hardware settings

    VM config step #6 Storage size settings

    I saw the default value is set to 64GB. If this is not suitable for you, you may change it. Please note the space you allocate here will be occupied by your host machine disk.

    VM storage settings

    VM config step #7 Shared Directory

    UTM provides a feature to share your MacOS directory with the Linux Guest. I did not use this feature here in this guide for simplicity.

    VM shared directory settings

    VM config step #8 Configuration Summary

    Finally, you will get a summarized view of your advanced VM configurations. You may edit it here, or a few options would be editable even after creating the VM.

    VM configuration summary

    VM config step #9 Start the OS installation

    Your Virtual Machine hardware is ready with this step. You may change the settings or start the installation.

    VM Ubuntu ready to start

    VM config step #10 Running the Ubuntu installer

    When you are ready to start the OS installation, just click the play button and your OS installation menu will come, just like you are installing an OS on a physical computer.

    Ubuntu VM starting the installation

    You can follow the OS installation menu options to complete the Ubuntu installation step. I recommend you choose the default options provided by the install Wizard if you are unsure of your changes.

    FAQ: Can I change the VM hardware setting after the OS installation

    Yes! When the VM is in the stopped state, you can change most of ( not all ) the VM configurations after the Guest OS iinstallation.

    Conclusion

    This how-to guide has covered all steps required to run an Ubuntu Virtual Machine on macOS m1/m2 ARM architecture using UTM Virtualization. My experiment used a MacBook Pro M2, with 16GB Memory and 512GB SSD. The Ubuntu VM performance is excellent. Good luck with your new Virtual Machine development environment!

    The latest

    Источник

    How to Install Ubuntu on Your Mac Using VirtualBox

    This in depth guide will take you every step of the way through installing Ubuntu Linux on your Mac, by way of VirtualBox – a free and outstanding program. Using this method you’ll be able to run Ubuntu and macOS at the same time!

    Please note: although this guide was initially authored in 2015, it has been updated (2020) to be current. The following guide uses Ubuntu 18.04.3 LTS “Bionic Beaver”, but the steps and screenshots are nearly identical for most versions of Ubuntu, up to including 20.04.1 LTS.

    Using this method to install Ubuntu not only allows you to run it and macOS at the same time, you can really try out Ubuntu – and if you don’t like it – very easily get rid of it. Plus, it will not affect the files in macOS itself at all. None of the data on your Mac is at risk of being deleted or altered. The entire process is actually quite straightforward – and all of the software involved is free – so why not give it a shot 🙂

    1. Before you get started, there are a few things that should be noted up front.
      1. Depending on the speed of your Internet connection, it might take a while to download Ubuntu. During the actual installation process, based on the version of Ubuntu you opt to install – you may have to spend some time downloading updates as well.
      2. The installation time is about 20 minutes, depending on the speed of your Mac, amount of memory etc. You may want to make yourself a cup of coffee or tea before you start.
      3. Running both Ubuntu and macOS at the same time will “slow down” your Mac. The more memory you have and the faster your CPU and/or hard drive is, the less you’ll notice it.
      1. First up, head over to the Ubuntu download page and download Ubuntu.
      2. Now you’ll need to download and install VirtualBox. Visit their download page and click the link OS X hosts (which is the current stable version). Once the download has completed, open the .dmg file and run the installer – the installation is as easy as clicking ‘next’ a bunch of times. When installation is done, launch VirtualBox from your Applications folder.
      3. When VirtualBox opens, click the New button.

      the main VirtualBox window with an arrow pointing at the New button

      setting options for an Ubuntu in VirtualBox on a Mac

      allocating memory for a VM in VirtualBox

      creating a virtual hard drive in VirtualBox

      selecting a VM disk type

      an arrow pointing to a Continue button

      allocating drive space to an Ubuntu VM

      a macOS dialogue window with an arrow pointing to the Open System Preferences button

    2. If you’re using macOS 10.15 (Catalina) or later, you’re going to need to ‘allow’ Virtualbox to receive keystrokes from any application (which is completely safe). Click the Open System Preferences button.
    3. Click the ‘lock’ icon in the bottom left corner of the screen. After entering your password, place a check in the box next to the Virtualbox item in the list.

      an arrow pointing to a Later button

      an arrow pointing to a folder icon in VirtualBox

      a grant permissions window in macOS

    4. IF VirtualBox crashes right around now, or in the next step or two – check out the 13 minute 45 second mark of this video (link will open in a new tab/window). Hopefully there are no crashes and everything goes smoothly, but there is a known issue with Big Sur that may arise.
    5. Again, if you’re using macOS 10.15 or later, you’ll be prompted to grant permission for Virtualbox to access a folder. Click OK. You may be prompted to do this several more times – just click OK each time.
    6. Navigate to the Ubuntu .iso file that you downloaded all the way back in step #1. Select it, and click Open

      Источник

      How to use Linux on your Mac using a virtual machine

      Linux on Mac

      With virtualization, you can install and use various operating systems on your Mac, including Windows and Linux. For the latter, we recommend using the latest version of Parallels or open-source VirtualBox. Here’s a look at how to install and use Linux using each option.

      What is virtualization?

      As I noted in a previous post, software virtualization allows you to simulate a hardware environment and run multiple operating systems on one computer. In doing so, these virtual machines can take advantage of the hardware components on a computer such as RAM and storage in complete isolation to the primary operating system.

      For those wanting to install Linux on their Mac through virtualization, we recommend using the latest version of Parallels or open-source VirtualBox. The former offers an easier-to-install solution, but you must pay for it after a 14-day free trial. The latter is open-source and free, but more difficult to install. Regardless, each solution will get the job done.

      Installing Linux through Parallels

      Using Parallels 15 for Mac, you can install a copy of Linux on your computer following the directions below. These steps assume Parallels has already been installed on your machine.

      1. Click File on the Parallels toolbar.
      2. Select New
      3. Highlight Download Ubuntu Linux under Free Systems.
      1. Click Continue.
      2. Choose Download to download a copy of Linux onto your computer.

      Once installed, Linux want you to add a new password for the «Parallels» user. You can also choose «Not Listed?» to add a new UNIX user. Regardless, sign into your UNIX account.

      1. Type in your newly created password in the Parallels Tools box.
      2. Click OK.
      1. Restart your virtual machine at the prompt.

      You can now use Ubuntu Linux on your Mac using Parallels.

      Installing Linux through VirtualBox

      To install a virtual copy of Linux on your Mac using the open-source VirtualBox, do the following. These steps assume VirtualBox has already been installed on your machine:

      1. Click New in VirtualBox.
      2. Add a name for your virtual copy of Linux.
      3. Choose Linux as the type of installation.
      4. Select the version of Linux to use.
      5. Click Continue
      1. Choose a Memory Size. Use the suggested minimum or select another number up to your maximum. The more memory you allocate for your virtual operating system, the speedier it will be.
      2. Select Continue.
      3. Choose the Create a virtual hard disk now radio dial.
      4. Click Create.
      1. Confirm VDI (VirtualBox Disk Image) as your hard drive file type.
      2. Select Continue.
      3. Confirm Dynamically allocated for storage.
      1. Choose file location and size
      2. Select Create.

      The steps above are just the first part of installing Linux on your Mac. You must now download a copy of Linux to work with VirtualBox to finish the process:

      1. Download Ubuntu Desktop from the Ubuntu website.
      2. Click Download next to the latest LTS version.
      3. Confirm to download.

      Once downloading this file is complete, go back into VirtualBox.

      1. Highlight the Linux instance on the left side of the VirtualBox Manager.
      2. Choose Start.
      3. Click on the File Icon on the pop-up screen.
      4. Select Add at the top left.
      1. Find, then highlight the Ubuntu file you just downloaded.
      2. Choose Open.
      1. With the new file highlight, select Choose.
      2. Select Start.

      From there, following the online directions provided by Ubuntu to finish the installation.

      Adjust the settings

      Depending on your Mac version and age, you may need to adjust the VirtualBox settings for Linux to make the window bigger. To do so, you must first exit the Linux installation. From there:

      1. Highlight the Linux virtual intallation on the main VirtualBox screen.
      2. Choose Settings.
      3. Select Display.
      4. Change Scale Factor from 100% to 200%.
      5. Click OK.
      1. Click Start to start Linux on your Mac.

      You can now change the screen size for your Linux installation and begin using the oeprating system on your Mac.

      Which should you choose?

      Having installed Linux through both Parallels and VirtualBox on my MacBook Pro, I can tell you the process is easier through Parallels. As you can see above, there are much fewer steps to install Linux through Parallels. The result is the same once the operating system gets installed, however.

      If you’re already using Parallels on your Mac (to use Windows, for example), you should continue to do so for Linux. The process is simple, and easy-to-follow. However, if you’re looking for a free solution or are new to virtualization, consider VirtualBox. Just go into it know you’ll need to follow a few more steps.

      Questions?

      Do you have any questions? Let us know in the comments below.

      Get more iMore in your inbox!

      Our news, reviews, opinions, and easy to follow guides can turn any iPhone owner into an Apple aficionado

      By submitting your information you agree to the Terms & Conditions and Privacy Policy and are aged 16 or over.

      Источник

      Читайте также:  Linux add exist user to group
Оцените статью
Adblock
detector