diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index ab686d3a13..b0ca084154 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -176,6 +176,7 @@ COPY ["buffermgrd.sh", "/usr/bin/"] COPY ["platform.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"] COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/"] COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/"] +COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Mellanox-SN2700/"] # Workaround the tcpdump issue RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump diff --git a/platform/vs/docker-sonic-vs/orchagent.sh b/platform/vs/docker-sonic-vs/orchagent.sh index 4a035a26b2..62ddc76cce 100755 --- a/platform/vs/docker-sonic-vs/orchagent.sh +++ b/platform/vs/docker-sonic-vs/orchagent.sh @@ -1,9 +1,14 @@ #!/usr/bin/env bash -if [[ -z "$fake_platform" ]]; then - export platform=vs -else +#This is required since we have platform based checks in orchagent +#fakeplatform to be removed once swss migrates to hw-sku + +if [ "$HWSKU" == "Mellanox-SN2700" ]; then + export platform="mellanox" +elif [ -n "$fake_platform" ]; then export platform=$fake_platform +else + export platform=vs fi SWSS_VARS_FILE=/usr/share/sonic/templates/swss_vars.j2 diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 5d0b80ef7d..d5efffcad1 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -54,10 +54,15 @@ else fi sonic-cfggen -t /usr/share/sonic/templates/copp_cfg.j2 > /etc/sonic/copp_cfg.json +#To be removed once swss migrates to HWSKU if [ "$fake_platform" == "mellanox" ]; then cp /usr/share/sonic/hwsku/sai_mlnx.profile /usr/share/sonic/hwsku/sai.profile fi +if [ "$HWSKU" == "Mellanox-SN2700" ]; then + cp /usr/share/sonic/hwsku/sai_mlnx.profile /usr/share/sonic/hwsku/sai.profile +fi + mkdir -p /etc/swss/config.d/ rm -f /var/run/rsyslogd.pid