# VirtualBox

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

### 1. Preparation:

{% stepper %}
{% step %}
**Download the** CUBE OS **image**

Visit this [repo](https://github.com/eWeLinkCUBE/CUBE-OS/releases/latest) to download the latest  `.vdi` image. Please extract the image after downloading.
{% endstep %}

{% step %}
**Install Virtual Machine**

Download and install a virtual machine manager, with [VirtualBox](https://www.virtualbox.org/wiki/Downloads) being recommended.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FaRb8fgybrqGWHbtYS7YU%2FScreenshot%202024-11-15%20133236.png?alt=media&#x26;token=54f2c0f8-d8f6-4ecb-a3f9-400521078928" alt="" data-size="original">

> Have other virtual machine managers? The following steps can theoretically be used as well.\
> Unfamiliar with virtual machines and owning a Raspberry Pi? You can choose to install CUBE OS on a [Raspberry Pi](https://cube.ewelink.cc/getting-started/quickstart/raspberry-pi). \
> If none of these options are viable, you can purchase an [iHost](https://sonoff.tech/products/sonoff-ihost-smart-home-hub/58) with built-in CUBE OS from the SONOFF official website or platforms like Amazon.
> {% endstep %}

{% step %}
**Zigbee Adapter (Optional)**

If you need to add Zigbee devices, prepare a Zigbee Dongle. Tested Zigbee Dongles include:

> SONOFF ZBDongle-MAX\
> SONOFF ZBDongle-PMG24\
> SONOFF ZBDongle-LMG21\
> SONOFF ZBDongle-E\
> SONOFF ZBDongle-P\
> [Others listed](https://darkxst.github.io/silabs-firmware-builder/) by developer @darkxst&#x20;

{% hint style="info" %}
For more information on Zigbee configurations and compatibility, please refer to this [guide](https://cube.ewelink.cc/compatibility-check/zigbee).
{% endhint %}
{% endstep %}
{% endstepper %}

### 2. Create a Virtual Machine:

{% stepper %}
{% step %}
Launch VirtualBox

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FZGI9rJk8IUxEdgk3npBQ%2FScreenshot%202024-11-15%20175848.png?alt=media&#x26;token=1966adf2-b3d5-42d0-9896-56d5ccebc601" alt="" data-size="original">
{% endstep %}

{% step %}
Select “New” <img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FoNVMloCDlR1eHIbFH3zx%2FScreenshot%202024-11-18%20at%2015.03.19.png?alt=media&#x26;token=586123c1-ea41-4a98-9bb7-7d77cf06af8c" alt="" data-size="line"> or use the shortcut “Ctrl + N”.
{% endstep %}

{% step %}
Name the virtual machine, select “Linux” as the type, “Other Linux” as the subtype, and “Other Linux (64 bit)” as the version.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Fbi2Agh2bcH28tGqszTr3%2FScreenshot%202024-11-15%20175947.png?alt=media&#x26;token=12f50209-ea01-4a50-8102-56714e01dc79" alt="" data-size="original">
{% endstep %}

{% step %}
Under “Hardware”, allocate the memory size and processor count for the virtual machine. 4GB memory and 2 CPUs are recommended. Then, enable EFI.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Fo92nbBZaaLAmS2rolN9I%2FScreenshot%202024-11-15%20180009.png?alt=media&#x26;token=b25ab9c3-4f48-4a32-b562-2041d0cf5586" alt="" data-size="original">

{% hint style="info" %}
Important: Ensure EFI is enabled; otherwise, CUBE OS will not boot.
{% endhint %}
{% endstep %}

{% step %}
Under “Hard Disk”, choose to use an existing virtual hard disk file and select the .vdi file extracted from [Preparation Step 1.](#id-1-preparation)

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FAjeZx31FP1Rn7liZNbNZ%2FScreenshot%202024-11-15%20180529.png?alt=media&#x26;token=90a1a7ff-a8ad-4bc8-a089-753736235af1" alt="" data-size="original">
{% endstep %}

{% step %}
Click “Finish” to create the virtual machine.
{% endstep %}
{% endstepper %}

### 3. Configure the Virtual Machine:

{% stepper %}
{% step %}
Select the created virtual machine and click the “Settings” <img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FbCq5o9wm5cZdaXqZgccV%2FScreenshot%202024-11-18%20at%2015.19.16.png?alt=media&#x26;token=7427dab3-d960-4840-87d8-e9cc2c744919" alt="" data-size="line"> button.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2F0PSwNRH0LaXpjrpXNFzy%2FScreenshot%202024-11-18%20151129.png?alt=media&#x26;token=a556ce67-64d0-4392-a780-cc757a60c462" alt="" data-size="original">
{% endstep %}

{% step %}
Under the “Network” tab, configure the network connection as “Bridged Adapter” and select the network adapter you are using.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FOGiUj6l2kVAaaV1PPymk%2FScreenshot%202024-11-15%20180610.png?alt=media&#x26;token=ed4d08ae-a349-47ae-a9d5-0ae426cd4eec" alt="" data-size="original">
{% endstep %}

{% step %}
Under “Audio”, enable sound and choose the Default option as the controller.&#x20;

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FMm18yjdoBCAdBrW9LfPG%2FScreenshot%202024-11-18%20151206.png?alt=media&#x26;token=7c32ee24-cf6c-4d5f-9275-65a0e3665c37" alt="" data-size="original">
{% endstep %}

{% step %}
**Optional:** For Zigbee Dongle usage, insert the Zigbee Dongle at this step and select the correct controller type under “USB”. In the USB filter, add the necessary Zigbee Dongle using the add button on the side.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Fc9DMGFIHx7v78szyPBrI%2FScreenshot%202024-11-18%20151754.png?alt=media&#x26;token=f785e096-8cf4-40c4-aa9d-d509c952c616" alt="" data-size="original">
{% endstep %}

{% step %}
Click “OK” to save the configuration.
{% endstep %}
{% endstepper %}

### 4. Boot CUBE OS

{% stepper %}
{% step %}
Click the "Start" button <img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Fclrx0CtpJQxoVq5wOL9j%2FScreenshot%202024-11-18%20at%2015.23.20.png?alt=media&#x26;token=3f60b611-86a8-4e2f-917d-96d776d71c8a" alt="" data-size="line">.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2F2t6UwuTSigCxRm4IjKQg%2FScreenshot%202024-11-18%20151129%20copy.png?alt=media&#x26;token=6d622e6c-88e3-4020-bf93-a49989fa6482" alt="" data-size="original">
{% endstep %}

{% step %}
Monitor the boot screen until the boot is complete.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FQwVa8ZvQR1dReJTIzIsb%2FScreenshot%202024-11-18%20152604.png?alt=media&#x26;token=439aa522-de74-4147-84a7-6c02c0fac499" alt="" data-size="original">
{% endstep %}

{% step %}
Once completed, you will see the CUBE OS' IP displayed on the screen. Use this IP address or [cube.local](http://cube.local) to access the CUBE OS Web management page.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FZbb6mFwPaMSDIRqzexaK%2FScreenshot%202024-11-15%20180746.png?alt=media&#x26;token=8bffc2eb-f774-4ac7-8916-1d04c07e405f" alt="" data-size="original">
{% endstep %}

{% step %}
Upon successful access, a short ID can be viewed on the settings page. Subsequently, access the CUBE OS Web management page using `cube-{short id}.local`, which is useful for differentiating multiple CUBE OS instances on the same local network.

<img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FXJi8azaU8jWkoxymkz8K%2FScreenshot%202024-11-18%20at%2011.33.14.png?alt=media&#x26;token=eb4c5fc2-307f-41d9-b0c7-ccefb6d3ad73" alt="" data-size="original">
{% endstep %}
{% endstepper %}
