> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up an Ubuntu Server VM on an Arm64 Mac

UTM is an open-source VM host for macOS<sup>®</sup>, which allows you to run other operating systems on Macs, including Ubuntu. The following figure shows the tasks involved in setting up an Ubuntu Server VM using UTM on an Arm64 Mac:

<Frame caption="Figure: Workflow to set up an Ubuntu Server VM on an Arm64 Mac">
  <img
    src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/set-up-an-ubuntu-vm-on-an-arm64-based-mac.svg?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=18405ede6b05bac8d053a48ae98204ed"
    alt="Workflow to set up Ubuntu VM
on an Arm64-based Mac"
    width="1150"
    height="240"
    data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/set-up-an-ubuntu-vm-on-an-arm64-based-mac.svg"
  />
</Frame>

## **Prerequisites to set up an Ubuntu Server VM on an Arm64 Mac**

* Ensure that your host computer meets the system requirements listed in [Host computer requirements for Arm64 Mac](#host-computer-requirements-for-arm64-mac).
* Download the necessary software listed in [Ubuntu Server VM software requirements for Arm64 Mac](#ubuntu-server-vm-software-requirements-for-arm64-mac).

### **Host computer requirements for Arm64 Mac**

The following table lists the host computer requirements to set up an Ubuntu Server VM on an Arm64 Mac:

**Table: Arm64 host computer system requirements**

| **Requirement**        | **Specification**                                                                                                       |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Processor architecture | Arm64<br /><br />To verify that the architecture of your Mac is Arm64, run the `uname -a` command in a terminal window. |
| CPU cores              | 8 or more                                                                                                               |
| RAM                    | 8 GB or more                                                                                                            |
| Storage                | 400 GB of free space for the UTM VM                                                                                     |
| Operating system       | macOS 14                                                                                                                |

### **Ubuntu Server VM software requirements for Arm64 Mac**

The following table lists the software requirements to set up an Ubuntu Server VM on an Arm64 Mac:

**Table: Software requirements for Arm64 Mac**

| **Software**                                                       | **Description**                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UTM virtualization software                                        | Download the UTM virtualization software from the [UTM website](https://mac.getutm.app/).                                                                                                                                                                                                                        |
| Ubuntu Server International Organization for Standardization (ISO) | Use one of the Ubuntu 22.04 64-bit Arm<sup>®</sup> (ARMv8/AArch64) Server LTS versions. Qualcomm recommends that you download the latest version of Ubuntu Server 22.04 ISO (for example, `ubuntu-22.04.5-live-server-arm64.iso`) from the [Ubuntu website](https://cdimage.ubuntu.com/releases/22.04/release/). |

## **Install UTM on an Arm64 Mac**

To install the UTM virtualization software, do the following:

1. Double-click the `UTM.dmg` file downloaded earlier and drag the **UTM** icon onto the **Applications** icon.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-utm-on-mac1-updated.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=55e989982a850e7d917a7f17f3cb5872" alt="Drag UTM icon onto Applications" style={{width: '60%'}} width="682" height="435" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-utm-on-mac1-updated.png" />

2. While installing UTM, if you see the following dialog, select **Open**:

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-utm-on-mac2.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=6836b202ddd2262f3b3faa30d0c296c5" alt="UTM installation open dialog" style={{width: '45%'}} width="368" height="373" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-utm-on-mac2.png" />

3. Open Launchpad, search for **UTM**, and select **UTM**.

   The UTM main window appears.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-utm-on-mac3.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=3513932633040a3a7dd792d36d1632ca" alt="UTM main window" style={{width: '60%'}} width="769" height="605" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-utm-on-mac3.png" />

## **Create a VM in UTM on an Arm64 Mac**

To create a VM for Ubuntu Server in UTM and configure the VM settings, do the following:

1. In the UTM main window, select **Create a New Virtual Machine**.
2. On the **Start** screen, select **Virtualize**.
3. On the **Operating System** screen, select the **Linux** OS.
4. On the **Hardware** screen, specify the memory and CPU cores you want to assign to the Ubuntu VM, and select **Continue**. The recommended values are as follows:
   * Memory: About 70% of the available memory
   * CPU cores: At least 50% of the available cores
     If you leave the **CPU Cores** field blank or set it to `0`, UTM allocates all the host computer cores to the VM. Allocating all CPU cores to the VM can make the host computer slow or unresponsive.
     To check the memory size and the CPU core count of a Mac host computer, see the instructions in the [macOS User Guide](https://support.apple.com/en-in/guide/mac-help/syspr35536/mac).
5. On the **Linux** screen, browse and select the Ubuntu ISO image you downloaded, and select **Continue**.
6. On the **Storage** screen, specify the drive size for the VM, and select **Continue**. Qualcomm recommends that you assign at least 400 GB of storage space for the VM.
7. If you want to share a directory between the host computer and the VM, do the following on the **Shared Directory** screen:
   1. Browse and select the directory.
   2. Select **Continue**.
8. On the **Summary** screen, do the following:
   1. Review the configuration summary for the VM that you're creating.
   2. Provide a name for the VM.
   3. Select **Save**. The UTM main window lists the newly created VM.

      <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/create-a-vm-in-utm.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=d67c3081a8d9b6f2fbc9450d1abd4b1c" alt="UTM main window with newly created VM" width="1012" height="119" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/create-a-vm-in-utm.png" />

## **Install Ubuntu Server in UTM on an Arm64 Mac**

To install Ubuntu Server in the VM you created, do the following:

1. In the UTM main window, select the **Play** icon to run the Ubuntu ISO image through virtualization.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac1.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=ba0e537dfe568cfea54d9eb321e76bc2" alt="UTM main window with Play icon" width="1010" height="117" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac1.png" />

2. Select **Try or Install Ubuntu Server** using the arrow keys and select **Enter**.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac1.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=98519c8cf0e4881209a0662e151f3122" alt="Try or Install Ubuntu Server option" width="290" height="98" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac1.png" />

3. Choose a language and select **Enter**.

4. Optional: You may see a screen to update the installer. Choose one of the following options and select **Enter**:
   * **Update to the new installer**
   * **Continue without updating**

5. Do the following:
   1. Choose a keyboard layout.
   2. Select the **Ubuntu Server** installation base.
   3. Select the appropriate network interface.
   4. Select the appropriate proxy configuration.

6. If necessary, configure the mirror address and wait until the mirror location passes all the tests, select **Done**, and select **Enter**.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac2.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=59ce8efbc38ca759dc18cf3d80661837" alt="Mirror address configuration" style={{width: '85%'}} width="889" height="552" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac2.png" />

7. Select **Use an entire disk** > **Set up this disk as an LVM group**, select **Done**, and select **Enter**.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac3.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=c8b3c6906f1085f7528ebe7350dc0dc6" alt="Storage configuration with LVM group" style={{width: '85%'}} width="852" height="527" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac3.png" />

8. Configure the storage space as follows:
   1. Under the **USED DEVICES** section, select **ubuntu-lv**, and select **Enter** to view more options.

      <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac4.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=2ced91a16d52503477bb9f374fdded08" alt="USED DEVICES section with ubuntu-lv" width="3024" height="1964" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac4.png" />

   2. Select **Edit**, and select **Enter**.

      <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac5.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=1fda98b061515523fc34d45aa20cf5cf" alt="Edit option for ubuntu-lv" width="2032" height="310" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac5.png" />

   3. In the **Size** field, type `396.000G`, select **Save**, and select **Enter**. The updated size should now reflect for the ubuntu-lv entry.

   4. Select **Done** and select **Enter**.

9. To set up your profile, specify the required details, select **Save**, and select **Enter**.

10. Skip the **Ubuntu Pro** upgrade option, select **Continue**, and select **Enter**.

11. Optional: Select **Install OpenSSH Server** to set up SSH, select **Done**, and select **Enter**.
    **Note**
    OpenSSH isn't required for syncing, compiling, and flashing Qualcomm Linux. Install the OpenSSH server only if you want to allow secure remote access for the Ubuntu VM.

12. After the installation is successful, select the **Power** icon to shut down and stop the VM, and select **OK**.

    <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac2.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=bfca6ef6a805625b56f9c9560b809ed1" alt="Power icon to shut down VM" width="1044" height="33" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac2.png" />

13. After the VM stops, close the window.

## **Run the Ubuntu Server VM on an Arm64 Mac**

To run the Ubuntu Server VM, do the following:

1. In the UTM main window, in the **CD/DVD** drop-down list, select **Clear**.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac9.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=de63c961a6f63b9a86c050bf083c69d4" alt="CD/DVD drop-down with Clear selected" style={{width: '80%'}} width="549" height="258" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac9.png" />

2. Ensure that the ISO image association is empty against the CD/DVD option.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac4.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=2f985938c6cb9d8fdf9d4b759a7cd9bb" alt="Empty ISO image association" width="1020" height="67" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac4.png" />

3. To run the Ubuntu VM, select the **Play** icon.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac5.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=043d9d6f266146fa75ebf9d4e21cdbdb" alt="Play icon to run Ubuntu VM" width="1020" height="120" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-intel-based-x86-64-mac5.png" />

4. After the Ubuntu operating system boots successfully, enter the credentials to sign in and access the shell.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac10.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=2aa6e4af505329a3b7790cada92d0f9c" alt="Ubuntu login screen" width="252" height="55" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/install-ubuntu-on-vm-on-arm64-based-mac10.png" />

5. Run the following commands to update the Ubuntu operating system and install the graphical desktop environment, followed by a restart:
   ```text theme={null}
   sudo apt update && sudo apt upgrade -y
   ```
   ```text theme={null}
   sudo apt install ubuntu-desktop -y
   ```
   ```text theme={null}
   reboot
   ```

6. Sign in to the Ubuntu Server VM you created.

## **Access the Qualcomm Linux development kit**

To access the Qualcomm Linux development kit from the Ubuntu Server VM, do the following:

1. Connect the Qualcomm Linux development kit to the host computer.

   The UTM software may ask you to confirm whether the Ubuntu operating system should have access to the Qualcomm Linux development kit.

   a. If you see a dialog as follows, select **Confirm**:

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm1.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=1090b69fb54f8a821ede94ba3205a231" alt="Confirm dialog for Qualcomm Linux development kit access" width="258" height="297" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm1.png" />

   b. After selecting **Confirm**, if you see the following USB disconnection error, select **OK** to ignore it:

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm3.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=c357e80d3aafe84dc16adb917c7f9eae" alt="USB disconnection error dialog" width="516" height="434" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm3.png" />

2. To verify if the Ubuntu VM can access the Qualcomm Linux development kit, run the `lsusb` command in a Ubuntu terminal window.

   The output shows the Qualcomm Linux development kit as follows:

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm2.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=18f252a827ceba7a0f0d7a99c44b8728" alt="lsusb output showing Qualcomm Linux development kit" width="605" height="205" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm2.png" />

   If the Qualcomm Linux development kit isn't detected in the Ubuntu VM, do the following:

   a. Select **USB Devices** in the toolbar of the UTM VM window.

   b. Select **QCMXXXX\_xxxxxxxx**.

   <img src="https://mintcdn.com/qualcomm-prod/Im5W2pUR5LdqxAI6/Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm4.png?fit=max&auto=format&n=Im5W2pUR5LdqxAI6&q=85&s=8efab792a1616a4142719b40de57ded0" alt="USB Devices menu with QCMXXXX device" width="542" height="244" data-path="Key-Documents/Virtual-Machine-Setup/media/k2c-qli-vm-setup/access-rb3-gen-2-device-from-the-utm-vm4.png" />

If you don't see the Qualcomm Linux development kit listed as one of the USB devices, do the following:

1. In UTM settings, select **Input** in the left panel.
2. In the **Maximum Shared USB Devices** field, set the value to `10`.

## **Configure power settings for Arm64 Mac and Ubuntu Server**

To ensure that the Mac host computer and the Ubuntu Server VM don't go to sleep due to inactivity, do the following:

* To configure the sleep and wake settings for the Mac host computer, see [macOS User Guide](https://support.apple.com/en-in/guide/mac-help/mchle41a6ccd/mac).
* To configure the power settings for Ubuntu Server, do the following:
  1. In **System Settings** for Ubuntu, select **Power**.
  2. Turn off **Automatic Suspend**.

## **Next steps**

* [Sync, build, and flash Qualcomm Linux](https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/flash-with-qdl)
* [Fix network failures in the Ubuntu VM](./troubleshoot-host-computers-and-virtual-machines#fix-network-failures-in-the-ubuntu-vm)
* [Optimize slow or unresponsive Mac host computer](./troubleshoot-host-computers-and-virtual-machines#optimize-slow-or-unresponsive-mac-host-computer)
