VMware AVI
AVI (NSX Advanced Load Balancer) application delivery and AKO Kubernetes operations — 29 MCP tools.
Dual mode: Traditional AVI Controller management + AKO K8s operations in one skill.
Family: vmware-aiops (VM lifecycle), vmware-monitor (inventory/health), vmware-storage (iSCSI/vSAN), vmware-vks (Tanzu Kubernetes), vmware-nsx (NSX networking), vmware-nsx-security (DFW/firewall), vmware-aria (metrics/alerts/capacity).
| vmware-pilot (workflow orchestration) | vmware-policy (audit/policy)
What This Skill Does
| Category | Tools | Count |
|---|
| Virtual Service | list, status, enable/disable | 3 |
| Pool Member |
list, enable/disable member (drain/restore traffic) | 3 |
|
SSL Certificate | list, expiry check | 2 |
|
Analytics | VS metrics overview, request error logs | 2 |
|
Service Engine | list, health check | 2 |
|
AKO Pod Ops | status, logs, restart, version info | 4 |
|
AKO Config | values.yaml view, Helm diff, Helm upgrade | 3 |
|
Ingress Diagnostics | annotation validation, VS mapping, error diagnosis, fix recommendation | 4 |
|
Sync Diagnostics | K8s-Controller comparison, inconsistency list, force resync | 3 |
|
Multi-cluster | cluster list, cross-cluster AKO overview, AMKO status | 3 |
Quick Install
CODEBLOCK0
When to Use This Skill
- - List, enable, or disable virtual services on AVI Controller
- Add, remove, drain, or restore pool members (maintenance windows, rolling deployments)
- Check SSL certificate expiry across all virtual services
- View VS analytics — throughput, latency, error rates, request logs
- Check service engine health and resource usage
- Troubleshoot AKO pods — status, logs, restarts
- Manage AKO Helm configuration — view, diff, upgrade values.yaml
- Validate Ingress annotations and diagnose why a VS wasn't created as expected
- Detect sync drift between K8s resources and AVI Controller objects
- Get a cross-cluster view of AKO deployments and AMKO status
Use companion skills for:
- - VM lifecycle, deployment, guest ops → INLINECODE0
- NSX segments, gateways, NAT → INLINECODE1
- DFW firewall rules, security groups → INLINECODE2
- K8s cluster lifecycle (Supervisor, TKC) → INLINECODE3
- Read-only vSphere monitoring → INLINECODE4
Related Skills — Skill Routing
| User Intent | Recommended Skill |
|---|
| Load balancer, VS, pool, AVI, ALB, AKO | vmware-avi ← this skill |
| VM lifecycle, deployment, guest ops |
vmware-aiops (
uv tool install vmware-aiops) |
| Read-only vSphere monitoring |
vmware-monitor (
uv tool install vmware-monitor) |
| Storage: iSCSI, vSAN, datastores |
vmware-storage (
uv tool install vmware-storage) |
| NSX networking: segments, gateways, NAT |
vmware-nsx (
uv tool install vmware-nsx-mgmt) |
| NSX security: DFW rules, security groups |
vmware-nsx-security (
uv tool install vmware-nsx-security) |
| Tanzu Kubernetes (Supervisor/TKC) |
vmware-vks (
uv tool install vmware-vks) |
| Aria Ops: metrics, alerts, capacity |
vmware-aria (
uv tool install vmware-aria) |
| Multi-step workflows with approval |
vmware-pilot |
| Audit log query |
vmware-policy (
vmware-audit CLI) |
Common Workflows
Maintenance Window — Drain a Pool Member
When taking a backend server offline for patching, you need to drain traffic gracefully before maintenance and restore it after:
- 1. List pool members and health → INLINECODE13
- Disable the target server (graceful drain) → INLINECODE14
- Wait for active connections to drain (monitor analytics) → INLINECODE15
- Perform maintenance on the server
- Re-enable the server → INLINECODE16
- Verify health status is green → INLINECODE17
AKO Ingress Not Creating VS
When a developer reports their Ingress isn't producing a Virtual Service, the typical debugging path is:
- 1. Check AKO is running → INLINECODE18
- Validate Ingress annotations → INLINECODE19
- Check sync status → INLINECODE20
- If annotations are wrong →
vmware-avi ako ingress diagnose <ingress-name> (shows what's wrong and suggests fix) - If sync is drifted → review diff
vmware-avi ako sync diff and force resync if needed
SSL Certificate Expiry Audit
Expired certificates cause outages. Run periodic checks across all controllers:
- 1. Check all certificates → INLINECODE23
- Review which VS uses each expiring cert → output includes VS mapping
- Plan renewal with the certificate team
Usage Mode
| Scenario | Recommended | Why |
|---|
| Local/small models (Ollama, Qwen) | CLI | ~2K tokens vs ~8K for MCP |
| Cloud models (Claude, GPT-4o) |
Either | MCP gives structured JSON I/O |
| Automated pipelines |
MCP | Type-safe parameters, structured output |
| AKO troubleshooting |
CLI | Interactive log tailing, Helm diff output |
MCP Tools (29)
| Category | Tools |
|---|
| Virtual Service (3) | INLINECODE24 , vs_status, INLINECODE26 |
| Pool Member (3) |
pool_members,
pool_member_enable,
pool_member_disable |
| SSL Certificate (2) |
ssl_list,
ssl_expiry_check |
| Analytics (2) |
vs_analytics,
vs_error_logs |
| Service Engine (2) |
se_list,
se_health |
| AKO Pod (4) |
ako_status,
ako_logs,
ako_restart,
ako_version |
| AKO Config (3) |
ako_config_show,
ako_config_diff,
ako_config_upgrade |
| Ingress Diagnostics (4) |
ako_ingress_check,
ako_ingress_map,
ako_ingress_diagnose,
ako_ingress_fix_suggest |
| Sync Diagnostics (3) |
ako_sync_status,
ako_sync_diff,
ako_sync_force |
| Multi-cluster (3) |
ako_clusters,
ako_cluster_overview,
ako_amko_status |
CLI Quick Reference
CODEBLOCK1
Full CLI reference: see INLINECODE53
Troubleshooting
"Controller unreachable" error
- 1. Run
vmware-avi doctor to verify connectivity - Check if the controller address and port are correct in INLINECODE55
- For self-signed certs: set
verify_ssl: false in config.yaml (lab environments only)
AKO Pod in CrashLoopBackOff
- 1. Check logs → INLINECODE57
- Common causes: wrong controller IP in values.yaml, network policy blocking AKO→Controller, expired credentials
- Fix config →
vmware-avi ako config show to inspect, then Helm upgrade with corrected values
Ingress created but no VS on Controller
- 1. Validate annotations → INLINECODE59
- Check AKO logs for rejection reason → INLINECODE60
- Run sync diff →
vmware-avi ako sync diff to see if the object is stuck
Pool member shows "down" after enable
Health monitor may still be failing. Check the actual health status on the Controller side — the member is enabled but unhealthy. Fix the backend service first, then the health status will auto-recover.
SSL expiry check shows 0 certificates
Verify the controller connection has tenant-level access. Certificates are tenant-scoped in AVI — the configured user may only see certs in their tenant.
AKO sync force has no effect
Force resync triggers AKO to re-reconcile all K8s objects. If the drift persists, the issue is likely in the K8s resource definition itself (bad annotation, missing secret). Use
vmware-avi ako ingress diagnose to pinpoint the root cause.
Setup
CODEBLOCK2
All tools are automatically audited via vmware-policy. Audit logs: INLINECODE63
Full setup guide, security details, and AI platform compatibility: see INLINECODE64
Audit & Safety
All operations are automatically audited via vmware-policy (@vmware_tool decorator):
- - Every tool call logged to
~/.vmware/audit.db (SQLite, framework-agnostic) - Policy rules enforced via
~/.vmware/rules.yaml (deny rules, maintenance windows, risk levels) - Destructive operations (
vs_toggle disable, pool_member_disable, ako_restart, ako_config_upgrade, ako_sync_force) require double confirmation - INLINECODE73 defaults to
--dry-run mode — user must explicitly confirm to apply - View recent operations: INLINECODE75
License
MIT — github.com/zw008/VMware-AVI
VMware AVI
AVI(NSX Advanced Load Balancer)应用交付与AKO Kubernetes运维 — 29个MCP工具。
双模式:传统AVI控制器管理 + AKO K8s运维,集成于同一技能。
所属系列:vmware-aiops(VM生命周期)、vmware-monitor(清单/健康)、vmware-storage(iSCSI/vSAN)、vmware-vks(Tanzu Kubernetes)、vmware-nsx(NSX网络)、vmware-nsx-security(DFW/防火墙)、vmware-aria(指标/告警/容量)。
| vmware-pilot(工作流编排)| vmware-policy(审计/策略)
本技能功能
| 类别 | 工具 | 数量 |
|---|
| 虚拟服务 | 列表、状态、启用/禁用 | 3 |
| 池成员 |
列表、启用/禁用成员(排空/恢复流量) | 3 |
|
SSL证书 | 列表、过期检查 | 2 |
|
分析 | VS指标概览、请求错误日志 | 2 |
|
服务引擎 | 列表、健康检查 | 2 |
|
AKO Pod运维 | 状态、日志、重启、版本信息 | 4 |
|
AKO配置 | values.yaml查看、Helm差异对比、Helm升级 | 3 |
|
Ingress诊断 | 注解验证、VS映射、错误诊断、修复建议 | 4 |
|
同步诊断 | K8s-控制器对比、不一致列表、强制重新同步 | 3 |
|
多集群 | 集群列表、跨集群AKO概览、AMKO状态 | 3 |
快速安装
bash
uv tool install vmware-avi
vmware-avi doctor # 检查控制器连接 + kubeconfig + avisdk
何时使用本技能
- - 在AVI控制器上列出、启用或禁用虚拟服务
- 添加、移除、排空或恢复池成员(维护窗口、滚动部署)
- 检查所有虚拟服务的SSL证书过期情况
- 查看VS分析数据 — 吞吐量、延迟、错误率、请求日志
- 检查服务引擎健康状态和资源使用情况
- 排查AKO Pod问题 — 状态、日志、重启
- 管理AKO Helm配置 — 查看、对比、升级values.yaml
- 验证Ingress注解并诊断VS未按预期创建的原因
- 检测K8s资源与AVI控制器对象之间的同步偏差
- 获取AKO部署和AMKO状态的跨集群视图
配套技能用于:
- - VM生命周期、部署、客户机运维 → vmware-aiops
- NSX分段、网关、NAT → vmware-nsx
- DFW防火墙规则、安全组 → vmware-nsx-security
- K8s集群生命周期(Supervisor、TKC)→ vmware-vks
- 只读vSphere监控 → vmware-monitor
相关技能 — 技能路由
| 用户意图 | 推荐技能 |
|---|
| 负载均衡器、VS、池、AVI、ALB、AKO | vmware-avi ← 本技能 |
| VM生命周期、部署、客户机运维 |
vmware-aiops(uv tool install vmware-aiops)|
| 只读vSphere监控 |
vmware-monitor(uv tool install vmware-monitor)|
| 存储:iSCSI、vSAN、数据存储 |
vmware-storage(uv tool install vmware-storage)|
| NSX网络:分段、网关、NAT |
vmware-nsx(uv tool install vmware-nsx-mgmt)|
| NSX安全:DFW规则、安全组 |
vmware-nsx-security(uv tool install vmware-nsx-security)|
| Tanzu Kubernetes(Supervisor/TKC)|
vmware-vks(uv tool install vmware-vks)|
| Aria Ops:指标、告警、容量 |
vmware-aria(uv tool install vmware-aria)|
| 多步骤工作流(含审批)|
vmware-pilot |
| 审计日志查询 |
vmware-policy(vmware-audit CLI)|
常见工作流
维护窗口 — 排空池成员
当需要将后端服务器下线进行补丁更新时,您需要先优雅地排空流量,维护完成后再恢复:
- 1. 列出池成员和健康状态 → vmware-avi pool members my-pool
- 禁用目标服务器(优雅排空)→ vmware-avi pool disable my-pool
- 等待活动连接排空完成(监控分析数据)→ vmware-avi analytics my-vs
- 对服务器执行维护
- 重新启用服务器 → vmware-avi pool enable my-pool
- 验证健康状态为绿色 → vmware-avi pool members my-pool
AKO Ingress未创建VS
当开发人员报告其Ingress未生成虚拟服务时,典型的调试路径是:
- 1. 检查AKO是否运行 → vmware-avi ako status
- 验证Ingress注解 → vmware-avi ako ingress check
- 检查同步状态 → vmware-avi ako sync status
- 如果注解错误 → vmware-avi ako ingress diagnose (显示问题所在并建议修复方法)
- 如果同步出现偏差 → 查看差异 vmware-avi ako sync diff,必要时强制重新同步
SSL证书过期审计
过期的证书会导致服务中断。定期对所有控制器进行检查:
- 1. 检查所有证书 → vmware-avi ssl expiry --days 30
- 查看哪些VS使用了即将过期的证书 → 输出包含VS映射信息
- 与证书团队一起规划续期
使用模式
| 场景 | 推荐方式 | 原因 |
|---|
| 本地/小型模型(Ollama、Qwen) | CLI | 约2K令牌 vs MCP约8K |
| 云端模型(Claude、GPT-4o) |
两者均可 | MCP提供结构化JSON I/O |
| 自动化流水线 |
MCP | 类型安全参数、结构化输出 |
| AKO故障排查 |
CLI | 交互式日志跟踪、Helm差异输出 |
MCP工具(29个)
| 类别 | 工具 |
|---|
| 虚拟服务(3个) | vslist、vsstatus、vstoggle |
| 池成员(3个) |
poolmembers、pool
memberenable、pool
memberdisable |
| SSL证书(2个)| ssl
list、sslexpiry_check |
| 分析(2个)| vs
analytics、vserror_logs |
| 服务引擎(2个)| se
list、sehealth |
| AKO Pod(4个)| ako
status、akologs、ako
restart、akoversion |
| AKO配置(3个)| ako
configshow、ako
configdiff、ako
configupgrade |
| Ingress诊断(4个)| ako
ingresscheck、ako
ingressmap、ako
ingressdiagnose、ako
ingressfix_suggest |
| 同步诊断(3个)| ako
syncstatus、ako
syncdiff、ako
syncforce |
| 多集群(3个)| ako
clusters、akocluster
overview、akoamko_status |
CLI快速参考
bash
=== 传统模式(AVI控制器)===
vmware-avi vs list [--controller <名称>]
vmware-avi vs status
vmware-avi vs enable
vmware-avi vs disable # 双重确认
vmware-avi pool members <池名称>
vmware-avi pool enable