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.
Navigate to Deployment > Devices.
Select Device Image List in the right corner.
Select Add Device Type (you will find all available options in the device type list).
Select the device type you would like to create an image file for and get started.
The status while creating your image file is building and changes to available once the image is ready.
The image creation process can take up to 10 minutes.
The device image will appear in your device image list.
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.
Install VirtualBox on your server or development machine, then complete the following steps:
Create a new virtual machine, setting the type to "Other Linux 64-bit".
Select a comfortable RAM size, such as 4096 MB.
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.
When your new virtual machine is created, navigate to Settings and adjust the defaults to:
Enable I/O APIC (this is required in order to use multiple CPUs and only works with the Generic x86_64 device type)
Enable EFI
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 viso_genericx86-64-ext-x.xx.x+revx.prod.img represents the image download from the Viso workspace: VBoxManage convertdd viso_genericx86-64-ext-x.xx.x+revx.prod.img viso_genericx86-64-ext-x.xx.x+revx.prod.vmdk --format VMDK
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.
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.
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.
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.
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.