Skip to main content
Glama
danielbodnar

VyOS MCP Server

by danielbodnar
test-vyos-build-image.shβ€’3.39 kB
#!/bin/bash # Script to test if vyos/vyos-build:current contains a functional VyOS system set -euo pipefail echo "πŸ” Testing vyos/vyos-build:current for VyOS functionality..." # Test if the image contains VyOS components echo "πŸ“¦ Pulling docker.io/vyos/vyos-build:current..." podman pull docker.io/vyos/vyos-build:current echo "πŸ”§ Testing VyOS components in build image..." podman run --rm docker.io/vyos/vyos-build:current bash -c ' echo "=== Checking for VyOS components ===" echo "VyOS configuration wrapper: $(test -x /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper && echo "βœ… Found" || echo "❌ Missing")" echo "VyOS init system: $(test -x /sbin/init && echo "βœ… Found" || echo "❌ Missing")" echo "VyOS CLI: $(test -x /usr/bin/vtysh && echo "βœ… Found" || echo "❌ Missing")" echo "VyOS API: $(test -f /usr/lib/python*/site-packages/vyos/http_api.py && echo "βœ… Found" || echo "❌ Missing")" echo "VyOS HTTPS API: $(find /usr -name "*http*api*" -type f 2>/dev/null | head -3)" echo "" echo "=== Checking if we can start VyOS services ===" echo "Available in /sbin/: $(ls /sbin/ | grep -E "(init|vyos)" | head -5)" echo "Available VyOS services: $(ls /usr/libexec/vyos/ 2>/dev/null | head -5 || echo "Directory not found")" echo "" echo "=== System check ===" echo "OS Release: $(cat /etc/os-release 2>/dev/null | grep PRETTY_NAME || echo "No release info")" echo "VyOS version info: $(ls /usr/share/vyos/ 2>/dev/null || echo "No VyOS share directory")" ' echo "" echo "πŸ§ͺ Testing if we can run VyOS init system..." CONTAINER_ID=$(podman run -d --privileged docker.io/vyos/vyos-build:current /sbin/init 2>/dev/null || echo "failed") if [[ "$CONTAINER_ID" != "failed" ]]; then echo "βœ… VyOS init started successfully!" echo "Container ID: $CONTAINER_ID" # Wait a moment for initialization sleep 10 echo "πŸ” Checking if VyOS is running..." podman exec "$CONTAINER_ID" bash -c ' echo "Process tree:" ps aux | head -10 echo "" echo "VyOS config status:" if command -v vyos-configd >/dev/null 2>&1; then echo "βœ… VyOS config daemon available" else echo "❌ VyOS config daemon not found" fi echo "" echo "Network interfaces:" ip link show | head -10 ' 2>/dev/null || echo "❌ Failed to check VyOS status" echo "🧹 Cleaning up test container..." podman stop "$CONTAINER_ID" >/dev/null 2>&1 || true podman rm "$CONTAINER_ID" >/dev/null 2>&1 || true else echo "❌ Failed to start VyOS init system" fi echo "" echo "πŸ“‹ Test Results Summary:" echo "The docker.io/vyos/vyos-build:current image $(podman run --rm docker.io/vyos/vyos-build:current test -x /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper && echo "DOES" || echo "does NOT") contain VyOS runtime components" echo "" echo "πŸ’‘ Recommendation:" if podman run --rm docker.io/vyos/vyos-build:current test -x /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper >/dev/null 2>&1; then echo "βœ… The build image appears to contain VyOS! You can likely use it directly." echo " Try: podman run -d --privileged docker.io/vyos/vyos-build:current /sbin/init" else echo "❌ The build image is just build tools. You need to build runtime image from ISO." echo " Use: sudo ./scripts/build-vyos-image.sh" fi

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielbodnar/vyos-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server