vmware-aiops
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVMware AIops
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 — 41 MCP tools.
Start here: install vmware-aiops first, then add modules as needed. Runto 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-harden (compliance baselines). | vmware-pilot (workflow orchestration) | vmware-policy (audit/policy)vmware-aiops hub status
免责声明:这是一个社区维护的开源项目,与VMware公司或Broadcom公司无关,也未获得其认可或赞助。“VMware”和“vSphere”是Broadcom的商标。源代码可在github.com/zw008/VMware-AIops查看,基于MIT许可证授权。
VMware系列工具入口点——基于AI的VM生命周期、部署和告警管理工具集,包含41个MCP工具。
使用起点:先安装vmware-aiops,再根据需要添加模块。 运行查看已安装的系列工具成员。 系列工具: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-harden(合规基线)。 | vmware-pilot(工作流编排) | vmware-policy(审计/策略)vmware-aiops hub status
What This Skill Does
此技能的功能
| Category | Tools | Count |
|---|---|---|
| VM Lifecycle | power on/off, clone, migrate, delete, snapshot CRUD, TTL auto-delete, clean slate | 13 |
| 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 |
| 分类 | 工具 | 数量 |
|---|---|---|
| VM生命周期 | 开机/关机、克隆、迁移、删除、快照增删改查、TTL自动删除、重置状态 | 13 |
| 部署 | OVA、模板、链接克隆、批量克隆/部署 | 8 |
| 客户机操作 | 执行命令、上传/下载文件、配置 | 5 |
| 计划/执行 | 带回滚的多步骤计划 | 4 |
| 集群 | 创建、删除、HA/DRS配置、添加/移除主机 | 6 |
| 数据存储 | 浏览文件、扫描镜像 | 2 |
| 告警管理 | 列出告警、确认告警、重置告警 | 3 |
Quick Install
快速安装
bash
uv tool install vmware-aiops
vmware-aiops doctor
vmware-aiops hub status # see which family members are installedbash
uv tool install vmware-aiops
vmware-aiops doctor
vmware-aiops hub status # see which family members are installedVMware Family — Install What You Need
VMware系列工具——按需安装
vmware-aiops is the entry point. Add modules for additional capabilities:
| Module | Install | Adds |
|---|---|---|
| vmware-monitor | | Read-only inventory, alarms, events |
| vmware-storage | | iSCSI, vSAN, datastore management |
| vmware-vks | | Tanzu Kubernetes (vSphere 8.x+) |
| vmware-nsx | | NSX networking: segments, gateways, NAT |
| vmware-nsx-security | | DFW microsegmentation, security groups |
| vmware-aria | | Aria Ops metrics, alerts, capacity |
| vmware-avi | | AVI load balancer, ALB, AKO, Ingress |
Each module stays independent — small tool count keeps local models (Ollama, Qwen) accurate.
vmware-aiops是入口点,可添加模块以获得更多功能:
| 模块 | 安装命令 | 新增功能 |
|---|---|---|
| vmware-monitor | | 只读资源清单、告警、事件 |
| vmware-storage | | iSCSI、vSAN、数据存储管理 |
| vmware-vks | | Tanzu Kubernetes(vSphere 8.x+) |
| vmware-nsx | | NSX网络:网段、网关、NAT |
| vmware-nsx-security | | DFW微分段、安全组 |
| vmware-aria | | Aria Ops指标、告警、容量 |
| vmware-avi | | AVI负载均衡器、ALB、AKO、Ingress |
每个模块相互独立——工具数量少可保证本地模型(Ollama、Qwen)的准确性。
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 →
vmware-monitor - iSCSI, vSAN, datastore management →
vmware-storage - Tanzu Kubernetes (Supervisor, Namespace, TKC) →
vmware-vks - Load balancing, AVI/ALB, AKO, Ingress →
vmware-avi
- 开机/关机、创建、删除、快照、克隆或迁移VM
- 从OVA、模板、链接克隆或批量规格部署VM
- 在VM内运行命令或传输文件(客户机操作)
- 创建/配置集群(HA/DRS)
- 浏览数据存储查找可部署镜像
- 计划并执行带回滚的多步骤操作
- 列出、确认和重置vCenter触发的告警
相关场景请使用配套技能:
- 资源清单、健康状态、告警、VM信息 →
vmware-monitor - iSCSI、vSAN、数据存储管理 →
vmware-storage - Tanzu Kubernetes(Supervisor、命名空间、TKC) →
vmware-vks - 负载均衡、AVI/ALB、AKO、Ingress →
vmware-avi
Related Skills — Skill Routing
相关技能——技能路由
| User Intent | Recommended Skill |
|---|---|
| Read-only monitoring, zero risk | vmware-monitor ( |
| Storage: iSCSI, vSAN, datastores | vmware-storage ( |
| VM lifecycle, deployment, guest ops | vmware-aiops ← this skill |
| Tanzu Kubernetes (vSphere 8.x+) | vmware-vks ( |
| NSX networking: segments, gateways, NAT | vmware-nsx ( |
| NSX security: DFW rules, security groups | vmware-nsx-security ( |
| Aria Ops: metrics, alerts, capacity | vmware-aria ( |
| Multi-step workflows with approval | vmware-pilot |
| Compliance baselines (CIS / 等保 / PCI-DSS), drift detection, LLM remediation advisor | vmware-harden ( |
| Load balancer, AVI, ALB, AKO, Ingress | vmware-avi ( |
| Audit log query | vmware-policy ( |
| 用户意图 | 推荐技能 |
|---|---|
| 只读监控、无风险操作 | vmware-monitor ( |
| 存储:iSCSI、vSAN、数据存储 | vmware-storage ( |
| VM生命周期、部署、客户机操作 | vmware-aiops ← 本技能 |
| Tanzu Kubernetes(vSphere 8.x+) | vmware-vks ( |
| NSX网络:网段、网关、NAT | vmware-nsx ( |
| NSX安全:DFW规则、安全组 | vmware-nsx-security ( |
| Aria Ops:指标、告警、容量 | vmware-aria ( |
| 带审批的多步骤工作流 | vmware-pilot |
| 合规基线(CIS / 等保 / PCI-DSS)、漂移检测、LLM修复建议 | vmware-harden ( |
| 负载均衡器、AVI、ALB、AKO、Ingress | vmware-avi ( |
| 审计日志查询 | vmware-policy ( |
Common Workflows
常见工作流
Diagnostic investigations: Before remediating any "why is X slow / failing / down" issue, follow. It enforces the four root-cause completeness criteria (falsifiability / sufficiency / necessity / mechanism) and the up-to-three-rounds deepening loop. Only invoke L3+ write tools after the four criteria are satisfied AND the user has approved a remediation plan.references/investigation-protocol.md
诊断调查:在修复任何“为什么X变慢/失败/宕机”的问题之前,请遵循。它强制执行四个根本原因完整性标准(可证伪性/充分性/必要性/机制)以及最多三轮的深度循环。只有在满足四个标准且用户已批准修复计划后,才能调用L3+写入工具。references/investigation-protocol.md
Deploy a Lab Environment
部署实验室环境
Pre-flight (judgment, not blind sequence):
- Free space: target datastore must have ≥ OVA size × 2 (delta files + thin-provision overhead). If multiple datastores qualify, prefer one with lowest current IOPS pressure (cross-check if available).
vmware-aria - Name hygiene: prefix with date or owner () so the TTL cleanup audit trail is meaningful.
lab-2026-04-30-alice - TTL: always set. 480 min for a single test session, 7200 min for a week-long sandbox. Never deploy a "lab" VM without a TTL — that is how datastores fill up at 3 AM.
- Snapshot timing: take the baseline after provisioning succeeds, not before — a pre-provision snapshot is just an empty checkpoint.
Steps:
- → confirm image present and size
vmware-aiops datastore browse <ds> --pattern "*.ova" vmware-aiops deploy ova <path> --name <date>-<owner>-<purpose> --datastore <ds>- → if exit ≠ 0, stop, do not snapshot a half-provisioned VM
vmware-aiops vm guest-exec <name> --cmd /usr/bin/python3 --args "setup.py" --user admin - (only if multi-iteration testing; skip for one-shot)
vmware-aiops vm snapshot-create <name> --name baseline vmware-aiops vm set-ttl <name> --minutes 480
事前检查(判断而非盲目执行):
- 可用空间:目标数据存储必须有≥OVA大小×2的空间(增量文件+精简配置开销)。如果多个数据存储符合条件,优先选择当前IOPS压力最低的(若有则交叉验证)。
vmware-aria - 命名规范:以日期或所有者为前缀(如),以便TTL清理审计轨迹清晰可查。
lab-2026-04-30-alice - TTL:始终设置。单次测试会话设为480分钟,一周沙箱设为7200分钟。切勿部署没有TTL的“实验室”VM——这就是数据存储在凌晨3点被占满的原因。
- 快照时机:在配置成功之后拍摄基线快照——配置前的快照只是空检查点。
步骤:
- → 确认镜像存在及大小
vmware-aiops datastore browse <ds> --pattern "*.ova" vmware-aiops deploy ova <path> --name <date>-<owner>-<purpose> --datastore <ds>- → 如果退出码≠0,停止操作,不要为半配置的VM创建快照
vmware-aiops vm guest-exec <name> --cmd /usr/bin/python3 --args "setup.py" --user admin - (仅在多迭代测试时执行;一次性测试可跳过)
vmware-aiops vm snapshot-create <name> --name baseline vmware-aiops vm set-ttl <name> --minutes 480
Batch Clone for Testing
批量克隆用于测试
Pre-flight:
- Source VM state: powered-off is safest. If powered-on, VMware Tools must be running and quiesce-capable, else clones may have inconsistent disk state.
- Capacity math: (full clone) or
free_space ≥ source.size × count × 1.2(linked clone, delta-only).≥ count × 2 GB - Decision rule: count > 10 → use linked clones (); seconds vs minutes per clone, ~100× less storage. Tradeoff: linked clones depend on source snapshot — deleting the snapshot breaks all children.
deploy linked-clone - Network exhaustion: each clone gets a unique MAC from the vSphere pool; if you batch > 200, verify pool capacity in advance.
- TTL: every clone must have one. Use the plan's metadata to track ownership.
Steps:
- with clone + reconfigure + set-ttl steps grouped per VM (atomic per clone)
vm_create_plan - Review the plan with the user — surface count, datastore, irreversible warnings
- — stops on first failure (intentional, do not auto-resume)
vm_apply_plan - On failure: → reverses completed clones; manually verify rollback before retrying
vm_rollback_plan
事前检查:
- 源VM状态:关机状态最安全。如果是开机状态,必须运行VMware Tools且具备静默能力,否则克隆可能导致磁盘状态不一致。
- 容量计算:(完整克隆)或
可用空间 ≥ 源VM大小 × 数量 × 1.2(链接克隆,仅增量)。≥ 数量 × 2 GB - 决策规则:数量>10 → 使用链接克隆();每个克隆耗时从分钟级降至秒级,存储占用减少约100倍。权衡:链接克隆依赖源快照——删除快照会破坏所有子克隆。
deploy linked-clone - 网络耗尽:每个克隆从vSphere池获取唯一MAC;如果批量克隆>200个,需提前验证池容量。
- TTL:每个克隆必须设置TTL。使用计划元数据跟踪所有者。
步骤:
- 使用将克隆+重新配置+设置TTL步骤按VM分组(每个克隆为原子操作)
vm_create_plan - 与用户审核计划——说明数量、数据存储、不可逆警告
- —— 首次失败即停止(有意设计,请勿自动恢复)
vm_apply_plan - 失败时:→ 撤销已完成的克隆;重试前手动验证回滚结果
vm_rollback_plan
Migrate VM to Another Host
将VM迁移到另一主机
Pre-flight (ALL must pass before issuing migrate):
- CPU compatibility: target host CPU family must match source, OR cluster must be in EVC mode. Live migration across mismatched CPUs fails mid-flight and may leave the VM stunned.
- Network parity: every portgroup the VM uses must exist on the target host's vSwitch with the same VLAN. Missing portgroup → vNICs disconnected post-migration.
- Storage visibility: target host must see all of the VM's datastores; otherwise this is a Storage vMotion, not a host migration — different (slower) operation.
- Affinity rules: if the VM is pinned to source by a DRS host-affinity rule, migration silently violates intent. Check first.
cluster info - Hardware passthrough: VMs with PCI passthrough (GPU, USB) cannot live-migrate — schedule a cold migration window.
Steps:
- Verify VM state and current host via
vmware-monitor vm info <name> - Verify target host: same cluster, EVC compatible, has required networks/datastores
- — wait for task completion, do not assume success on return
vmware-aiops vm migrate <name> --to-host <target> - Post-check: confirms new host AND power state unchanged AND vNICs connected
vm info
事前检查(所有条件必须满足才能执行迁移):
- CPU兼容性:目标主机CPU系列必须与源主机匹配,或集群处于EVC模式。跨不兼容CPU的实时迁移会中途失败,可能导致VM停滞。
- 网络一致性:VM使用的每个端口组必须在目标主机的vSwitch上存在且VLAN相同。缺少端口组→迁移后vNIC断开连接。
- 存储可见性:目标主机必须能看到VM的所有数据存储;否则这是存储vMotion,而非主机迁移——操作不同(速度更慢)。
- 亲和性规则:如果VM通过DRS主机亲和性规则固定在源主机,迁移会无声地违反意图。先检查。
cluster info - 硬件直通:带有PCI直通(GPU、USB)的VM无法实时迁移——安排冷迁移窗口。
步骤:
- 通过验证VM状态和当前主机
vmware-monitor vm info <name> - 验证目标主机:同一集群、EVC兼容、具备所需网络/数据存储
- —— 等待任务完成,不要返回即假设成功
vmware-aiops vm migrate <name> --to-host <target> - 事后检查:确认新主机、电源状态未变且vNIC已连接
vm info
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 |
| 场景 | 推荐方式 | 原因 |
|---|---|---|
| 本地/小型模型(Ollama、Qwen) | CLI | 约2K tokens,相比MCP的约8K更轻量化 |
| 云模型(Claude、GPT-4o) | 均可 | MCP提供结构化JSON输入输出 |
| 自动化流水线 | MCP | 类型安全参数,结构化输出 |
MCP Tools (41 — 8 read, 33 write)
MCP工具(41个——8个只读,33个写入)
| Category | Tools | R/W |
|---|---|---|
| VM Lifecycle (13) | | Read |
| Write | |
| Deployment (8) | | Write |
| Guest Ops (5) | | Read |
| Write | |
| Plan/Apply (4) | | Read |
| Write | |
| Datastore (2) | | Read |
| Cluster (6) | | Read |
| Write | |
| Alarm Management (3) | | Read |
| Write |
Read/write split: 8 tools are read-only (per docstring marker), 33 modify state. All write tools require explicit parameters and are audit-logged. Destructive operations (, , , force power-off, cluster delete/remove-host) require double confirmation at the CLI layer.
[READ]vm_deletevm_revert_snapshotvm_delete_snapshot| 分类 | 工具 | 读/写 |
|---|---|---|
| VM生命周期(13个) | | 读 |
| 写 | |
| 部署(8个) | | 写 |
| 客户机操作(5个) | | 读 |
| 写 | |
| 计划/执行(4个) | | 读 |
| 写 | |
| 数据存储(2个) | | 读 |
| 集群(6个) | | 读 |
| 写 | |
| 告警管理(3个) | | 读 |
| 写 |
读写拆分:8个工具为只读(标记文档字符串),33个工具修改状态。所有写入工具需要明确参数,并会被审计日志记录。破坏性操作(、、、强制关机、集群删除/移除主机)在CLI层需要双重确认。
[READ]vm_deletevm_revert_snapshotvm_delete_snapshotCLI Quick Reference
CLI快速参考
bash
undefinedbash
undefinedVM operations
VM operations
vmware-aiops vm power-on <name> [--target <t>]
vmware-aiops vm power-off <name> [--force]
vmware-aiops vm create <name> --cpu 4 --memory 8192 --disk 100
vmware-aiops vm delete <name>
vmware-aiops vm clone <name> --new-name <new> [--to-host <host>] [--to-datastore <ds>] [--power-on]
vmware-aiops vm migrate <name> --to-host <host> [--to-datastore <ds>]
vmware-aiops vm snapshot-create <name> --name <snap> [--description <text>] [--memory]
vmware-aiops vm snapshot-list <name>
vmware-aiops vm snapshot-revert <name> --name <snap>
vmware-aiops vm snapshot-delete <name> --name <snap> [--remove-children]
vmware-aiops vm power-on <name> [--target <t>]
vmware-aiops vm power-off <name> [--force]
vmware-aiops vm create <name> --cpu 4 --memory 8192 --disk 100
vmware-aiops vm delete <name>
vmware-aiops vm clone <name> --new-name <new> [--to-host <host>] [--to-datastore <ds>] [--power-on]
vmware-aiops vm migrate <name> --to-host <host> [--to-datastore <ds>]
vmware-aiops vm snapshot-create <name> --name <snap> [--description <text>] [--memory]
vmware-aiops vm snapshot-list <name>
vmware-aiops vm snapshot-revert <name> --name <snap>
vmware-aiops vm snapshot-delete <name> --name <snap> [--remove-children]
Guest operations (requires VMware Tools)
Guest operations (requires VMware Tools)
vmware-aiops vm guest-exec <name> --cmd <script-path> --args "<args>" --user <username>
vmware-aiops vm guest-upload <name> --local ./script.sh --guest /tmp/script.sh --user <username>
vmware-aiops vm guest-exec <name> --cmd <script-path> --args "<args>" --user <username>
vmware-aiops vm guest-upload <name> --local ./script.sh --guest /tmp/script.sh --user <username>
Deploy
Deploy
vmware-aiops deploy ova <path> --name <vm> --datastore <ds>
vmware-aiops deploy linked-clone --source <vm> --snapshot <snap> --name <new>
vmware-aiops deploy ova <path> --name <vm> --datastore <ds>
vmware-aiops deploy linked-clone --source <vm> --snapshot <snap> --name <new>
Cluster
Cluster
vmware-aiops cluster create <name> --ha --drs
vmware-aiops cluster info <name>
vmware-aiops cluster create <name> --ha --drs
vmware-aiops cluster info <name>
Datastore
Datastore
vmware-aiops datastore browse <ds> --pattern "*.ova"
vmware-aiops datastore browse <ds> --pattern "*.ova"
Alarm management
Alarm management
vmware-aiops alarm list [--target <t>]
vmware-aiops alarm acknowledge <entity_name> <alarm_name> [--target <t>]
vmware-aiops alarm reset <entity_name> <alarm_name> [--target <t>]
vmware-aiops alarm list [--target <t>]
vmware-aiops alarm acknowledge <entity_name> <alarm_name> [--target <t>]
vmware-aiops alarm reset <entity_name> <alarm_name> [--target <t>]
Family
Family
vmware-aiops hub status # show installed family members + install commands
> Full CLI reference: see `references/cli-reference.md`vmware-aiops hub status # show installed family members + install commands
> 完整CLI参考:请查看`references/cli-reference.md`Troubleshooting
故障排除
"VM not found" error
"VM未找到"错误
VM names are case-sensitive in vSphere. Use exact name from .
vmware-monitor inventory vmsvSphere中的VM名称区分大小写。请使用返回的精确名称。
vmware-monitor inventory vmsGuest exec returns empty output
客户机执行返回空输出
Use instead of — it auto-captures stdout/stderr. Basic only returns exit code.
vm_guest_exec_outputvm_guest_execvm_guest_exec请使用替代——它会自动捕获标准输出/错误。基础版仅返回退出码。
vm_guest_exec_outputvm_guest_execvm_guest_execDeploy OVA times out
部署OVA超时
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.
大型OVA文件(>10GB)可能超过默认120秒超时时间。上传通过HTTP NFC租约进行——确保运行vmware-aiops的机器与ESXi之间的网络稳定。
Plan apply fails mid-way
计划执行中途失败
Run to see failed plan status. Ask user if they want to rollback with . Irreversible steps (delete_vm) are skipped during rollback.
vmware-aiops plan listvm_rollback_plan运行查看失败计划状态。询问用户是否要使用回滚。不可逆步骤(delete_vm)在回滚时会被跳过。
vmware-aiops plan listvm_rollback_planConnection refused / SSL error
连接被拒绝/SSL错误
- Verify target is reachable:
vmware-aiops doctor - For self-signed certs: set in config.yaml (lab environments only)
disableSslCertValidation: true
- 验证目标可达:
vmware-aiops doctor - 对于自签名证书:在config.yaml中设置(仅适用于实验室环境)
disableSslCertValidation: true
Setup
配置
bash
uv tool install vmware-aiops
mkdir -p ~/.vmware-aiops
vmware-aiops init # generates config.yaml and .env templates
chmod 600 ~/.vmware-aiops/.envAll tools are automatically audited via vmware-policy. Audit logs:vmware-audit log --last 20
Full setup guide, security details, and AI platform compatibility: seereferences/setup-guide.md
bash
uv tool install vmware-aiops
mkdir -p ~/.vmware-aiops
vmware-aiops init # generates config.yaml and .env templates
chmod 600 ~/.vmware-aiops/.env所有操作均通过vmware-policy自动审计。审计日志:vmware-audit log --last 20
完整配置指南、安全细节和AI平台兼容性:请查看references/setup-guide.md
Audit & Safety
审计与安全
All operations are automatically audited via vmware-policy ( decorator):
@vmware_tool- Every tool call logged to (SQLite, framework-agnostic)
~/.vmware/audit.db - Policy rules enforced via (deny rules, maintenance windows, risk levels)
~/.vmware/rules.yaml - Risk classification: each tool tagged as low/medium/high/critical
- View recent operations:
vmware-audit log --last 20 - View denied operations:
vmware-audit log --status denied
vmware-policy is automatically installed as a dependency — no manual setup needed.
所有操作均通过vmware-policy自动审计(装饰器):
@vmware_tool- 每个工具调用都会记录到(SQLite,与框架无关)
~/.vmware/audit.db - 通过强制执行策略规则(拒绝规则、维护窗口、风险等级)
~/.vmware/rules.yaml - 风险分类:每个工具标记为低/中/高/严重
- 查看近期操作:
vmware-audit log --last 20 - 查看被拒绝的操作:
vmware-audit log --status denied
vmware-policy会作为依赖自动安装——无需手动配置。