> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/knowledge-base/zh/tenants/sharing-a-vm-into-a-tenant.md).

# 将虚拟机共享到租户中

VergeOS 提供了一种简便的方法，可将虚拟机（VM）映像从父环境共享到位于当前环境下方的租户中。请按照以下步骤完成此任务：

## 共享 VM 的步骤

1. **导航到 VM 仪表板**:
   * 转到您想要移动到租户中的 VM 的仪表板。
2. **正常关闭 VM**:
   * 在移动之前，最佳做法是先按照来宾操作系统的最佳实践正常关闭 VM。
3. **创建快照**:
   * 在 VM 仪表板中，展开 **快照** 左侧导航菜单中的内容，以访问快照命令。
   * 点击 **创建快照** 以启动 **机器快照** 创建界面。
4. **完成快照创建**:
   * 在“机器快照”创建界面中，填写必填字段：
     * **机器**：您正在移动的虚拟机。
     * **名称**：为快照提供一个唯一名称。
     * **过期日期**：设置快照将自动删除的日期/时间。
   * 点击 **提交** 以创建快照。
5. **共享 VM 快照**:
   * 单击 **提交**后，您将进入新创建的快照仪表板。
   * 在此视图中，点击 **共享 VM** 在左侧导航菜单中，以启动 **共享对象** 创建界面。
6. **创建共享对象**:
   * 在 **新建共享对象** 创建界面中，填写必填字段：
     * **名称**：为该 VM 的快照命名一个独特的名称。
     * **类型**：选择 **虚拟机**.
     * **快照**：这应与快照创建时提供的名称一致。
     * **接收方**：选择您要将 VM 共享到的租户。
   * 点击 **提交** 以创建共享对象。
7. **访问租户环境**:
   * 使用网页浏览器，导航到共享了快照对象的租户环境。
   * 使用正确的身份验证凭据登录。
8. **在租户中创建新的虚拟机**:
   * 在租户环境中，导航到 **机器** > **虚拟机**，然后点击 **新建** 以开始创建新的虚拟机。
9. **从共享对象导入**:
   * 在 **新建虚拟机** 创建界面，在 **选择类型**，选择 **-- 从共享对象导入 --**.
   * 在 **可用选择项** 部分中，选择之前创建的共享对象，然后点击 **下一步**.
10. **完成虚拟机设置**:
    * 在 **虚拟机设置** 界面中，填写必填字段：
      * **共享对象**：选择之前创建的共享对象。
    * 点击 **提交** 以在租户中创建新的虚拟机。

***

***

{% hint style="info" %}
**文档信息**

* 最后更新：2024-08-29
* vergeOS 版本：4.12.6
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.verge.io/knowledge-base/zh/tenants/sharing-a-vm-into-a-tenant.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
