# ​Multipass虚拟机配置教程

### **一、查看默认配置**

#### 注意：以下 ubuntu-niulink 是示例虚拟机名称，这个名称随着业务改变而不同

```bash
bash
# 确认目标虚拟机名称及当前状态
multipass list

# 查看CPU核心数（默认2核）
multipass get local.ubuntu-niulink.cpus

# 查看内存容量（默认2G）
multipass get local.ubuntu-niulink.memory

# 查看存储空间（默认64G）
multipass get local.ubuntu-niulink.disk

```

**说明**：默认配置适用于轻量级场景，边缘算力场景需根据硬件资源动态调整。

***

### **​二、动态调整配置**

1. ​**查看虚拟机状态**

   ```bash
   bash
   # 确认目标虚拟机名称及当前状态
   multipass list
   ```

2. ​**停止相关服务与虚拟机**

   ```bash
   bash
   # 停止虚拟机
   multipass stop ubuntu-niulink
   ```

   ​**注意**：停止服务可避免资源冲突，确保配置修改安全生效。

3. ​**调整资源配置**

   ```bash
   bash
   # 设置CPU核心数（需小于物理核心数，建议预留20%资源给宿主机）
   multipass set local.ubuntu-niulink.cpus=20  

   # 注意单位应为数值而非"20G"

   # 设置内存容量（建议不超过物理内存的70%）
   multipass set local.ubuntu-niulink.memory=32G

   # 设置存储空间（需考虑本地磁盘剩余容量）
   multipass set local.ubuntu-niulink.disk=500G
   ```

4. ​**启动验证**

   ```bash
   bash
   # 检查资源配置是否生效
   multipass start ubuntu-niulink
   multipass info ubuntu-niulink
   ```

***

**​**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.titanapp.info/titan-network-zhong-wen/4-ce-jia-li-le-ce-shi-wang/wang-luo-pei-zhi-you-hua/zhong-guo-qu-yu/multipass-xu-ni-ji-pei-zhi-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
