VMware AIops
Disclaimer: This is a community-maintained open-source project and is not affiliated with, endorsed by, or sponsored by VMware, Inc. or Broadcom Inc. "VMware" and "vSphere" are trademarks of Broadcom. Source code is publicly auditable at github.com/zw008/VMware-AIops under the MIT license.
VMware family entry point — AI-powered VM lifecycle, deployment, and alarm management — 34 MCP tools.
Start here: install vmware-aiops first, then add modules as needed.
Run vmware-aiops hub status to see which family members are installed.
Family: 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-avi (AVI/ALB/AKO).
| vmware-pilot (workflow orchestration) | vmware-policy (audit/policy)
What This Skill Does
| Category | Tools | Count |
|---|
| VM Lifecycle | power on/off, TTL auto-delete, clean slate | 6 |
| Deployment |
OVA, template, linked clone, batch clone/deploy | 8 |
|
Guest Ops | exec commands, upload/download files, provision | 5 |
|
Plan/Apply | multi-step planning with rollback | 4 |
|
Cluster | create, delete, HA/DRS config, add/remove hosts | 6 |
|
Datastore | browse files, scan for images | 2 |
|
Alarm Management | list alarms, acknowledge, reset | 3 |
Quick Install
CODEBLOCK0
VMware Family — Install What You Need
vmware-aiops is the entry point. Add modules for additional capabilities:
| Module | Install | Adds |
|---|
| vmware-monitor | INLINECODE1 | Read-only inventory, alarms, events |
| vmware-storage |
uv tool install vmware-storage | iSCSI, vSAN, datastore management |
|
vmware-vks |
uv tool install vmware-vks | Tanzu Kubernetes (vSphere 8.x+) |
|
vmware-nsx |
uv tool install vmware-nsx-mgmt | NSX networking: segments, gateways, NAT |
|
vmware-nsx-security |
uv tool install vmware-nsx-security | DFW microsegmentation, security groups |
|
vmware-aria |
uv tool install vmware-aria | Aria Ops metrics, alerts, capacity |
|
vmware-avi |
uv tool install vmware-avi | AVI load balancer, ALB, AKO, Ingress |
Each module stays independent — small tool count keeps local models (Ollama, Qwen) accurate.
When to Use This Skill
- - Power on/off, create, delete, snapshot, clone, or migrate VMs
- Deploy VMs from OVA, templates, linked clones, or batch specs
- Run commands or transfer files inside a VM (Guest Operations)
- Create/configure clusters (HA/DRS)
- Browse datastores for deployable images
- Plan and execute multi-step operations with rollback
- List, acknowledge, and reset vCenter triggered alarms
Use companion skills for:
- - Inventory, health, alarms, VM info → INLINECODE8
- iSCSI, vSAN, datastore management → INLINECODE9
- Tanzu Kubernetes (Supervisor, Namespace, TKC) → INLINECODE10
- Load balancing, AVI/ALB, AKO, Ingress → INLINECODE11
Related Skills — Skill Routing
| User Intent | Recommended Skill |
|---|
| Read-only monitoring, zero risk | vmware-monitor (uv tool install vmware-monitor) |
| Storage: iSCSI, vSAN, datastores |
vmware-storage (
uv tool install vmware-storage) |
| VM lifecycle, deployment, guest ops |
vmware-aiops ← this skill |
| Tanzu Kubernetes (vSphere 8.x+) |
vmware-vks (
uv tool install vmware-vks) |
| 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) |
| Aria Ops: metrics, alerts, capacity |
vmware-aria (
uv tool install vmware-aria) |
| Multi-step workflows with approval |
vmware-pilot |
| Load balancer, AVI, ALB, AKO, Ingress |
vmware-avi (
uv tool install vmware-avi) |
| Audit log query |
vmware-policy (
vmware-audit CLI) |
Common Workflows
Deploy a Lab Environment
- 1. Browse datastore for OVA images → INLINECODE20
- Deploy VM from OVA → INLINECODE21
- Run provisioning script inside VM → INLINECODE22
- Create baseline snapshot → INLINECODE23
- Set TTL for auto-cleanup → INLINECODE24
Batch Clone for Testing
- 1. Create plan:
vm_create_plan with multiple clone + reconfigure steps - Review plan with user (shows affected VMs, irreversible warnings)
- Apply:
vm_apply_plan executes sequentially, stops on failure - If failed:
vm_rollback_plan reverses executed steps - Set TTL on all clones for auto-cleanup
Migrate VM to Another Host
- 1. Check VM info via
vmware-monitor → verify power state and current host - Migrate: INLINECODE29
- Verify migration completed
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 |
MCP Tools (34 — 20 read, 14 write)
| Category | Tools | R/W |
|---|
| VM Lifecycle (6) | INLINECODE30 | Read |
|
vm_power_on,
vm_power_off,
vm_set_ttl,
vm_cancel_ttl,
vm_clean_slate | Write |
| Deployment (8) |
deploy_vm_from_ova,
deploy_vm_from_template,
deploy_linked_clone,
attach_iso_to_vm,
convert_vm_to_template,
batch_clone_vms,
batch_linked_clone_vms,
batch_deploy_from_spec | Write |
| Guest Ops (5) |
vm_guest_exec_output,
vm_guest_download | Read |
| |
vm_guest_exec,
vm_guest_upload,
vm_guest_provision | Write |
| Plan/Apply (4) |
vm_list_plans,
vm_create_plan | Read |
| |
vm_apply_plan,
vm_rollback_plan | Write |
| Datastore (2) |
browse_datastore,
scan_datastore_images | Read |
| Cluster (6) |
cluster_info | Read |
| |
cluster_create,
cluster_delete,
cluster_add_host,
cluster_remove_host,
cluster_configure | Write |
| Alarm Management (3) |
list_vcenter_alarms | Read |
| |
acknowledge_vcenter_alarm,
reset_vcenter_alarm | Write |
Read/write split: 20 tools are read-only, 14 modify state. All write tools require explicit parameters and are audit-logged. Destructive operations (delete, force power-off) require double confirmation.
CLI Quick Reference
CODEBLOCK1
Full CLI reference: see INLINECODE64
Troubleshooting
"VM not found" error
VM names are case-sensitive in vSphere. Use exact name from
vmware-monitor inventory vms.
Guest exec returns empty output
Use
vm_guest_exec_output instead of
vm_guest_exec — it auto-captures stdout/stderr. Basic
vm_guest_exec only returns exit code.
Deploy OVA times out
Large OVA files (>10GB) may exceed the default 120s timeout. The upload happens via HTTP NFC lease — ensure network between the machine running vmware-aiops and ESXi is stable.
Plan apply fails mid-way
Run
vmware-aiops plan list to see failed plan status. Ask user if they want to rollback with
vm_rollback_plan. Irreversible steps (delete_vm) are skipped during rollback.
Connection refused / SSL error
- 1. Verify target is reachable: INLINECODE71
- For self-signed certs: set
disableSslCertValidation: true in config.yaml (lab environments only)
Setup
CODEBLOCK2
All tools are automatically audited via vmware-policy. Audit logs: INLINECODE73
Full setup guide, security details, and AI platform compatibility: see INLINECODE74
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) - Risk classification: each tool tagged as low/medium/high/critical
- View recent operations: INLINECODE78
- View denied operations: INLINECODE79
vmware-policy is automatically installed as a dependency — no manual setup needed.
License
MIT — github.com/zw008/VMware-AIops
VMware AIops
免责声明:这是一个由社区维护的开源项目,与 VMware, Inc. 或 Broadcom Inc. 无任何关联、背书或赞助关系。VMware 和 vSphere 是 Broadcom 的商标。源代码在 MIT 许可下于 github.com/zw008/VMware-AIops 公开审计。
VMware 系列入口点 — 基于 AI 的虚拟机生命周期、部署和告警管理 — 34 个 MCP 工具。
从这里开始:先安装 vmware-aiops,然后根据需要添加模块。
运行 vmware-aiops hub status 查看已安装的系列成员。
系列:vmware-monitor(清单/健康)、vmware-storage(iSCSI/vSAN)、vmware-vks(Tanzu Kubernetes)、vmware-nsx(NSX 网络)、vmware-nsx-security(DFW/防火墙)、vmware-aria(指标/告警/容量)、vmware-avi(AVI/ALB/AKO)。
| vmware-pilot(工作流编排)| vmware-policy(审计/策略)
此技能的功能
| 类别 | 工具 | 数量 |
|---|
| 虚拟机生命周期 | 开机/关机、TTL 自动删除、重置 | 6 |
| 部署 |
OVA、模板、链接克隆、批量克隆/部署 | 8 |
|
客户机操作 | 执行命令、上传/下载文件、配置 | 5 |
|
计划/应用 | 带回滚的多步骤规划 | 4 |
|
集群 | 创建、删除、HA/DRS 配置、添加/移除主机 | 6 |
|
数据存储 | 浏览文件、扫描镜像 | 2 |
|
告警管理 | 列出告警、确认、重置 | 3 |
快速安装
bash
uv tool install vmware-aiops
vmware-aiops doctor
vmware-aiops hub status # 查看已安装的系列成员
VMware 系列 — 按需安装
vmware-aiops 是入口点。添加模块以获得更多功能:
| 模块 | 安装命令 | 新增功能 |
|---|
| vmware-monitor | uv tool install vmware-monitor | 只读清单、告警、事件 |
| vmware-storage |
uv tool install vmware-storage | iSCSI、vSAN、数据存储管理 |
|
vmware-vks | uv tool install vmware-vks | Tanzu Kubernetes(vSphere 8.x+) |
|
vmware-nsx | uv tool install vmware-nsx-mgmt | NSX 网络:分段、网关、NAT |
|
vmware-nsx-security | uv tool install vmware-nsx-security | DFW 微分段、安全组 |
|
vmware-aria | uv tool install vmware-aria | Aria Ops 指标、告警、容量 |
|
vmware-avi | uv tool install vmware-avi | AVI 负载均衡器、ALB、AKO、Ingress |
每个模块保持独立 — 工具数量少,确保本地模型(Ollama、Qwen)准确。
何时使用此技能
- - 开机/关机、创建、删除、快照、克隆或迁移虚拟机
- 从 OVA、模板、链接克隆或批量规格部署虚拟机
- 在虚拟机内运行命令或传输文件(客户机操作)
- 创建/配置集群(HA/DRS)
- 浏览数据存储以查找可部署镜像
- 规划并执行带回滚的多步骤操作
- 列出、确认和重置 vCenter 触发的告警
配合以下技能使用:
- - 清单、健康、告警、虚拟机信息 → vmware-monitor
- iSCSI、vSAN、数据存储管理 → vmware-storage
- Tanzu Kubernetes(Supervisor、命名空间、TKC)→ vmware-vks
- 负载均衡、AVI/ALB、AKO、Ingress → vmware-avi
相关技能 — 技能路由
| 用户意图 | 推荐技能 |
|---|
| 只读监控,零风险 | vmware-monitor(uv tool install vmware-monitor) |
| 存储:iSCSI、vSAN、数据存储 |
vmware-storage(uv tool install vmware-storage) |
| 虚拟机生命周期、部署、客户机操作 |
vmware-aiops ← 此技能 |
| Tanzu Kubernetes(vSphere 8.x+) |
vmware-vks(uv tool install vmware-vks) |
| NSX 网络:分段、网关、NAT |
vmware-nsx(uv tool install vmware-nsx-mgmt) |
| NSX 安全:DFW 规则、安全组 |
vmware-nsx-security(uv tool install vmware-nsx-security) |
| Aria Ops:指标、告警、容量 |
vmware-aria(uv tool install vmware-aria) |
| 带审批的多步骤工作流 |
vmware-pilot |
| 负载均衡器、AVI、ALB、AKO、Ingress |
vmware-avi(uv tool install vmware-avi) |
| 审计日志查询 |
vmware-policy(vmware-audit CLI) |
常见工作流
部署实验室环境
- 1. 浏览数据存储查找 OVA 镜像 → vmware-aiops datastore browse --pattern *.ova
- 从 OVA 部署虚拟机 → vmware-aiops deploy ova ./image.ova --name lab-vm --datastore ds1
- 在虚拟机内运行配置脚本 → vmware-aiops vm guest-exec lab-vm --cmd /usr/bin/python3 --args setup.py --user admin
- 创建基准快照 → vmware-aiops vm snapshot-create lab-vm --name baseline
- 设置 TTL 自动清理 → vmware-aiops vm set-ttl lab-vm --minutes 480
批量克隆用于测试
- 1. 创建计划:vmcreateplan 包含多个克隆 + 重新配置步骤
- 与用户一起审查计划(显示受影响的虚拟机、不可逆警告)
- 应用:vmapplyplan 顺序执行,失败时停止
- 如果失败:vmrollbackplan 回滚已执行的步骤
- 在所有克隆上设置 TTL 自动清理
将虚拟机迁移到另一台主机
- 1. 通过 vmware-monitor 检查虚拟机信息 → 验证电源状态和当前主机
- 迁移:vmware-aiops vm migrate my-vm --to-host esxi-02
- 验证迁移完成
使用模式
| 场景 | 推荐 | 原因 |
|---|
| 本地/小型模型(Ollama、Qwen) | CLI | 约 2K 令牌 vs MCP 约 8K |
| 云端模型(Claude、GPT-4o) |
两者均可 | MCP 提供结构化 JSON 输入/输出 |
| 自动化流水线 |
MCP | 类型安全参数、结构化输出 |
MCP 工具(34 个 — 20 个读取,14 个写入)
| 类别 | 工具 | 读/写 |
|---|
| 虚拟机生命周期(6) | vmlistttl | 读取 |
|
vm
poweron、vm
poweroff、vm
setttl、vm
cancelttl、vm
cleanslate | 写入 |
| 部署(8) | deploy
vmfrom
ova、deployvm
fromtemplate、deploy
linkedclone、attach
isoto
vm、convertv