Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?

How to use SONiC on CML

In CML (Cisco Modeling Labs), the out there platforms might be outlined and utilized by your self along with the usual ones.

This process is proven within the consumer information.
https://developer.cisco.com/docs/modeling-labs/#!custom-vm-images

SONiC can be out there for digital machines and containers.

SONiC on digital machine for Home windows
https://github.com/sonic-net/SONiC/wiki/SONiC-on-virtual-machine-for-Windows

HOWTO Use Digital Change (VM)
https://github.com/sonic-net/sonic-buildimage/blob/master/platform/vs/README.vsvm.md

HOWTO Use Digital Change (Docker)
https://github.com/sonic-net/sonic-buildimage/blob/master/platform/vs/README.vsdocker.md

This time, I attempted to arrange utilizing SONiC picture for digital machines in CML 2.2.3 surroundings (put in on the beforehand constructed ESXi host), and was in a position to begin utilizing it.
The next is a report of that.



Get SONiC picture

  • On this case, get hold of from the next
    • https://sonic.software/
    • Obtain the digital change picture file
      • Choose the one from Department 202205 this time
      • “sonic-vs.img.gz”.



Outline node

  • Choose “Node and Picture Definition” from “TOOLS”
  • Verify that the “Node Definition” tab is chosen and click on the “ADD” button.
  • Choose/enter the next info within the “Common” discipline
    • ID: “sonicvsvm”
    • Nature: “change”
  • Choose/enter the next info within the “Person Interface” discipline
    • Prefix: “sonicvsvm-“
    • Icon: “change”
    • Label: “SONiC Digital Change (VM)”

  • Choose/enter the next info within the “Linux Native Simulation” discipline

    • Area Driver: “KVM”
    • Simulation Driver: “server”
    • Disk Driver: “VirtIO”
    • Reminiscence: “2048” on this case
    • CPUs: “2” on this case
    • CPU Restrict: “100”
    • Community Driver: “E1000”
      Image description
  • Choose/enter the next info within the “Interfaces” discipline

    • Loopback identify: “Loopback0”
    • Variety of serial ports: “1”
    • Default variety of bodily interfaces: “9” on this case
    • interface 0:”eth0″
  • In the identical discipline, press the “ADD INTERFACE” button till the quantity specified within the “Default variety of bodily interfaces” is displayed, and enter the next info

    • interface 1: “Ethernet0”
    • interface 2: “Ethernet4”
    • interface 3: “Ethernet8”
    • interface 4: “Ethernet12”
    • interface 5: “Ethernet16”
    • interface 6: “Ethernet20”
    • interface 7: “Ethernet24”
    • interface 8: “Ethernet28”
      Image description

  • Enter the next info within the “Boot” discipline

    • Timeout: “480” on this case
  • In the identical discipline, click on the “ADD BOOT LINE button” and enter the next info

  • Click on the CREATE button

    Image description



Outline picture

  • Choose “Node and Picture Definition” from “TOOLS”
  • Choose the “Picture Definition” tab
  • Click on the “MANAGE” button
  • Choose “Select a file” within the “Add New Picture File” discipline and specify the downloaded SONiC picture
  • Click on the “UPLOAD IMAGE” button
    Image description

  • After confirming the show of the file specified within the “Uploaded Pictures” discipline, press the “CREATE NEW IMAGE DEFINITION” button.
    Image description




Affirmation of operation

I created a lab utilizing the registered node and it was efficiently began.
It was additionally confirmed that communication with neighboring nodes was potential.
Image description

The default username/password is admin/YourPaSsWoRd.



startup log

  Booting `SONiC-OS-202205.133812-e8fe21b3a'


Loading SONiC-OS OS kernel ...

Loading SONiC-OS OS preliminary ramdisk ...

tune2fs 1.46.2 (28-Feb-2021)
Setting reserved blocks share to 0% (0 blocks)
Setting reserved blocks rely to 0
[    5.274055] rc.native[357]: + cat /and so on/sonic/sonic_version.yml
[    5.286346] rc.native[358]: + grep build_version
[    5.308838] rc.native[372]: + sed -e s/build_version: //g;s/'//g
[    5.346575] rc.native[354]: + SONIC_VERSION=202205.133812-e8fe21b3a
[    5.374217] rc.native[354]: + FIRST_BOOT_FILE=/host/image-202205.133812-e8fe21b3a/platform/firsttime
[    5.406043] rc.native[354]: + SONIC_CONFIG_DIR=/host/image-202205.133812-e8fe21b3a/sonic-config
[    5.414535] rc.native[354]: + SONIC_ENV_FILE=/host/image-202205.133812-e8fe21b3a/sonic-config/sonic-environment
[    5.442671] rc.native[354]: + [ -d /host/image-202205.133812-e8fe21b3a/sonic-config -a -f /host/image-202205.133812-e8fe21b3a/sonic-config/sonic-environment ]
[    5.479881] rc.native[354]: + logger SONiC model 202205.133812-e8fe21b3a beginning up...
[    5.551047] rc.native[354]: + grub_installation_needed=
[    5.579501] rc.native[354]: + [ ! -e /host/machine.conf ]
[    5.606349] rc.native[354]: + . /host/machine.conf
[    5.634855] rc.native[354]: + onie_arch=x86_64
[    5.641530] rc.native[354]: + onie_bin=
[    5.655218] rc.native[354]: + onie_boot_reason=set up
[    5.664985] rc.native[354]: + onie_build_date=2018-11-17T04:18+00:00
[    5.672286] rc.native[354]: + onie_build_machine=kvm_x86_64
[    5.682261] rc.native[354]: + onie_build_platform=x86_64-kvm_x86_64-r0
[    5.699784] rc.native[354]: + onie_config_version=1
[    5.709808] rc.native[354]: + onie_dev=/dev/vda2
[    5.718218] rc.native[354]: + onie_disco_boot_reason=set up
[    5.724046] rc.native[354]: + onie_disco_dns=10.0.2.3
[    5.739660] rc.native[354]: + onie_disco_interface=eth0
[    5.746767] rc.native[354]: + onie_disco_ip=10.0.2.15
[    5.752000] rc.native[354]: + onie_disco_lease=86400
[    5.762114] rc.native[354]: + onie_disco_mask=24
[    5.763791] rc.native[354]: + onie_disco_opt53=05
[    5.775585] rc.native[354]: + onie_disco_router=10.0.2.2
[    5.787520] rc.native[354]: + onie_disco_serverid=10.0.2.2
[    5.795402] rc.native[354]: + onie_disco_siaddr=10.0.2.2
[    5.797178] rc.native[354]: + onie_disco_subnet=255.255.255.0
[    5.803935] rc.native[354]: + onie_exec_url=file://dev/vdb/onie-installer.bin
[    5.817521] rc.native[354]: + onie_firmware=auto
[    5.823414] rc.native[354]: + onie_grub_image_name=shimx64.efi
[    5.827010] rc.native[354]: + onie_initrd_tmp=/
[    5.828773] rc.native[354]: + onie_installer=/var/tmp/installer
[    5.839240] rc.native[354]: + onie_kernel_version=4.9.95
[    5.842667] rc.native[354]: + onie_local_parts=
[    5.846107] rc.native[354]: + onie_machine=kvm_x86_64
[    5.851656] rc.native[354]: + onie_machine_rev=0
[    5.866354] rc.native[354]: + onie_neighs=[fe80::2-eth0],
[    5.870137] rc.native[354]: + onie_partition_type=gpt
[    5.873605] rc.native[354]: + onie_platform=x86_64-kvm_x86_64-r0
[    5.883782] rc.native[354]: + onie_root_dir=/mnt/onie-boot/onie
[    5.891640] rc.native[354]: + onie_secure_boot=sure
[    5.895686] rc.native[354]: + onie_skip_ethmgmt_macs=sure
[    5.900815] rc.native[354]: + onie_switch_asic=qemu
[    5.910116] rc.native[354]: + onie_uefi_arch=x64
[    5.914736] rc.native[354]: + onie_uefi_boot_loader=shimx64.efi
[    5.918640] rc.native[354]: + onie_vendor_id=42623
[    5.929991] rc.native[354]: + onie_version=master-201811170418
[    5.935779] rc.native[354]: + program_console_speed
[    5.961289] rc.native[381]: + cat /proc/cmdline
[    5.967825] rc.native[382]: + grep -Eo console=ttyS[0-9]+,[0-9]+
[    5.969963] kdump-tools[348]: Beginning kdump-tools:
[    5.983970] rc.native[391]: + minimize -d , -f2
[    5.989988] kdump-tools[385]: no crashkernel= parameter within the kernel cmdline ...
[    5.994164] kdump-tools[431]:  failed!
[    6.015307] rc.native[354]: + velocity=115200
[    6.016722] rc.native[354]: + [ -z 115200 ]
[    6.022641] rc.native[354]: + CONSOLE_SPEED=115200
[    6.034225] rc.native[395]: + grep keep-baud
[    6.038480] rc.native[394]: + grep agetty /lib/systemd/system/serial-getty@.service
[    6.043188] rc.native[395]: ExecStart=-/sbin/agetty -o '-p -- u' --keep-baud 115200,57600,38400,9600 %I $TERM
[    6.052015] rc.native[354]: + [ 0 = 0 ]
[    6.053117] rc.native[354]: + sed -i s|--keep-baud .* %I| 115200 %I|g /lib/systemd/system/serial-getty@.service
[    6.059409] rc.native[354]: + systemctl daemon-reload
[    6.065592] rc.native[354]: + [ -f /host/image-202205.133812-e8fe21b3a/platform/firsttime ]
[    6.074332] rc.native[354]: + echo First boot detected. Performing first boot duties...
[    6.078155] rc.native[354]: First boot detected. Performing first boot duties...
[    6.081148] rc.native[354]: + [ -n  ]
[    6.086179] rc.native[354]: + [ -n x86_64-kvm_x86_64-r0 ]
[    6.088825] rc.native[354]: + platform=x86_64-kvm_x86_64-r0
[    6.090372] rc.native[354]: + [ -d /host/old_config ]
[    6.094434] rc.native[354]: + [ -f /host/minigraph.xml ]
[    6.096638] rc.native[354]: + [ -n  ]
[    6.101041] rc.native[354]: + contact /tmp/pending_config_initialization
[    6.102851] rc.native[354]: + contact /tmp/notify_firstboot_to_platform
[    6.108945] rc.native[354]: + [ ! -d /host/reboot-cause/platform ]
[    6.114369] rc.native[354]: + mkdir -p /host/reboot-cause/platform
[    6.116093] rc.native[354]: + [ -d /host/image-202205.133812-e8fe21b3a/platform/x86_64-kvm_x86_64-r0 ]
[    6.121007] rc.native[354]: + sync
[    6.126091] rc.native[354]: + [ -n x86_64-kvm_x86_64-r0 ]
[    6.135691] rc.native[354]: + [ -n  ]
[    6.138201] rc.native[354]: + mkdir -p /var/platform
[    6.143169] rc.native[354]: + [ -f /etc/default/kdump-tools ]
[    6.147718] rc.native[354]: + sed -i -e s/__PLATFORM__/x86_64-kvm_x86_64-r0/g /and so on/default/kdump-tools
[    6.152807] rc.native[354]: + firsttime_exit
[    6.155310] rc.native[354]: + rm -rf /host/image-202205.133812-e8fe21b3a/platform/firsttime
[    6.165820] rc.native[354]: + exit 0


Debian GNU/Linux 11 sonic ttyS0

sonic login: admin

Password: 
Linux sonic 5.10.0-12-2-amd64 #1 SMP Debian 5.10.103-1 (2022-03-07) x86_64
You're on
  ____   ___  _   _ _  ____
 / ___| / _ |  | (_)/ ___|
 ___ | | | |  | | | |
  ___) | |_| | |  | | |___
 |____/ ___/|_| _|_|____|

-- Software program for Open Networking within the Cloud --

Unauthorized entry and/or use are prohibited.
All entry and/or use are topic to monitoring.

Assist:    http://azure.github.io/SONiC/

admin@sonic:~$ 

admin@sonic:~$ present lldp desk

Functionality codes: (R) Router, (B) Bridge, (O) Different
LocalPort    RemoteDevice    RemotePortID    Functionality    RemotePortDescr
-----------  --------------  --------------  ------------  -----------------
Ethernet0    sonic           fortyGigE0/0    BR            Ethernet0
--------------------------------------------------
Whole entries displayed:  1
admin@sonic:~$ 
Enter fullscreen mode

Exit fullscreen mode

Add a Comment

Your email address will not be published. Required fields are marked *

Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?