Preface
Downloading and adding the image
-
The latest images can be found here https://sonic-net.github.io/SONiC/sonic_latest_images.html . In particular we need the image with platform type “VS”.
-
Next take note on what branch you downloaded, as it is necessary for the folder naming in EVE-NG.
In my case it was 202305 so I will create a folder named sonicsw-202305 with this command.
mkdir /opt/unetlab/addons/qemu/sonicsw-202305
-
Once created we need to move the file over with your method of choice. I prefer scp or rsync.
-
unzip the file using gunzip.
gunzip sonic-vs.img.gz
-
rename the file.
mv sonic-vs.img virtioa.qcow2
-
Finally we need to run this command to ensure permissions are set correctly on folder and items
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Initial Configuration
Once the node has been added to lab and booted. The default username is admin and password is YourPaSsWoRd.
To change it you can use this command.
sudo passwd admin
The SONiC virtual switch will load with the default Hardware SKU of ‘Force10-S6000’. We can change that using the sonic-cfggen
command.
Also notice the --preset
flag generally options are t1,l2,empty,l1, and l3. l2 and l3 are the most common options used.
sudo cp /etc/sonic/config_db.json ~/config_db.json.bak
sudo sonic-cfggen -H --preset l2 -k Force10-S6000 -p /usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/port_config.ini > ~/tmp.json
sudo mv ~/tmp.json /etc/sonic/config_db.json
config reload -y
Once the switch has reloaded, we can configure OOB management. By default no mamangement VRF exists. upon creation Ethernet0 becomes bound to master interface ‘mgmt’ which belongs to the management VRF:
sudo config vrf add mgmt
sudo config save
We can then confirm the Layer 3 configuation for the OOB managment.