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

# 排查主机和虚拟机故障

解决主机或 Ubuntu VM 中可能出现的常见问题。

## **修复 Ubuntu VM 中的网络故障**

有时，在主机没有网络问题的情况下，Ubuntu VM 中可能会出现网络故障。Ubuntu VM 中正在进行的任何编译都可能因此出现获取（fetch）失败。

要在 Ubuntu VM 中重新建立网络，请执行以下操作：

1. 要查找对应的网络接口，请在 Ubuntu 终端窗口中运行 `ip link` 命令。
   Ubuntu 终端窗口会返回一个网络接口。例如 enp0s1。
2. 要在 Ubuntu VM 中重新建立网络，请使用该网络接口并运行以下命令：
   ```text theme={null}
   ip link set dev <network_interface> down
   ```
   ```text theme={null}
   ip link set dev <network_interface> up
   ```
   例如：
   `ip link set dev enp0s1 down`
   `ip link set dev enp0s1 up`

## **优化缓慢或无响应的 Mac 主机**

如果 Mac 主机运行缓慢或无响应，可能是 UTM VM 正在消耗主机的所有可用资源。

要排查此问题，请执行以下操作之一：

* 使用推荐设置重新配置 Ubuntu VM 的内存和 CPU 核心分配。有关说明，请参阅[在 Arm64 Mac 上的 UTM 中创建 VM](./set-up-an-ubuntu-server-vm-on-an-arm64-mac#create-a-vm-in-utm-on-an-arm64-mac)中的第 4 步。

* 重新配置 Ubuntu VM 设置，使 Ubuntu VM 和主机以最优方式使用可用资源。例如，在主机和 VM 之间平均分配内存和 CPU 核心。
  此外，在使用 Ubuntu VM 时，请避免在主机上运行 CPU 密集型任务。
