Virtual Device using VirtualBox

Virtual Device using VirtualBox

Viso Setup

Add a New Device

Device images are used to add edge devices to your workspace. In your workspace, you can generate Device Images for specific Edge Device Types (more precisely for the specific system architectures).

If no physical device is available or for quick testing, a VM created using VirtualBox can be used as a device.

The device image contains mechanisms for your device to register to your workspace automatically. To create a new device image, follow these steps:

The Generic x86_64 device type can be used to create a VM device.

Create the Viso Device Image
  1. Navigate to Deployment > Devices.

  2. Select Device Image List in the right corner.

  3. Select Add Device Type (you will find all available options in the device type list).

  4. Select the device type you would like to create an image file for and get started.

  5. The status while creating your image file is building and changes to available once the image is ready.

  6. The image creation process can take up to 10 minutes.

  7. The device image will appear in your device image list.

  8. Download the image to the same machine that VirtualBox is or will be installed on.

You will find more information about creating your device image here.

VirtualBox Setup

Install VirtualBox on your server or development machine, then complete the following steps:

  1. Create a new virtual machine, setting the type to "Other Linux 64-bit".

  2. Select a comfortable RAM size, such as 4096 MB.

  3. Do not add a virtual hard disk yet. The VM will require two disks: One to become the main operating system (Viso image) and one to serve as an initial boot device. You'll create those in later steps. Skip straight to Create the VM.

  4. When your new virtual machine is created, navigate to Settings and adjust the defaults to:

    1. Enable I/O APIC (this is required in order to use multiple CPUs and only works with the Generic x86_64 device type)

    2. Enable EFI

    3. Enable Hardware Clock in UTC Time

    4. Click on the processor tab and select the required number of CPUs.

    5. Navigate to the Network menu option and select one of the following two options:

      1. NAT - this option works well for most use cases and can be used for a quick setup. The device will be able to connect to Viso and will be fully operational but the device will not have its own IP address and will not be able to be accessed on the local network.

      2. Bridged - the device will get its own IP address on the local network. This option requires the host to be connected to a dhcp server and to have the bridge driver installed as part of the VirtualBox installation. This option is needed to view video streams from the device on the local network.

    6. The Viso image you downloaded earlier cannot be used directly in VirtualBox because it contains internal partitions. You must unzip the file and convert it to a virtual hardware image using the VBoxManage tool and create a Virtual Machine Disk (VMDK) file where represents the image download from the Viso workspace: VBoxManage convertdd --format VMDK

    7. With the new .vmdk file created, return to your VirtualBox virtual machine settings and add a new SATA storage controller and a virtual hard disk. Choose the Virtual Hard Disk (VHD) format and make the disk at least 20 GB in size. Ensure that the disk is added as SATA Port 0.

    8. Now, add the .vmdk image file you created in the previous step as a second SATA hard disk ("Choose existing disk") and ensure it is on SATA port 1. When you're done, the hard disk setup should look like the configuration below. This disk can be removed after the device has been registered on the Viso workspace and reused to create subsequent additional VM devices.

    9. Finally, your virtual machine is ready to run! Click on start the VM. It will go through a boot sequence and then it will shut down, this is normal.

    10. Restart the VM and wait until it has booted and you'll see a Viso splash screen, which tells you the system has booted your .vmdk file and is flashing the filesystem to your primary virtual SATA disk.

    11. The device will download the Viso Agent and register with your Viso workspace. This can take anywhere from 5 or 10 minutes to a few hours depending on the speed of your internet connection. When the download has been completed a new device will appear in your Viso workspace, its status should be green showing that it is online (like the shy-brook device in the screenshot below).

Everything is now ready for an application to be deployed to the device!

You can create as many virtual machines for your Viso workspace as allowed by your subscription by repeating the steps above but reusing the VMDK that was created from the downloaded Viso image. i.e. the VBoxManage convertdd step only needs to be performed once and the VMDK attached and detached again after each device is online.

Similar steps should work with other virtualization tools such as VMware. Just make sure to create a system hard disk that's separate from the application image from which you initially boot.

This approach is useful for local development, trying hardware (shared through VirtualBox with the virtual machine), or quickly creating a fleet of devices.

    • Related Articles

    • Available Device Actions (Device Management)

      You can manage a single or multiple devices using our built-in device management capabilities. To execute device actions, follow these steps: Navigate to Deployment > Devices (side panel of your workspace) Select one single device and click on the ...
    • Device Status

      Concept: Every device has a device status (main status) and a Connection status The status can change over time, based on actions or events (e.g. the user does something). In the UI, we show the color bullet as red or green for the connection status ...
    • Add a New Device

      Device images are used to add edge devices to your workspace. In your workspace, you can generate Device Images for specific Edge Device Types (more precisely for the specific system architectures). The device image contains mechanisms for your ...
    • Local Configuration of Devices

      After you have built and deployed an application to your edge devices, you might want to change couple of settings of your application which are specific to one single device. However, to achieve that you might not want to change the underlying ...
    • Assign a Profile to Devices

      If you want to deploy an Application to an edge device, you will have to assign a Profile to the specific device(s). The device(s) will then pull the necessary packages one's it comes online. There's two ways to assign a Profile to Device(s), follow ...