[multi-asic][vs]: Update readme file to create multi-asic vs (#6867)

Readme file should be updated with steps required to bring up multi-asic virtual switch.
This commit is contained in:
SuvarnaMeenakshi 2021-03-05 12:46:07 -08:00 committed by GitHub
parent b85caa581f
commit 5dbb4bc7d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,42 @@ virsh #
```
2. Create SONiC VM for multi-ASIC HWSKU
Update sonic_multiasic.xml with the external interfaces
required for HWSKU.
- Based on the number of asics of hwsku, update device/x86_64-kvm_x86_64-r0/asic.conf
```
NUM_ASIC=<n>
DEV_ID_ASIC_0=0
DEV_ID_ASIC_1=1
DEV_ID_ASIC_2=2
DEV_ID_ASIC_3=3
..
DEV_ID_ASIC_<n-1>=<n-1>
```
For example, a four asic VS asic.conf will be:
```
NUM_ASIC=4
DEV_ID_ASIC_0=0
DEV_ID_ASIC_1=1
DEV_ID_ASIC_2=2
DEV_ID_ASIC_3=3
```
- Create a topology.sh script which will create the internal asic topology for
the specific hwsku.
For example, for msft_multi_asic_vs:
https://github.com/Azure/sonic-buildimage/blob/master/device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/topology.sh
- With the updated asic.conf and topology.sh, build sonic-vs.img which can be used to
bring up multi-asic virtual switch.
- Update platform/vs/sonic_multiasic.xml with higher memory and vcpu as required.
- For 4-asic vs platform msft_four_asic_vs hwsku, 8GB memory and 10vCPUs.
- For 7-ASIC vs platform msft_multi_asic_vs hwsku, 8GB and 16vCPUs.
- Update the number of front-panel interfaces in sonic_multliasic.xml
- For 4-ASIC vs platform, 8 front panel interfaces.
- For 6-ASIC vs platform, 64 front panel interfaces.
- With multi-asic sonic_vs.img and sonic_multiasic.xml file, bring up multi-asic
vs as:
```
$ sudo virsh
@ -38,18 +72,25 @@ virsh # create sonic_multiasic.xml
Domain sonic created from sonic.xml
virsh #
```
Once booted up, create a file "asic.conf" with the content:
NUM_ASIC=<Number of asics>
under /usr/share/sonic/device/x86_64-kvm_x86_64-r0/
Also, create a "topology.sh" file which will simulate the internal
asic connectivity of the hardware under
/usr/share/sonic/device/x86_64-kvm_x86_64-r0/<HWSKU>
The HWSKU directory will have the required files like port_config.ini
for each ASIC.
- Steps to convert a prebuilt single asic sonic-vs.img:
- Use the updated sonic_multiasic.xml file and bring up virtual switch.
- Update /usr/share/sonic/device/x86_64-kvm_x86_64-r0/asic.conf as above.
- Add topology.sh in /usr/share/sonic/device/x86_64-kvm_x86_64-r0/<HWSKU>
- stop database service and remove database docker, so that when vs is
rebooted, database_global.json is created with the right namespaces.
- systemctl stop database
- docker rm database
- sudo reboot
- Once rebooted, VS should be multi-asic VS.
Having done this, a new service "topology.service" will be started
during bootup which will invoke topology.sh script.
- Start topology service.
```
sudo systemctl start topology.
```
- Load configuration using minigraph or config_dbs.
3. Access virtual switch: