# 虚拟机搭建文档

在 Windows^®^ 或 Mac^®^ 主机上搭建 Ubuntu 虚拟机 (VM)，以同步、编译和刷写 Qualcomm^®^ Linux^®^ 软件。

## VM 搭建概述

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> VM 搭建高级概述

提供何时需要搭建 Ubuntu VM 的高级概述。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/getting-started.html#vm-setup-overview

## 在 Windows 上搭建 Ubuntu VM

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 Windows 上搭建 Ubuntu VM 的先决条件

在 Windows 主机上搭建 Ubuntu VM 前，请先验证硬件和软件要求。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-windows-subsystem-for-linux-on-windows-11.html#prereq-windows

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 WSL 中安装 Ubuntu

使用 Windows Subsystem for Linux (WSL) 在 Windows 主机上验证并安装 Ubuntu 22.04。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-windows-subsystem-for-linux-on-windows-11.html#install-ubuntu-22-04-linux-distribution

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 配置 WSL 全局设置

配置 WSL 设置：内存、处理器和交换存储。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-windows-subsystem-for-linux-on-windows-11.html#conf-global-sets-for-wsl

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 配置 WSL 中的 Ubuntu 设置

配置 WSL 的 DNS、Git 和本地设置。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-windows-subsystem-for-linux-on-windows-11.html#conf-ubuntu-sets-for-wsl

## 在 Arm64 Mac 上搭建 Ubuntu Server VM

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 Arm64 Mac 上搭建 Ubuntu Server VM 的先决条件

在 Arm64 Mac 主机上搭建 Ubuntu VM 之前，请验证硬件和软件要求。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-arm64-based-mac.html#arm64-based-mac-host-system-and-software-requirements

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 Arm64 Mac 上安装 UTM

在 Arm64 Mac 主机上安装 UTM 虚拟化软件。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-arm64-based-mac.html#install-utm-on-mac-on-arm64-based-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 Arm64 Mac 上的 UTM 中创建 VM

在 Arm64 Mac 主机上的 UTM 中搭建并配置 VM。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-arm64-based-mac.html#create-a-vm-in-utm-on-an-arm64-based-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 Arm64 Mac 上的 UTM 中安装 Ubuntu Server

使用 Ubuntu ISO 镜像在 Arm64 Mac 主机上的 VM 中安装 Ubuntu Server。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-arm64-based-mac.html#install-ubuntu-on-vm-on-arm64-based-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 访问 Qualcomm Linux 开发套件

将 Qualcomm Linux 开发套件连接到 Arm64 Mac 计算机，并从 Ubuntu Server VM 进行访问。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-arm64-based-mac.html#access-rb3-gen-2-device-from-the-utm-vm-for-arm64-based-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 配置 Arm64 Mac 和 Ubuntu Server 的电源设置

配置相关设置，以防止 Arm64 Mac 计算机和 Ubuntu Server VM 因空闲而进入休眠状态。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-arm64-based-mac.html#configure-power-settings-arm64

## 在 x86\_64 Mac 上搭建 Ubuntu VM

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 x86\_64 Mac 上搭建 Ubuntu VM 的先决条件

在 x86\_64 Mac 主机上搭建 Ubuntu VM 之前，请验证硬件和软件要求。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-intel-based-x86-64-mac.html#intel-based-x86-64-mac-host-system-and-software-requirements

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 x86\_64 Mac 上安装 UTM

在 x86\_64 Mac 主机上安装 UTM 虚拟化软件。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-intel-based-x86-64-mac.html#install-utm-x8664-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 x86\_64 Mac 上的 UTM 中创建虚拟机

在 x86\_64 Mac 主机上的 UTM 中搭建并配置 VM。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-intel-based-x86-64-mac.html#create-a-vm-in-utm-x8664-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 在 x86\_64 Mac 的 UTM 中安装 Ubuntu

使用 Ubuntu ISO 镜像在 x86\_64 Mac 主机上的 VM 中安装 Ubuntu。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-intel-based-x86-64-mac.html#install-ubuntu-on-vm-on-intel-based-x86-64-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 访问 Qualcomm Linux 开发套件

将 Qualcomm Linux 开发套件连接到 x86\_64 Mac，并从 Ubuntu VM 进行访问。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-intel-based-x86-64-mac.html#access-rb3-gen-2-device-from-x86-64-based-mac

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 配置 x86\_64 Mac 和 Ubuntu 的电源设置

配置相关设置，以防止 x86\_64 Mac 和 Ubuntu VM 因空闲而进入休眠状态。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/set-up-an-ubuntu-vm-on-an-intel-based-x86-64-mac.html#configure-power-settings-x8664

## 排除主机和虚拟机故障

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 修复 Ubuntu VM 中的网络故障

解决 Ubuntu VM 中的间歇性网络问题，其可能导致进行中的编译失败。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/troubleshoot.html#fix-network-failures-in-the-ubuntu-vm

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16" fill="none" aria-label="icon3">
  <path d="M8 2V14M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z" stroke="#2A2AEA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> 优化运行缓慢或无响应的 Mac 主机

检查 UTM VM 是否占用了全部资源，从而导致 Mac 主机速度变慢。

https://docs.qualcomm.com/doc/80-70020-41SC/topic/troubleshoot.html#slow-or-unresponsive-host

Last Published: Jul 22, 2025

[Next Topic
虚拟机搭建概述](https://docs.qualcomm.com/bundle/publicresource/80-70020-41SC/topics/getting-started.md)