Hi Laxman,
To connect a linux vm to a sonic virtual switch, you can use a udp tunnel. This is a feature of libvirt. Think of it like a pseudowire between two virtual machine (inside the same hypervisor or between two different hypervisors). If you had a sonic virtual
switch, and a linux VM, and they were both on the same hypervisor, here's the xml you'd add in to the <devices> section in the sonic VM's definition in libvirt:
<interface type='udp'>
<source address='127.0.0.1' port='10160'>
<local address='127.0.0.1' port='10161'/>
</source>
<model type='virtio'/>
</interface>
And then on the linux VM, you'd put this xml into the <devices> section, notice how the source and local ports are swapped:
<interface type='udp'>
<source address='127.0.0.1' port='10161'>
<local address='127.0.0.1' port='10160'/>
</source>
<model type='virtio'/>
</interface>
Then, inside of each VM it'll look like a cable is connected between the sonic vs and the linux vm. The first interface on the sonic vs you connect will show up as eth0, and the second interface on the sonic vs you connect will show up as Ethernet0, inside
the sonic vm. This is the case for the hwsku's that I use, it might be a different port arrangement for different hwsku's, for example if they had more than one oob management interface.
Tom