{
  "schemaVersion": "1.0",
  "item": {
    "slug": "sonic-kvm-testbed",
    "name": "SONiC KVM Testbed",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/yxieca/sonic-kvm-testbed",
    "canonicalUrl": "https://clawhub.ai/yxieca/sonic-kvm-testbed",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/sonic-kvm-testbed",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=sonic-kvm-testbed",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/credentials.md",
      "references/troubleshooting.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/sonic-kvm-testbed"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/sonic-kvm-testbed",
    "agentPageUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "SONiC KVM Virtual Testbed",
        "body": "Deploy a local sonic-mgmt KVM testbed with cEOS neighbors on a single machine."
      },
      {
        "title": "Architecture",
        "body": "Host Machine (KVM + Docker)\n├── vlab-XX (KVM VM running sonic-vs) — DUT\n├── ceos_vmsX-Y_VMZZ (Docker) — cEOS neighbor(s)\n├── ptf_vmsX-Y (Docker) — PTF test traffic generator\n└── sonic-mgmt (Docker) — Ansible + pytest framework\n\nManagement network: br1 bridge, 10.250.0.0/24 (host at .1)."
      },
      {
        "title": "Supported Topologies",
        "body": "Testbed NameTopoDUTVM BaseNeighbors (raw → converged)vms-kvm-t0t0vlab-01VM01004 → 1 cEOSvms-kvm-t1-lagt1-lagvlab-03VM010424 → 2 cEOS\n\nUse use_converged_peers: true in vtestbed.yaml to reduce cEOS containers via multi-VRF convergence (requires PR #22399 in master branch)."
      },
      {
        "title": "Prerequisites",
        "body": "Ubuntu 20.04/22.04/24.04, KVM enabled (kvm-ok)\n30GB+ RAM (for single topo) or 20GB+ with reduced VM memory\nDocker installed, user in docker, kvm, libvirt groups\nBuilt sonic-vs.img.gz from sonic-buildimage\ncEOS image file (e.g., cEOS64-lab-4.32.5M.tar.xz)\nsshpass installed on host"
      },
      {
        "title": "1. Initial Setup (one-time)",
        "body": "# Clone repo\ngit clone https://github.com/sonic-net/sonic-mgmt.git ~/sonic-mgmt\ncd ~/sonic-mgmt && git checkout master  # PR #22399 needed for auto-convergence\n\n# Prepare images\nmkdir -p ~/veos-vm/images ~/sonic-vm/images\ngunzip -k sonic-vs.img.gz\ncp sonic-vs.img ~/veos-vm/images/ && cp sonic-vs.img ~/sonic-vm/images/\n\n# Import cEOS (docker import, NOT docker load)\nxz -d cEOS64-lab-4.32.5M.tar.xz\ndocker import cEOS64-lab-4.32.5M.tar ceosimage:4.32.5M\n\n# Management bridge\ncd ~/sonic-mgmt/ansible && sudo ./setup-management-network.sh\n\n# debian:jessie dependency\ndocker pull publicmirror.azurecr.io/debian:jessie\ndocker tag publicmirror.azurecr.io/debian:jessie debian:jessie\n\n# sonic-mgmt container\n./setup-container.sh -n sonic-mgmt -d /data\n\n# Create vault password file\necho \"abc\" > ~/sonic-mgmt/ansible/password.txt"
      },
      {
        "title": "2. Configure Credentials and Settings",
        "body": "See references/credentials.md for all config files.\n\nCritical files (these reset on git operations — automate fixes in a script):\n\nFileKey SettingWhygroup_vars/vm_host/creds.ymlvm_host_user: <your_user>Host SSH accessgroup_vars/all/creds.ymlsonic_login: \"<dut_user>\"DUT SSH user (matches sonic-vs build user)group_vars/all/ceos.ymlskip_ceos_image_downloading: trueUse local cEOS imagegroup_vars/vm_host/main.ymlmax_fp_num: 127Default 4 is too low for T0/T1veos_vtbansible_user: <your_user>Inventory host userveosComment out STR-ACS-SERV-01Avoid dual-host conflictvars/docker_registry.ymlRemove :443 from host:443 causes docker pull to hangvtestbed.yamluse_converged_peers: trueEnable multi-VRF convergence\n\nCreate a fix script to re-apply all settings. Run it before EVERY testbed operation."
      },
      {
        "title": "3. Deploy Topology",
        "body": "# Fix configs + remove stale .bak\nbash fix-configs.sh\nrm -f vars/topo_<TOPO>.yml.bak\n\n# Inside sonic-mgmt container:\n./testbed-cli.sh -t vtestbed.yaml add-topo <TESTBED_NAME> password.txt\n\nDuration: ~15-20 minutes (VM boot + cEOS startup)."
      },
      {
        "title": "4. Post-Deploy DUT Setup",
        "body": "After add-topo, the DUT boots with the build user. The multi_passwd_ssh plugin expects admin:\n\n# SSH to DUT as build user\nssh <build_user>@<DUT_IP>\n\n# Create admin user\nsudo useradd -m -s /bin/bash -G sudo,docker admin\necho 'admin:password' | sudo chpasswd\nsudo bash -c \"echo 'admin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/admin\"\n\n# Fix docker socket\nsudo chmod 666 /var/run/docker.sock"
      },
      {
        "title": "5. Deploy Minigraph",
        "body": "# Fix configs + remove .bak AGAIN (they revert!)\nbash fix-configs.sh\nrm -f vars/topo_<TOPO>.yml.bak\n\n./testbed-cli.sh -t vtestbed.yaml deploy-mg <TESTBED_NAME> veos_vtb password.txt\n\nDuration: ~5-10 minutes."
      },
      {
        "title": "6. Verify",
        "body": "# Check containers\ndocker ps | grep -E \"ceos|ptf\"\n\n# Check BGP (use admin after deploy-mg)\nsshpass -p password ssh admin@<DUT_IP> \"show ip bgp summary\"\n\nExpected BGP state with converged peers:\n\nT0: ARISTA01T1 Established (6400 prefixes), ARISTA02-04T1 Active (normal — VRF peers without physical port-channels)\nT1-LAG: 17/24 sessions up (all T0 + 1 T2 spine; remaining T2 spines Active)"
      },
      {
        "title": "7. Run Tests",
        "body": "cd /data/sonic-mgmt/tests\n./run_tests.sh -n <TESTBED_NAME> -d <DUT_NAME> -c <test_path> \\\n  -f vtestbed.yaml -i ../ansible/veos_vtb"
      },
      {
        "title": "Teardown",
        "body": "bash fix-configs.sh\nrm -f vars/topo_<TOPO>.yml.bak\n./testbed-cli.sh -t vtestbed.yaml remove-topo <TESTBED_NAME> password.txt\n\nDuration: ~12-15 minutes."
      },
      {
        "title": "Critical Gotchas",
        "body": "Config files revert during git and testbed operations — run fix script before EVERY command\nRemove .bak files before add-topo — stale backups cause KeyError in converger\ndocker import for cEOS (not docker load)\n:443 in docker_registry_host silently hangs docker pulls\nmax_fp_num: 4 is too low — set to 127\nbr1 bridge is not persistent across reboots — add netplan config\nNon-admin builds: sonic-vs uses the build machine's username, not admin\nuse_converged_peers: true requires master branch (PR #22399) for auto-convergence"
      },
      {
        "title": "Troubleshooting",
        "body": "See references/troubleshooting.md for detailed diagnosis of common failures."
      }
    ],
    "body": "SONiC KVM Virtual Testbed\n\nDeploy a local sonic-mgmt KVM testbed with cEOS neighbors on a single machine.\n\nArchitecture\nHost Machine (KVM + Docker)\n├── vlab-XX (KVM VM running sonic-vs) — DUT\n├── ceos_vmsX-Y_VMZZ (Docker) — cEOS neighbor(s)\n├── ptf_vmsX-Y (Docker) — PTF test traffic generator\n└── sonic-mgmt (Docker) — Ansible + pytest framework\n\n\nManagement network: br1 bridge, 10.250.0.0/24 (host at .1).\n\nSupported Topologies\nTestbed Name\tTopo\tDUT\tVM Base\tNeighbors (raw → converged)\nvms-kvm-t0\tt0\tvlab-01\tVM0100\t4 → 1 cEOS\nvms-kvm-t1-lag\tt1-lag\tvlab-03\tVM0104\t24 → 2 cEOS\n\nUse use_converged_peers: true in vtestbed.yaml to reduce cEOS containers via multi-VRF convergence (requires PR #22399 in master branch).\n\nPrerequisites\nUbuntu 20.04/22.04/24.04, KVM enabled (kvm-ok)\n30GB+ RAM (for single topo) or 20GB+ with reduced VM memory\nDocker installed, user in docker, kvm, libvirt groups\nBuilt sonic-vs.img.gz from sonic-buildimage\ncEOS image file (e.g., cEOS64-lab-4.32.5M.tar.xz)\nsshpass installed on host\nDeploy Procedure\n1. Initial Setup (one-time)\n# Clone repo\ngit clone https://github.com/sonic-net/sonic-mgmt.git ~/sonic-mgmt\ncd ~/sonic-mgmt && git checkout master  # PR #22399 needed for auto-convergence\n\n# Prepare images\nmkdir -p ~/veos-vm/images ~/sonic-vm/images\ngunzip -k sonic-vs.img.gz\ncp sonic-vs.img ~/veos-vm/images/ && cp sonic-vs.img ~/sonic-vm/images/\n\n# Import cEOS (docker import, NOT docker load)\nxz -d cEOS64-lab-4.32.5M.tar.xz\ndocker import cEOS64-lab-4.32.5M.tar ceosimage:4.32.5M\n\n# Management bridge\ncd ~/sonic-mgmt/ansible && sudo ./setup-management-network.sh\n\n# debian:jessie dependency\ndocker pull publicmirror.azurecr.io/debian:jessie\ndocker tag publicmirror.azurecr.io/debian:jessie debian:jessie\n\n# sonic-mgmt container\n./setup-container.sh -n sonic-mgmt -d /data\n\n# Create vault password file\necho \"abc\" > ~/sonic-mgmt/ansible/password.txt\n\n2. Configure Credentials and Settings\n\nSee references/credentials.md for all config files.\n\nCritical files (these reset on git operations — automate fixes in a script):\n\nFile\tKey Setting\tWhy\ngroup_vars/vm_host/creds.yml\tvm_host_user: <your_user>\tHost SSH access\ngroup_vars/all/creds.yml\tsonic_login: \"<dut_user>\"\tDUT SSH user (matches sonic-vs build user)\ngroup_vars/all/ceos.yml\tskip_ceos_image_downloading: true\tUse local cEOS image\ngroup_vars/vm_host/main.yml\tmax_fp_num: 127\tDefault 4 is too low for T0/T1\nveos_vtb\tansible_user: <your_user>\tInventory host user\nveos\tComment out STR-ACS-SERV-01\tAvoid dual-host conflict\nvars/docker_registry.yml\tRemove :443 from host\t:443 causes docker pull to hang\nvtestbed.yaml\tuse_converged_peers: true\tEnable multi-VRF convergence\n\nCreate a fix script to re-apply all settings. Run it before EVERY testbed operation.\n\n3. Deploy Topology\n# Fix configs + remove stale .bak\nbash fix-configs.sh\nrm -f vars/topo_<TOPO>.yml.bak\n\n# Inside sonic-mgmt container:\n./testbed-cli.sh -t vtestbed.yaml add-topo <TESTBED_NAME> password.txt\n\n\nDuration: ~15-20 minutes (VM boot + cEOS startup).\n\n4. Post-Deploy DUT Setup\n\nAfter add-topo, the DUT boots with the build user. The multi_passwd_ssh plugin expects admin:\n\n# SSH to DUT as build user\nssh <build_user>@<DUT_IP>\n\n# Create admin user\nsudo useradd -m -s /bin/bash -G sudo,docker admin\necho 'admin:password' | sudo chpasswd\nsudo bash -c \"echo 'admin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/admin\"\n\n# Fix docker socket\nsudo chmod 666 /var/run/docker.sock\n\n5. Deploy Minigraph\n# Fix configs + remove .bak AGAIN (they revert!)\nbash fix-configs.sh\nrm -f vars/topo_<TOPO>.yml.bak\n\n./testbed-cli.sh -t vtestbed.yaml deploy-mg <TESTBED_NAME> veos_vtb password.txt\n\n\nDuration: ~5-10 minutes.\n\n6. Verify\n# Check containers\ndocker ps | grep -E \"ceos|ptf\"\n\n# Check BGP (use admin after deploy-mg)\nsshpass -p password ssh admin@<DUT_IP> \"show ip bgp summary\"\n\n\nExpected BGP state with converged peers:\n\nT0: ARISTA01T1 Established (6400 prefixes), ARISTA02-04T1 Active (normal — VRF peers without physical port-channels)\nT1-LAG: 17/24 sessions up (all T0 + 1 T2 spine; remaining T2 spines Active)\n7. Run Tests\ncd /data/sonic-mgmt/tests\n./run_tests.sh -n <TESTBED_NAME> -d <DUT_NAME> -c <test_path> \\\n  -f vtestbed.yaml -i ../ansible/veos_vtb\n\nTeardown\nbash fix-configs.sh\nrm -f vars/topo_<TOPO>.yml.bak\n./testbed-cli.sh -t vtestbed.yaml remove-topo <TESTBED_NAME> password.txt\n\n\nDuration: ~12-15 minutes.\n\nCritical Gotchas\nConfig files revert during git and testbed operations — run fix script before EVERY command\nRemove .bak files before add-topo — stale backups cause KeyError in converger\ndocker import for cEOS (not docker load)\n:443 in docker_registry_host silently hangs docker pulls\nmax_fp_num: 4 is too low — set to 127\nbr1 bridge is not persistent across reboots — add netplan config\nNon-admin builds: sonic-vs uses the build machine's username, not admin\nuse_converged_peers: true requires master branch (PR #22399) for auto-convergence\nTroubleshooting\n\nSee references/troubleshooting.md for detailed diagnosis of common failures."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/yxieca/sonic-kvm-testbed",
    "publisherUrl": "https://clawhub.ai/yxieca/sonic-kvm-testbed",
    "owner": "yxieca",
    "version": "1.2.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed",
    "downloadUrl": "https://openagent3.xyz/downloads/sonic-kvm-testbed",
    "agentUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sonic-kvm-testbed/agent.md"
  }
}