### VM lifecycle management example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/goose.md Example interaction for cloning VMs. ```text You: Clone vm-template to create 3 new web servers, name them web04/web05/web06 Goose: [calls vm_create_plan, then vm_apply_plan] Plan created: clone vm-template × 3 Step 1/3: Deploying web04... ✓ Step 2/3: Deploying web05... ✓ Step 3/3: Deploying web06... ✓ ``` -------------------------------- ### Example: Get VM Details Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/continue.md Shows how to use vmware-aiops through Continue to retrieve detailed information about a specific virtual machine. This example utilizes the `vm_info` tool to fetch VM status, resources, OS, IP, snapshots, and datastore details. ```markdown You: @vmware-aiops Get details for vm-app01 Continue: [calls vm_info] vm-app01: Power: ON | vCPU: 8 | RAM: 32GB (28GB used) Guest OS: Ubuntu 22.04 | IP: 10.0.1.45 Snapshots: 2 (oldest: 14 days ago) Datastore: ssd-ds01 (free: 450GB) ``` -------------------------------- ### Install via PyPI Source: https://github.com/zw008/vmware-aiops/blob/main/README-CN.md Standard installation methods using Python package managers. ```bash uv tool install vmware-aiops ``` ```bash pip install vmware-aiops ``` ```bash pip install vmware-aiops -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### Guest operations example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/goose.md Example interaction for executing commands on a guest VM. ```text You: Run "df -h" on vm-linux01 and show disk usage Goose: [calls vm_guest_exec_output] Filesystem Size Used Avail Use% /dev/sda1 50G 32G 18G 64% /dev/sdb1 200G 180G 20G 90% ← nearing capacity ``` -------------------------------- ### Deploy VM from template example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/cursor.md Example of cloning a template to create a new VM via Cursor. ```text You: Clone dev-template to create a new VM named test-env-01 Cursor: [calls vm_create_plan, then vm_apply_plan] Plan: clone dev-template → test-env-01 Executing... ✓ VM deployed successfully. ``` -------------------------------- ### Install Aider Chat and Serve Ollama Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Install the Aider Chat Python package and start the Ollama service. This is a prerequisite for running Aider with local models. ```bash pip install aider-chat ollama serve ``` -------------------------------- ### Local Installation for Claude Code Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Manual setup steps to clone, register, and enable the plugin locally. ```bash # Clone and symlink git clone https://github.com/zw008/VMware-AIops.git ln -sf $(pwd)/VMware-AIops ~/.claude/plugins/marketplaces/vmware-aiops # Register marketplace python3 -c " import json, pathlib f = pathlib.Path.home() / '.claude/plugins/known_marketplaces.json' d = json.loads(f.read_text()) if f.exists() else {} d['vmware-aiops'] = { 'source': {'source': 'github', 'repo': 'zw008/VMware-AIops'}, 'installLocation': str(pathlib.Path.home() / '.claude/plugins/marketplaces/vmware-aiops') } f.write_text(json.dumps(d, indent=2)) " # Enable plugin python3 -c " import json, pathlib f = pathlib.Path.home() / '.claude/settings.json' d = json.loads(f.read_text()) if f.exists() else {} d.setdefault('enabledPlugins', {})['vmware-ops@vmware-aiops'] = True f.write_text(json.dumps(d, indent=2)) " ``` ```bash /vmware-ops:vmware-aiops ``` -------------------------------- ### Query infrastructure example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/cursor.md Example of querying powered-on VMs via Cursor chat. ```text You: How many VMs are powered on in my vCenter? Cursor: [calls list_virtual_machines with power_state=poweredOn] Found 42 powered-on VMs across 3 clusters. ``` -------------------------------- ### Install Companion Skills Source: https://github.com/zw008/vmware-aiops/blob/main/README-CN.md Commands to install related monitoring, storage, and Kubernetes management skills. ```bash uv tool install vmware-monitor ``` ```bash uv tool install vmware-storage ``` ```bash uv tool install vmware-vks ``` -------------------------------- ### Install and Use OpenAI Codex CLI Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Setup steps for integrating VMware-AIops skills into the Codex CLI. ```bash # Install Codex CLI npm i -g @openai/codex # Or on macOS: # brew install --cask codex # Copy skill to Codex skills directory mkdir -p ~/.codex/skills/vmware-aiops cp codex-skill/SKILL.md ~/.codex/skills/vmware-aiops/SKILL.md # Copy AGENTS.md to project root cp codex-skill/AGENTS.md ./AGENTS.md ``` ```bash codex --enable skills > List all VMs on my ESXi ``` -------------------------------- ### Install and Use Gemini CLI Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Installation commands for the Gemini CLI extension. ```bash # Install Gemini CLI npm install -g @google/gemini-cli # Install the extension from the cloned repo gemini extensions install ./gemini-extension # Or install directly from GitHub # gemini extensions install https://github.com/zw008/VMware-AIops ``` ```bash gemini > Show me all VMs on my ESXi host ``` -------------------------------- ### Install vmware-monitor Source: https://github.com/zw008/vmware-aiops/blob/main/examples/ollama-local-setup.md Install vmware-monitor for read-only operations in production environments. ```bash uv tool install vmware-monitor ``` -------------------------------- ### Install and Configure vmware-aiops Source: https://github.com/zw008/vmware-aiops/blob/main/examples/mcp-configs/README.md Initial setup for the CLI tool and credential file structure. Requires manual editing of the generated config and environment files. ```bash # Install vmware-aiops uv tool install vmware-aiops # or: pip install vmware-aiops # Configure credentials mkdir -p ~/.vmware-aiops cp config.example.yaml ~/.vmware-aiops/config.yaml cp .env.example ~/.vmware-aiops/.env chmod 600 ~/.vmware-aiops/.env # Edit config.yaml and .env with your vCenter/ESXi details ``` -------------------------------- ### Development Environment Setup Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/setup-guide.md Commands to clone the repository and set up a local development environment using uv. ```bash git clone https://github.com/zw008/VMware-AIops.git cd VMware-AIops uv venv && source .venv/bin/activate uv pip install -e . ``` -------------------------------- ### Configure Continue CLI Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Setup instructions for Continue CLI and local model configuration. ```bash # Install Continue CLI npm i -g @continuedev/cli # Copy rules file mkdir -p .continue/rules cp codex-skill/AGENTS.md .continue/rules/vmware-aiops.md ``` ```yaml models: - name: local-coder provider: ollama model: qwen2.5-coder:32b ``` ```bash cn > Check ESXi health and alarms ``` -------------------------------- ### Run command inside VM example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/cursor.md Example of executing a command within a guest VM via Cursor. ```text You: Check disk usage on vm-linux01 Cursor: [calls vm_guest_exec_output] Filesystem Size Used Avail Use% /dev/sda1 50G 32G 18G 64% /dev/sdb1 200G 180G 20G 90% ← nearing capacity ``` -------------------------------- ### Natural language query example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/goose.md Example interaction for querying VM status. ```text You: Which VMs have been powered off for more than 7 days? Goose: [calls list_virtual_machines, get_events] Found 4 powered-off VMs idle > 7 days: - vm-test-old (14 days), vm-dev-unused (21 days) ... ``` -------------------------------- ### Install and Initialize VMware AIops Source: https://context7.com/zw008/vmware-aiops/llms.txt Commands to install the tool, set up the configuration directory, and verify connectivity. ```bash # Install via uv (recommended) uv tool install vmware-aiops # Or via pip pip install vmware-aiops # Create configuration directory mkdir -p ~/.vmware-aiops # Generate config templates vmware-aiops init # Set permissions on credentials file chmod 600 ~/.vmware-aiops/.env # Verify installation and connectivity vmware-aiops doctor ``` -------------------------------- ### Set Up VMware AI Ops Environment Variables Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Steps to copy the example .env file for storing passwords, edit it with credentials, and set secure file permissions. ```bash # Use the template cp .env.example ~/.vmware-aiops/.env # Edit and fill in your passwords, then lock permissions chmod 600 ~/.vmware-aiops/.env ``` -------------------------------- ### Install vmware-aiops Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/localcowork.md Installs the vmware-aiops tool using the uv package manager. Ensure uv is installed and configured. ```bash uv tool install vmware-aiops ``` -------------------------------- ### Create and Configure VMware AI Ops Configuration File Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Instructions to create the configuration directory, copy the example configuration file, and edit it with vCenter/ESXi targets. ```bash mkdir -p ~/.vmware-aiops cp config.example.yaml ~/.vmware-aiops/config.yaml # Edit config.yaml with your vCenter/ESXi targets ``` -------------------------------- ### Install vmware-aiops via PyPI Source: https://github.com/zw008/vmware-aiops/blob/main/RELEASE_NOTES.md Use this command to install the package using the uv tool. ```bash uv tool install vmware-aiops==1.1.0 ``` -------------------------------- ### Install Software Inside VM via Guest Exec Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs software within a running VM using guest execution. Requires specifying the VM name, command, arguments, and user. ```bash vmware-aiops vm guest-exec lab-vm --cmd /bin/bash --args "-c 'apt-get install -y nginx'" --user root ``` -------------------------------- ### Install and Run Aider Source: https://github.com/zw008/vmware-aiops/blob/main/examples/ollama-local-setup.md Install the Aider chat client and run it with Ollama and vmware-aiops conventions for interactive command execution. ```bash pip install aider-chat ``` ```bash aider --conventions codex-skill/AGENTS.md --model ollama/qwen2.5-coder:32b ``` -------------------------------- ### Guest Provisioning with Python Source: https://context7.com/zw008/vmware-aiops/llms.txt Automates VM setup by running a sequence of guest operations (upload, exec, service) using a Python script. Requires VMware Tools. ```python # MCP Tool: vm_guest_provision # Provision a VM with SSH key, software install, and service start steps = [ {"type": "upload", "local_path": "~/.ssh/id_rsa.pub", "guest_path": "/root/.ssh/authorized_keys"}, {"type": "exec", "command": "chmod 600 /root/.ssh/authorized_keys"}, {"type": "exec", "command": "apt-get update && apt-get install -y nginx"}, {"type": "service", "name": "nginx", "action": "enable"}, {"type": "service", "name": "nginx", "action": "start"}, ] result = vm_guest_provision( vm_name="web-server", username="root", password="guest-password", steps=steps, timeout=300 ) ``` -------------------------------- ### Define Operation List for vm_create_plan Source: https://github.com/zw008/vmware-aiops/blob/main/docs/plans/2026-03-09-plan-apply-design.md Example input structure for the vm_create_plan tool, containing a list of actions to be performed on a VM. ```json { "operations": [ {"action": "power_off", "vm_name": "test-1"}, {"action": "revert_snapshot", "vm_name": "test-1", "snapshot": "baseline"}, {"action": "power_on", "vm_name": "test-1"} ] } ``` -------------------------------- ### Initialize VMware-AIops Environment Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Standard installation and initialization sequence for the CLI tool. ```bash uv tool install vmware-aiops mkdir -p ~/.vmware-aiops vmware-aiops init # generates config.yaml and .env templates chmod 600 ~/.vmware-aiops/.env ``` -------------------------------- ### Deploy Lab Environment Workflow Source: https://context7.com/zw008/vmware-aiops/llms.txt Command-line steps to deploy a lab environment, starting from browsing datastore for OVA images to setting a time-to-live for auto-cleanup. ```bash # 1. Browse datastore for OVA images vmware-aiops datastore browse datastore1 --pattern "*.ova" ``` ```bash # 2. Deploy VM from OVA vmware-aiops deploy ova ./ubuntu-24.04.ova --name lab-vm --datastore datastore1 ``` ```bash # 3. Power on the VM vmware-aiops vm power-on lab-vm ``` ```bash # 4. Install software inside VM vmware-aiops vm guest-exec-output lab-vm \ --cmd "apt-get update && apt-get install -y nginx docker.io" \ --user root ``` ```bash # 5. Create baseline snapshot vmware-aiops vm snapshot-create lab-vm --name baseline ``` ```bash # 6. Set TTL for auto-cleanup (8 hours) vmware-aiops vm set-ttl lab-vm --minutes 480 ``` -------------------------------- ### Common Workflow: Deploy Lab Environment Source: https://context7.com/zw008/vmware-aiops/llms.txt A step-by-step bash script demonstrating the deployment of a lab environment using an OVA image, software installation, and setting up a cleanup timer. ```APIDOC ## Common Workflow: Deploy Lab Environment ### Description Complete workflow for deploying a lab environment with OVA image, software installation, and baseline snapshot. ### Steps 1. **Browse datastore for OVA images** ```bash vmware-aiops datastore browse datastore1 --pattern "*.ova" ``` 2. **Deploy VM from OVA** ```bash vmware-aiops deploy ova ./ubuntu-24.04.ova --name lab-vm --datastore datastore1 ``` 3. **Power on the VM** ```bash vmware-aiops vm power-on lab-vm ``` 4. **Install software inside VM** ```bash vmware-aiops vm guest-exec-output lab-vm \ --cmd "apt-get update && apt-get install -y nginx docker.io" \ --user root ``` 5. **Create baseline snapshot** ```bash vmware-aiops vm snapshot-create lab-vm --name baseline ``` 6. **Set TTL for auto-cleanup (8 hours)** ```bash vmware-aiops vm set-ttl lab-vm --minutes 480 ``` ``` -------------------------------- ### Batch deployment pipeline Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/mcp-agent.md Example of using an agent to perform batch VM deployment with TTL settings. ```python # Deploy 5 VMs from spec and set 24h TTL for auto-cleanup result = await agent.send( "Deploy 5 VMs from template ubuntu-22-base, " "name them test-01 through test-05, " "set TTL of 24 hours on each" ) ``` -------------------------------- ### Install vmware-avi Tool Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs the vmware-avi tool for load balancer management (AVI, ALB, AKO, Ingress). ```bash uv tool install vmware-avi ``` -------------------------------- ### Install VMware-AIops via Package Managers Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/setup-guide.md Use these commands to install the package using different registry sources. ```bash # Via PyPI (recommended for version pinning) uv tool install vmware-aiops==1.2.3 # Via Skills.sh (fetches from GitHub) npx skills add zw008/VMware-AIops # Via ClawHub (fetches from ClawHub registry snapshot of GitHub) clawhub install vmware-aiops ``` -------------------------------- ### Install VMware AIops via ClawHub Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Install the tool using the ClawHub command-line interface. ```bash clawhub install vmware-aiops ``` -------------------------------- ### Install Kimi Code Skill Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Command to register the skill file in the Kimi skills directory. ```bash # Copy skill file to Kimi skills directory mkdir -p ~/.kimi/skills/vmware-aiops cp kimi-skill/SKILL.md ~/.kimi/skills/vmware-aiops/SKILL.md ``` -------------------------------- ### Example: Deploy VM with Auto-Cleanup TTL Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/continue.md Illustrates deploying a test virtual machine from a template and setting a Time-To-Live (TTL) for automatic deletion using vmware-aiops and Continue. This involves a sequence of calls to `vm_create_plan`, `vm_apply_plan`, and `vm_set_ttl`. ```markdown You: @vmware-aiops Deploy a test VM from ubuntu-22-base with 4h TTL Continue: [calls vm_create_plan → vm_apply_plan → vm_set_ttl] ✓ vm-test-1741694400 deployed ✓ TTL set: auto-delete at 2026-03-12 08:00 UTC ``` -------------------------------- ### Install vmware-storage Tool Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs the vmware-storage tool for managing storage like iSCSI, vSAN, and datastores. ```bash uv tool install vmware-storage ``` -------------------------------- ### Configure VMware-AIops Environment Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/setup-guide.md Steps to install, verify, and initialize the configuration directory and environment variables. ```bash # 1. Install from PyPI (source: github.com/zw008/VMware-AIops) uv tool install vmware-aiops # 2. Verify installation source vmware-aiops --version # confirms installed version # 3. Configure mkdir -p ~/.vmware-aiops vmware-aiops init # generates config.yaml and .env templates chmod 600 ~/.vmware-aiops/.env # Edit ~/.vmware-aiops/config.yaml and .env with your target details ``` -------------------------------- ### Install vmware-nsx-mgmt Tool Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs the vmware-nsx-mgmt tool for NSX networking tasks such as segments and gateways. ```bash uv tool install vmware-nsx-mgmt ``` -------------------------------- ### Configure MCP Server Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Installation and configuration for MCP-compatible clients like Claude Desktop. ```bash # Run via uvx (recommended — works with uv tool install) uvx --from vmware-aiops vmware-aiops-mcp # With a custom config path VMWARE_AIOPS_CONFIG=/path/to/config.yaml uvx --from vmware-aiops vmware-aiops-mcp ``` ```json { "mcpServers": { "vmware-aiops": { "command": "uvx", "args": ["--from", "vmware-aiops", "vmware-aiops-mcp"], "env": { "VMWARE_AIOPS_CONFIG": "/path/to/config.yaml" } } } } ``` ```bash npx -y @smithery/cli install @zw008/VMware-AIops --client claude ``` -------------------------------- ### Install vmware-nsx-security Tool Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs the vmware-nsx-security tool for NSX security features like DFW rules. ```bash uv tool install vmware-nsx-security ``` -------------------------------- ### Install VMware AIops via Skills.sh Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Use this command to install the tool via the Skills.sh platform, compatible with various AI agents. ```bash npx skills add zw008/VMware-AIops ``` -------------------------------- ### Install via AI Tools Source: https://github.com/zw008/vmware-aiops/blob/main/README-CN.md Commands to add the toolset using AI-integrated package managers. ```bash npx skills add zw008/VMware-AIops ``` ```bash clawhub install vmware-aiops ``` -------------------------------- ### Run Aider with Ollama Source: https://github.com/zw008/vmware-aiops/blob/main/examples/mcp-configs/README.md Example command for running Aider with a local Ollama model. ```bash # Example: Aider + Ollama + vmware-aiops CLI aider --conventions codex-skill/AGENTS.md --model ollama/qwen2.5-coder:32b # Example: Continue + Ollama + MCP Server # Configure Continue with Ollama model + vmware-aiops MCP server ``` -------------------------------- ### Install VMware AIops via pip Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Standard installation using pip. A China mainland mirror is provided for faster downloads. ```bash pip install vmware-aiops ``` ```bash pip install vmware-aiops -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### Install and Use Claude Code Plugin Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Commands to install the plugin via marketplace and execute VMware operations within Claude Code. ```bash /plugin marketplace add zw008/VMware-AIops /plugin install vmware-ops ``` ```bash /vmware-ops:vmware-aiops > Show me all VMs on esxi-lab.example.com ``` -------------------------------- ### Run Aider with Ollama Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/setup-guide.md Example command for running Aider with local conventions and a specific Ollama model. ```bash # Example: Aider + Ollama (fully local, no cloud API) aider --conventions codex-skill/AGENTS.md --model ollama/qwen2.5-coder:32b ``` -------------------------------- ### Configure VS Code Copilot MCP server Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/vscode-copilot.md Provides configuration examples for both workspace-specific and user-level MCP server settings. ```json { "servers": { "vmware-aiops": { "type": "stdio", "command": "python", "args": ["-m", "mcp_server"], "cwd": "/path/to/VMware-AIops", "env": { "VMWARE_AIOPS_CONFIG": "${env:HOME}/.vmware-aiops/config.yaml" } } } } ``` ```json { "github.copilot.chat.mcp.enabled": true, "mcp": { "servers": { "vmware-aiops": { "type": "stdio", "command": "python", "args": ["-m", "mcp_server"], "cwd": "/path/to/VMware-AIops", "env": { "VMWARE_AIOPS_CONFIG": "/Users/your-name/.vmware-aiops/config.yaml" } } } } } ``` -------------------------------- ### Run Aider with Ollama and VMware AI Ops Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Example command to run Aider with Ollama and the VMware AI Ops integration, using a specific model and convention file. ```bash aider --conventions codex-skill/AGENTS.md --model ollama/qwen2.5-coder:32b ``` -------------------------------- ### Run Goose Session Source: https://github.com/zw008/vmware-aiops/blob/main/examples/ollama-local-setup.md Start a Goose session and interact with VMware using natural language commands. ```bash goose session > Check health status of all my VMware hosts ``` -------------------------------- ### Run Aider with Local Qwen Model Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Configure Aider to use the local Qwen 2.5 Coder 32B model served by Ollama. This setup is recommended for local coding assistance. ```bash # Aider + local Qwen (recommended) --model ollama/qwen2.5-coder:32b ``` -------------------------------- ### Copilot usage examples Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/vscode-copilot.md Demonstrates natural language interaction with the vmware-aiops MCP server for common infrastructure tasks. ```text You: @vmware-aiops Show active alarms in prod-vcenter Copilot: [calls get_alarms with target=prod-vcenter] 3 active alarms: - CRITICAL: vm-api-gateway — disk I/O latency > 50ms - WARNING: esxi-03 — CPU utilization 88% - WARNING: datastore-nvme — 78% capacity used ``` ```text You: @vmware-aiops Deploy vm-test from template ubuntu-22-base, 4 vCPU, 8GB RAM, set 8h TTL Copilot: [calls vm_create_plan → vm_apply_plan → vm_set_ttl] ✓ vm-test deployed to esxi-02 / ssd-ds01 ✓ TTL: auto-delete at 20:00 UTC today IP: 10.0.2.87 (available in ~30s after tools install) ``` ```text You: @vmware-aiops Run "systemctl status my-service" on vm-backend01 Copilot: [calls vm_guest_exec] ● my-service.service Active: failed (Result: exit-code) since ... → Service crashed. Check /var/log/my-service/error.log ``` -------------------------------- ### Clone VMware AI Ops Repository and Set Up Virtual Environment Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Steps to clone the VMware AI Ops repository, create a Python virtual environment, activate it, and install the backend package. ```bash git clone https://github.com/zw008/VMware-AIops.git cd VMware-AIops python3 -m venv .venv source .venv/bin/activate pip install -e . ``` -------------------------------- ### Aider Natural Language Commands Source: https://github.com/zw008/vmware-aiops/blob/main/examples/ollama-local-setup.md Examples of natural language prompts to execute VMware operations using Aider. ```text > List all VMs on my lab ESXi > Show active alarms on vcenter-prod > What's the datastore usage? ``` -------------------------------- ### Install and Verify VMware AIops Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Use these commands to install the core vmware-aiops tool and verify the installation status of the VMware family modules. ```bash uv tool install vmware-aiops vmware-aiops doctor vmware-aiops hub status # see which family members are installed ``` -------------------------------- ### List powered-off VMs Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/localcowork.md Example of querying LocalCowork to list all virtual machines that are currently powered off. This demonstrates the inventory capabilities. ```text You: List all VMs that are powered off LocalCowork: [calls list_virtual_machines with power_state=off] Found 4 powered-off VMs: - vm-backup01 (4 vCPU, 8GB RAM) - vm-test02 (2 vCPU, 4GB RAM) - vm-old-db (8 vCPU, 32GB RAM) - vm-staging (4 vCPU, 16GB RAM) ``` -------------------------------- ### Deploy VM from template with plan Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/localcowork.md Demonstrates a safe, multi-step VM deployment process using LocalCowork. It first creates a deployment plan and then applies it after confirmation. This ensures resources are allocated and the deployment is validated. ```text You: Deploy a new VM from template "ubuntu-22.04-base" with 4 vCPU and 8GB RAM LocalCowork: [calls vm_create_plan] Plan ready: - Source: ubuntu-22.04-base - Resources: 4 vCPU / 8GB RAM - Target datastore: datastore01 (free: 1.2TB) Confirm to apply? (yes/no) You: yes [calls vm_apply_plan] ✓ VM deployed in 45s ``` -------------------------------- ### Example: Check Critical Alarms Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/continue.md Demonstrates how to query vmware-aiops via Continue for critical alarms in your VMware environment. This uses the `get_alarms` tool to retrieve and display alarm information. ```markdown You: @vmware-aiops Are there any critical alarms right now? Continue: [calls get_alarms] 2 critical alarms on prod-vcenter: - vm-db01: Memory usage at 98% (threshold: 90%) - esxi-host02: CPU ready time high (12ms avg) ``` -------------------------------- ### Infrastructure health check example Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/goose.md Example interaction for checking active alarms. ```text You: Show me all active alarms in my vCenter Goose: [calls get_alarms] Found 3 active alarms on prod-vcenter: - vm-web01: CPU usage critical (92%) - datastore01: Low disk space (85% used) - host02: Memory balloon active ``` -------------------------------- ### Execute command in VM guest Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/localcowork.md Example of using LocalCowork to execute a command within a virtual machine's guest operating system. This is useful for checking service status or running scripts remotely. ```text You: Check nginx status on vm-web01 LocalCowork: [calls vm_guest_exec] ● nginx.service - A high performance web server Loaded: loaded (/lib/systemd/system/nginx.service) Active: active (running) since Mon 2026-03-10 08:12:33 UTC; 23h ago ``` -------------------------------- ### Create a New VM Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Create a new virtual machine with specified CPU, memory, and disk size. ```bash vmware-aiops vm create [--cpu ] [--memory ] [--disk ] ``` -------------------------------- ### Check Hub Status Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Displays the status of installed family members and provides installation commands. ```bash vmware-aiops hub status ``` -------------------------------- ### Create VM Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Creates a new virtual machine with specified CPU, memory, and disk size. ```bash vmware-aiops vm create --cpu 4 --memory 8192 --disk 100 ``` -------------------------------- ### Install vmware-vks Tool Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs the vmware-vks tool for managing Tanzu Kubernetes on vSphere 8.x+. ```bash uv tool install vmware-vks ``` -------------------------------- ### Deploy Experimental Environment Source: https://github.com/zw008/vmware-aiops/blob/main/README-CN.md Common workflow commands for browsing datastores, deploying VMs from OVA, and configuring lifecycle settings. ```bash vmware-aiops datastore browse --pattern "*.ova" vmware-aiops deploy ova ./image.ova --name lab-vm --datastore ds1 vmware-aiops vm guest-exec lab-vm --cmd /bin/bash --args "-c 'apt-get install -y nginx'" --user root vmware-aiops vm snapshot-create lab-vm --name baseline vmware-aiops vm set-ttl lab-vm --minutes 480 ``` -------------------------------- ### Apply VM Creation Plan Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Executes a previously created VM plan sequentially. The process stops if any step fails. ```bash vm_apply_plan ``` -------------------------------- ### Install vmware-aria Tool Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Installs the vmware-aria tool for Aria Ops metrics, alerts, and capacity management. ```bash uv tool install vmware-aria ``` -------------------------------- ### Install VMware Family Modules Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Individual installation commands for extending the core vmware-aiops functionality with specialized modules. ```bash uv tool install vmware-monitor ``` ```bash uv tool install vmware-storage ``` ```bash uv tool install vmware-vks ``` ```bash uv tool install vmware-nsx-mgmt ``` ```bash uv tool install vmware-nsx-security ``` ```bash uv tool install vmware-aria ``` ```bash uv tool install vmware-avi ``` -------------------------------- ### Deploy Linked Clone or from ISO Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Deploy a linked clone from a source VM and snapshot, or deploy a VM by attaching an ISO image. ```bash vmware-aiops deploy linked-clone --source --snapshot --name ``` ```bash vmware-aiops deploy iso --iso "[datastore] path/file.iso" ``` -------------------------------- ### Install Ollama on macOS Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Install Ollama on macOS using Homebrew. Ollama is required for running local AI models. ```bash # macOS brew install ollama ``` -------------------------------- ### Deploy VM from OVA or Template Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Deploy a virtual machine from an OVA file or a VM template. Optional datastore and network can be specified. ```bash vmware-aiops deploy ova --name [--datastore ] [--network ] ``` ```bash vmware-aiops deploy template --name [--datastore ] ``` -------------------------------- ### Verify vmware-aiops setup Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/localcowork.md Runs the vmware-aiops doctor command to check if the setup and configuration are correct. This is a crucial step before integrating with other tools. ```bash vmware-aiops doctor ``` -------------------------------- ### Update VMware AI Ops Installation Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Re-run the install command for your specific channel to update to the latest version of VMware AI Ops. ```bash clawhub install vmware-aiops ``` ```bash npx skills add zw008/VMware-AIops ``` ```bash /plugin marketplace add zw008/VMware-AIops ``` ```bash cd VMware-AIops && git pull origin main && uv pip install -e . ``` ```bash uv tool install vmware-aiops --force ``` -------------------------------- ### Browse Datastore Files Source: https://context7.com/zw008/vmware-aiops/llms.txt Navigate datastore file systems and scan for deployable image formats. ```bash # Browse datastore root vmware-aiops datastore browse datastore1 # Browse specific subdirectory vmware-aiops datastore browse datastore1 --path "iso/" # Browse with pattern filter vmware-aiops datastore browse datastore1 --pattern "*.ova" # Scan all datastores for deployable images vmware-aiops datastore scan-images --target prod-vcenter ``` -------------------------------- ### Create VM Creation Plan Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Initiates the creation of a plan for batch VM operations, including cloning and reconfiguration. ```bash vm_create_plan ``` -------------------------------- ### Manage VM Snapshots Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Create, list, revert, and delete snapshots for a virtual machine. Snapshots require a name. ```bash vmware-aiops vm snapshot-create --name ``` ```bash vmware-aiops vm snapshot-list ``` ```bash vmware-aiops vm snapshot-revert --name ``` ```bash vmware-aiops vm snapshot-delete --name ``` -------------------------------- ### Get Cluster Information Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Retrieve information about a specific cluster by its name. ```bash vmware-aiops cluster info ``` -------------------------------- ### VM Deployment and Provisioning Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/capabilities.md Commands for deploying virtual machines from templates, OVAs, or cloning existing VMs. ```APIDOC ## VM Deployment ### Commands - **Deploy from OVA**: `deploy ova --name ` - **Deploy from Template**: `deploy template --name ` - **Linked Clone**: `deploy linked-clone --source --snapshot --name ` - **Attach ISO**: `deploy iso --iso "[ds] path/to.iso"` - **Convert to Template**: `deploy mark-template ` - **Batch Clone**: `deploy batch-clone --source --count ` - **Batch Deploy**: `deploy batch spec.yaml` ``` -------------------------------- ### Create, Delete, and Reconfigure VMs Source: https://context7.com/zw008/vmware-aiops/llms.txt Commands for provisioning new VMs and modifying existing resource allocations. ```bash # Create a new VM with 4 CPUs, 8GB RAM, 100GB disk vmware-aiops vm create my-new-vm --cpu 4 --memory 8192 --disk 100 --target lab-esxi # Delete a VM (requires double confirmation) vmware-aiops vm delete my-old-vm # Reconfigure existing VM resources (requires double confirmation) vmware-aiops vm reconfigure my-vm --cpu 8 --memory 16384 ``` -------------------------------- ### Create Baseline Snapshot for VM Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Creates a baseline snapshot for a virtual machine. Specify the VM name and the desired snapshot name. ```bash vmware-aiops vm snapshot-create lab-vm --name baseline ``` -------------------------------- ### Check Python Version Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Verify that Python version 3.10 or higher is installed, which is a prerequisite for the Python backend. ```bash python3 --version ``` -------------------------------- ### Plan/Apply Tools Source: https://context7.com/zw008/vmware-aiops/llms.txt Tools for creating, applying, rolling back, and listing deployment plans. ```APIDOC ## Plan/Apply Tools ### Description Tools for creating, applying, rolling back, and listing deployment plans. ### Tools - **vm_create_plan**(operations: list[dict], target: str = None) -> dict - **vm_apply_plan**(plan_id: str, target: str = None) -> dict - **vm_rollback_plan**(plan_id: str, target: str = None) -> dict - **vm_list_plans**() -> list[dict] ``` -------------------------------- ### Run Aider with VMware-AIops Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Installation and execution commands for Aider, including support for local models via Ollama. ```bash # Install Aider pip install aider-chat # Install Ollama for local models (optional) # macOS: brew install ollama ollama pull qwen2.5-coder:32b # Run with cloud API aider --conventions codex-skill/AGENTS.md # Or with local model via Ollama aider --conventions codex-skill/AGENTS.md \ --model ollama/qwen2.5-coder:32b ``` -------------------------------- ### Automated health check in an agent workflow Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/mcp-agent.md Example of initializing an MCPApp and using an agent to query infrastructure health. ```python # agent_script.py from mcp_agent.app import MCPApp from mcp_agent.agents.agent import Agent from mcp_agent.workflows.orchestrator.orchestrator import Orchestrator app = MCPApp(name="vmware-health-check") async with app.run() as vmware_app: agent = Agent( name="vmware-ops", instruction="You manage VMware infrastructure. Check health and report issues.", server_names=["vmware-aiops"], ) async with agent: result = await agent.send("Get all active alarms and summarize by severity") print(result) ``` -------------------------------- ### Run Aider with Low-Memory Local Qwen Model Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Configure Aider to use the lower-memory Qwen 2.5 Coder 7B model served by Ollama for systems with limited resources. ```bash # Low-memory option --model ollama/qwen2.5-coder:7b ``` -------------------------------- ### Check Current VMware AI Ops Version Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Command to check the currently installed version of VMware AI Ops. ```bash vmware-aiops --version ``` -------------------------------- ### Upload and Download Files in VM Guest OS Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Upload local files to the guest OS or download files from the guest OS. Requires VMware Tools and specifying the user. ```bash vmware-aiops vm guest-upload --local ./script.sh --guest /tmp/script.sh --user root ``` ```bash vmware-aiops vm guest-download --guest /var/log/syslog --local ./syslog.txt --user root ``` -------------------------------- ### Check Node.js Version Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Verify that Node.js version 18 or higher is installed, required for Gemini CLI and Codex CLI. ```bash node --version ``` -------------------------------- ### Deploy VM from Template Source: https://context7.com/zw008/vmware-aiops/llms.txt Clones a virtual machine from an existing vSphere template. Allows overriding CPU and memory resources. ```bash # Deploy from template vmware-aiops deploy template golden-ubuntu --name new-dev-vm ``` ```bash # Deploy with custom resources vmware-aiops deploy template golden-ubuntu \ --name new-dev-vm \ --datastore datastore1 \ --cpu 8 \ --memory 16384 ``` -------------------------------- ### Deployment Tools Source: https://context7.com/zw008/vmware-aiops/llms.txt Tools for deploying virtual machines from OVA images, templates, and linked clones, as well as managing ISO attachments and VM conversions. ```APIDOC ## Deployment Tools ### Description Tools for deploying virtual machines from OVA images, templates, and linked clones, as well as managing ISO attachments and VM conversions. ### Tools - **deploy_vm_from_ova**(ova_path: str, vm_name: str, datastore_name: str, ...) -> str - **deploy_vm_from_template**(template_name: str, new_name: str, ...) -> str - **deploy_linked_clone**(source_vm_name: str, snapshot_name: str, new_name: str, ...) -> str - **attach_iso_to_vm**(vm_name: str, iso_ds_path: str, target: str = None) -> str - **convert_vm_to_template**(vm_name: str, target: str = None) -> str - **batch_clone_vms**(source_vm_name: str, vm_names: list[str], ...) -> list[dict] - **batch_linked_clone_vms**(source_vm_name: str, snapshot_name: str, vm_names: list[str], ...) -> list[dict] - **batch_deploy_from_spec**(spec_path: str, target: str = None) -> list[dict] ``` -------------------------------- ### Configure Continue CLI for Qwen Source: https://github.com/zw008/vmware-aiops/blob/main/README.md Configure the Continue CLI to use Qwen models by specifying the provider, API base, API key, and model name in the config file. ```yaml # Qwen models: - name: qwen-coder provider: openai-compatible apiBase: https://dashscope.aliyuncs.com/compatible-mode/v1 apiKey: your-dashscope-key model: qwen-coder-plus-latest ``` -------------------------------- ### Manage Daemon Service Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md Control the status of the AIOPs daemon service. Commands include start, stop, and status checks. ```bash vmware-aiops daemon start ``` ```bash vmware-aiops daemon stop ``` ```bash vmware-aiops daemon status ``` -------------------------------- ### List Plans Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/references/cli-reference.md List available plans for multi-step operations. ```bash vmware-aiops plan list ``` -------------------------------- ### Execute Multi-Step VM Operations Source: https://context7.com/zw008/vmware-aiops/llms.txt Use the vm_create_plan function to define a sequence of VM actions, then apply or rollback the plan as needed. ```python # MCP Tool: vm_create_plan # Create a plan for multi-step operations operations = [ {"action": "power_off", "vm_name": "test-1"}, {"action": "revert_snapshot", "vm_name": "test-1", "snapshot_name": "baseline"}, {"action": "power_on", "vm_name": "test-1"}, {"action": "power_off", "vm_name": "test-2"}, {"action": "revert_snapshot", "vm_name": "test-2", "snapshot_name": "baseline"}, {"action": "power_on", "vm_name": "test-2"}, ] plan = vm_create_plan(operations=operations, target="prod-vcenter") # Returns: {"plan_id": "abc123", "steps": [...], "summary": {"vms_affected": 2, "irreversible_steps": 0, "rollback_available": true}} # Apply the plan after user confirmation result = vm_apply_plan(plan_id="abc123") # Returns: {"status": "success", "completed_steps": 6} # If plan fails, rollback executed steps rollback_result = vm_rollback_plan(plan_id="abc123") # Returns: {"status": "rolled_back", "reversed_steps": 3, "skipped_steps": 0} # List all pending/failed plans plans = vm_list_plans() # Returns: [{"plan_id": "abc123", "status": "pending", "steps": 6, "created_at": "..."}] ``` -------------------------------- ### Execute Command Inside VM Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Executes a command within a virtual machine. Requires VMware Tools to be installed. Specify the VM name, command, arguments, and user. ```bash vmware-aiops vm guest-exec --cmd /bin/bash --args "-c 'whoami'" --user root ``` -------------------------------- ### Plan and Apply Management Tools Source: https://context7.com/zw008/vmware-aiops/llms.txt Functions for creating, applying, and rolling back execution plans. ```python vm_create_plan(operations: list[dict], target: str = None) -> dict ``` ```python vm_apply_plan(plan_id: str, target: str = None) -> dict ``` ```python vm_rollback_plan(plan_id: str, target: str = None) -> dict ``` ```python vm_list_plans() -> list[dict] ``` -------------------------------- ### Deploy VM from OVA Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Deploys a virtual machine from an OVA file. Specify the OVA path, VM name, and datastore. ```bash vmware-aiops deploy ova --name --datastore ``` -------------------------------- ### Transfer Files to/from VM Guest Source: https://context7.com/zw008/vmware-aiops/llms.txt Uploads or downloads files between the local machine and a virtual machine using VMware Tools. Requires VMware Tools to be installed and running. ```bash # Upload file to VM vmware-aiops vm guest-upload my-vm \ --local ./script.sh \ --guest /tmp/script.sh \ --user root ``` ```bash # Download file from VM vmware-aiops vm guest-download my-vm \ --guest /var/log/syslog \ --local ./syslog.txt \ --user root ``` -------------------------------- ### Configure Goose interactively Source: https://github.com/zw008/vmware-aiops/blob/main/docs/integrations/goose.md Use the interactive configuration tool to add the MCP server. ```bash goose configure # Select: Add Extension → MCP Server # Name: vmware-aiops # Command: uvx --from vmware-aiops vmware-aiops-mcp # Env: VMWARE_AIOPS_CONFIG=~/.vmware-aiops/config.yaml ``` -------------------------------- ### Run MCP Server with Docker Compose Source: https://github.com/zw008/vmware-aiops/blob/main/RELEASE_NOTES.md Use this command to launch the MCP server without installing Python or a virtual environment. The configuration directory is mounted read-only into the container. ```bash docker compose up -d ``` -------------------------------- ### Deploy VM from OVA Source: https://github.com/zw008/vmware-aiops/blob/main/skills/vmware-aiops/SKILL.md Deploys a virtual machine from an OVA file. Requires specifying the OVA path, VM name, and target datastore. ```bash vmware-aiops deploy ova ./image.ova --name lab-vm --datastore ds1 ```