> For the complete documentation index, see [llms.txt](https://cube.ewelink.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cube.ewelink.cc/english-zh/kuai-su-kai-shi/quickstart/xu-ni-ji/virtualbox.md).

# VirtualBox

{% embed url="<https://www.youtube.com/watch?v=ZRNFkle69BI>" %}

### 1. 准备：

{% stepper %}
{% step %}
**下载** CUBE OS **镜像**

访问此 [仓库](https://github.com/eWeLinkCUBE/CUBE-OS/releases/latest) 以下载最新的  `.vdi` 镜像。下载后请解压镜像。
{% endstep %}

{% step %}
**安装虚拟机**

下载并安装虚拟机管理程序，推荐使用 [VirtualBox](https://www.virtualbox.org/wiki/Downloads) 。

<img src="/files/44c37c5f9bdbe5b14fe4fbe357a1e4df8cbd2c85" alt="" data-size="original">

> 有其他虚拟机管理器吗？理论上也可以使用以下步骤。\
> 不熟悉虚拟机且拥有树莓派吗？您可以选择在 [树莓派](/english-zh/kuai-su-kai-shi/quickstart/shu-mei-pai.md)上安装 CUBE 操作系统。 \
> 如果这些选项都不可行，您可以购买一台 [iHost](https://sonoff.tech/products/sonoff-ihost-smart-home-hub/58) ，其内置 CUBE 操作系统，可在 SONOFF 官方网站或亚马逊等平台上购买。
> {% endstep %}

{% step %}
**Zigbee 适配器（可选）**

如果需要添加 Zigbee 设备，请准备一个 Zigbee 加密狗。已测试的 Zigbee 加密狗包括：

> SONOFF ZBDongle-MAX\
> SONOFF ZBDongle-PMG24\
> SONOFF ZBDongle-LMG21\
> SONOFF ZBDongle-E\
> SONOFF ZBDongle-P\
> [列出的其他项](https://darkxst.github.io/silabs-firmware-builder/) 由开发者 @darkxst 提供&#x20;

{% hint style="info" %}
有关 Zigbee 配置和兼容性的更多信息，请参阅此 [指南](/english-zh/jian-rong-xing-jian-cha/zigbee.md).
{% endhint %}
{% endstep %}
{% endstepper %}

### 2. 创建虚拟机：

{% stepper %}
{% step %}
启动 VirtualBox

<img src="/files/066eda2803c8754d71718cafdfbb2ae997665fc7" alt="" data-size="original">
{% endstep %}

{% step %}
选择“新建” <img src="/files/3205749942e9bb1595174665cfeecbacf119e475" alt="" data-size="line"> 或使用快捷键“Ctrl + N”。
{% endstep %}

{% step %}
为虚拟机命名，类型选择“Linux”，子类型选择“Other Linux”，版本选择“Other Linux (64-bit)”。

<img src="/files/f7bf10ec3e3bff5d475bddacda72f32235f3c7e8" alt="" data-size="original">
{% endstep %}

{% step %}
在“硬件”下，分配虚拟机的内存大小和处理器数量。建议 4GB 内存和 2 个 CPU。然后启用 EFI。

<img src="/files/78f45fe1a9eef7c5951fed8d2e828553e7c53570" alt="" data-size="original">

{% hint style="info" %}
重要：确保启用 EFI；否则 CUBE OS 无法启动。
{% endhint %}
{% endstep %}

{% step %}
在“硬盘”下，选择使用现有的虚拟硬盘文件，并选择从 [准备步骤 1](#id-1-preparation)

<img src="/files/e2d279db9d0d89d6e70e54f23e6e80d80a6c6e73" alt="" data-size="original">
{% endstep %}

{% step %}
中解压得到的 .vdi 文件。
{% endstep %}
{% endstepper %}

### 点击“完成”以创建虚拟机。

{% stepper %}
{% step %}
3\. 配置虚拟机： <img src="/files/dda3ad4959af3049c566b7c15bfc59d06a9cbae8" alt="" data-size="line"> 选择刚创建的虚拟机并点击“设置”

<img src="/files/0e87582a5e9e8742c82c6a07afa6d0b6d56e3b9f" alt="" data-size="original">
{% endstep %}

{% step %}
按钮。

<img src="/files/c705eb33486f0fe3deea5a98cae9b3dc3d278acb" alt="" data-size="original">
{% endstep %}

{% step %}
在“网络”选项卡下，将网络连接配置为“桥接网卡”，并选择你正在使用的网络适配器。&#x20;

<img src="/files/5142e7229e4963cdda62e84a6af5498ef6153cdf" alt="" data-size="original">
{% endstep %}

{% step %}
**在“声音”下，启用音频并选择默认选项作为控制器。** 可选：

<img src="/files/0803d0bbb023b6f5ca9c9e5ae4ade2a399d32884" alt="" data-size="original">
{% endstep %}

{% step %}
对于 Zigbee 加密狗的使用，请在此步骤插入 Zigbee 加密狗，并在“USB”下选择正确的控制器类型。在 USB 过滤器中，通过侧边的添加按钮添加所需的 Zigbee 加密狗。
{% endstep %}
{% endstepper %}

### 点击“确定”保存配置。

{% stepper %}
{% step %}
4\. 启动 CUBE OS <img src="/files/03e1a626a70bc05c3be5a2ef10e2e6a83ab11350" alt="" data-size="line">.

<img src="/files/e39aeea1c3f8888ca8031052251eff798b3b4ba3" alt="" data-size="original">
{% endstep %}

{% step %}
点击“启动”按钮

<img src="/files/d77cb75cddf958a3073240dcb6a39f534ecb2853" alt="" data-size="original">
{% endstep %}

{% step %}
监视启动屏幕直到启动完成。 [完成后，你将在屏幕上看到 CUBE OS 的 IP。使用该 IP 地址或](http://cube.local) cube.local

<img src="/files/318227da0068604d82bdeb649a2004eec1d7a72c" alt="" data-size="original">
{% endstep %}

{% step %}
访问 CUBE OS 的网页管理界面。 `成功访问后，可在设置页面查看一个短 ID。随后，可使用`cube-{short id}.local

<img src="/files/4251c0d8002c8e776b39172e658dbe31af281e38" alt="" data-size="original">
{% endstep %}
{% endstepper %}


---

# 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://cube.ewelink.cc/english-zh/kuai-su-kai-shi/quickstart/xu-ni-ji/virtualbox.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.
