SONiC Hardware Virtualization - amybuck/SONiC-NAS GitHub Wiki
The overall SONiC NAS Host-Adapter architecture does not change for the SONiC Hardware Simulation platform (see SONiC NAS Host-Adapter Architecture. The main difference is that the low-level device drivers for the SAI and SDI libraries are replaced with the packages that support hardware simulation, and interact with the hardware simulation infrastructure.
The hardware simulation is implemented using a database (sqlite3) that stores simulated hardware information. This allows user applications of the SDI and SAI VM libraries to set/get hardware state parameters (admin port status: enabled/disabled), and get simulated hardware status information (operational link status: up/down).
A simple Host OS virtualization infrastructure allows user applications to create SONiC Virtual Machines. The current version of the SONiC supports virtualization using Virtual Box.
SONiC Hardware Simulation
Hardware simulation support:
- All create/set/get/delete operations supported by the SONiC Object Library
- Simulated hardware platform events:
- Device (transceiver, PSU, fan tray) insertion/removal
- Device (fan, PSU) failures
- Device state change (temperature increase/decrease, power utilization increase/decrease, cable insertion/removal - link up/down)
- Limited control plane functionality (L3 routing only)
- Limited number of switch ports (Virtual Machine platform dependent)
Install Software on Virtual Machine
You can install the SONiC NAS Host-Adapter on a virtual machine similar to Install SONiC NAS Host-Adapter on Dell Platforms.
Main differences:
- A host machine running Linux, Windows, or Mac OS X with at least 8GB of RAM and 100GB available disk space, and Virtual Box installed. The instructions to Create Virtual Machine have been tested on Ubuntu 16.04LTS, Windows 7, and Mac OS X El Capitan.
- The Virtual Machine needs to have one network interface configured for the Management interface (Network Adapter 1, eth0). This is automatically created when using the VM tool (see Create Virtual Machine).
- Install the corresponding SDI and SAI packages that access simulated hardware instead of the SONiC SDI and SAI packages.