Virtual Machines

Virtual machines are the core of Zerynth. From the point of view of the ZTC, a virtual machine is a binary blob to be flashed on a device in order to enable Zerynth code execution. Virtual machines are tied to the unique identifier of the device microcontroller, therefore for each microcontroller a specific virtual machine must be created.

Virtual machines can be managed with the following commands:

Create a Virtual Machine

Virtual machine can be created with custom features for a specific device. Creation consists in requesting a virtual machine unique identifier (vmuid) to the Zerynth backend for a registered device.

The command:

ztc vm create alias version rtos

executes a REST call to the Zerynth backend asking for the creation of a virtual machine for the registered device with alias alias. The created virtual machine will run on the RTOS specified by rtos using the virtual machine release version version.

It is also possible to specify the additional option --feat feature to customize the virtual machine with feature. Some features are available for pro accounts only. Multiple features can be specified repeating the option.

If virtual machine creation ends succesfully, the virtual machine binary is also downloaded and added to the local virtual machine storage. The vmuid is printed as a result.

List Virtual Machines

The list of created virtual machines can be retrieved with the command:

ztc vm list

The retrieved list contains at most 50 virtual machines.

Additional options can be provided to filter the returned virtual machine set:

  • --from n, skip the first n virtual machines
  • --core_dep version, returns only the virtual machines compatible with Zerynth version version.

Virtual Machine parameters

For each device target a different set of virtual machines can be created that takes into consideration the features of the hardware. Not every device can run every virtual machine. The list of available virtual machines for a specific target can be retrieved by:

ztc vm available target

For the device target, a list of possible virtual machine configurations is returned with the following attributes:

  • virtual machine version
  • RTOS
  • additional features
  • free/pro only

Virtual Machine Binary File

The binary file(s) of an existing virtual machine can be obtained with the command:

ztc vm bin uid

where uid is the unique identifier of the virtual machine

Additional options can be provided:

  • --path path to specify the destination path

Registering Binary File

The binary file(s) of a a registering bootloader can be obtained with the command:

ztc vm reg target

where target is the name of the device to register.

Additional options can be provided:

  • --path path to specify the destination path