{
  "markdown": "<!-- mcp-name: io.github.vmware-skills/vmware-storage -->\n# VMware Storage\n\n> **Author**: Wei Zhou, VMware by Broadcom — wei-wz.zhou@broadcom.com\n> This is a community-driven project by a VMware engineer, not an official VMware product.\n> For official VMware developer tools see [developer.broadcom.com](https://developer.broadcom.com).\n\n[English](README.md) | [中文](README-CN.md)\n\nVMware vSphere storage management: datastores, iSCSI, vSAN — 12 MCP tools, domain-focused and lightweight.\n\n> Split from vmware-aiops for lighter context and local model compatibility.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n## Companion Skills\n\n| Skill | Scope | Tools | Install |\n|-------|-------|:-----:|---------|\n| **[vmware-aiops](https://github.com/vmware-skills/VMware-AIops)** ⭐ entry point | VM lifecycle, deployment, guest ops, clusters | 49 | `uv tool install vmware-aiops` |\n| **[vmware-monitor](https://github.com/vmware-skills/VMware-Monitor)** | Read-only monitoring, alarms, events, VM info | 27 | `uv tool install vmware-monitor` |\n| **[vmware-vks](https://github.com/vmware-skills/VMware-VKS)** | Tanzu Namespaces, TKC cluster lifecycle | 20 | `uv tool install vmware-vks` |\n| **[vmware-nsx](https://github.com/vmware-skills/VMware-NSX)** | NSX networking: segments, gateways, NAT, IPAM | 33 | `uv tool install vmware-nsx-mgmt` |\n| **[vmware-nsx-security](https://github.com/vmware-skills/VMware-NSX-Security)** | DFW microsegmentation, security groups, Traceflow | 21 | `uv tool install vmware-nsx-security` |\n| **[vmware-aria](https://github.com/vmware-skills/VMware-Aria)** | Aria Ops metrics, alerts, capacity planning | 28 | `uv tool install vmware-aria` |\n\n## Quick Install\n\n```bash\n# Via PyPI\nuv tool install vmware-storage\n\n# Or pip\npip install vmware-storage\n```\n\n## Offline / Air-Gapped Install (from source)\n\nThis project uses the modern PEP 517 build system (hatchling), so there is **no\n`setup.py`** by design — that is expected, not a missing file. If you cloned the\nsource and hit `ERROR: File \"setup.py\" or \"setup.cfg\" not found ... editable mode\ncurrently requires a setuptools-based build`, your `pip` is older than 21.3 and\ncannot do an *editable* (`-e`) install with a non-setuptools backend. Editable\nmode is a developer convenience, not needed to run the tool — do one of:\n\n```bash\n# From the source tree — a normal (non-editable) install builds a wheel:\npip install .              # NOT  pip install -e .\n\n# ...or upgrade pip first, and editable works too:\npip install --upgrade pip && pip install -e .\n```\n\nFor a **truly air-gapped host**, build the wheels on a connected machine and copy\nthem over — the target then needs no network:\n\n```bash\n# On a connected machine, collect this package + its dependencies as wheels:\npip wheel . -w dist        # → dist/*.whl   (or: uv build, for just this package)\n\n# Copy dist/ to the air-gapped host, then install offline:\npip install --no-index --find-links dist vmware-storage\n```\n\n## Configuration\n\n```bash\nmkdir -p ~/.vmware-storage\ncp config.example.yaml ~/.vmware-storage/config.yaml\n# Edit with your vCenter/ESXi credentials\n\necho \"VMWARE_MY_VCENTER_PASSWORD=your_password\" > ~/.vmware-storage/.env\nchmod 600 ~/.vmware-storage/.env\n\n# Verify\nvmware-storage doctor\n```\n\n## MCP Tools (12)\n\n| Category | Tools | Type |\n|----------|-------|------|\n| Datastore | `list_all_datastores`, `browse_datastore`, `scan_datastore_images`, `list_cached_images` | Read |\n| iSCSI | `storage_iscsi_enable`, `storage_iscsi_status`, `storage_iscsi_add_target`, `storage_iscsi_remove_target`, `storage_rescan` | Read/Write |\n| vSAN | `vsan_health`, `vsan_capacity` | Read |\n\n## Auto-Remediation Patterns (PoC)\n\nThe [`patterns/`](patterns/) directory hosts L5 auto-remediation candidate patterns from the Enterprise Harness Engineering framework. The first PoC pattern, [`patterns/iscsi-target-stale-rescan.yaml`](patterns/iscsi-target-stale-rescan.yaml), describes an iSCSI HBA rescan as a low-risk, reversible, repeatable operation. The pattern schema is documented here only — runtime enforcement is **not yet wired up**, so this is a reference design, not production auto-remediation.\n\n## Common Workflows\n\n### Set Up iSCSI Storage on a Host\n\n1. Enable iSCSI adapter: `vmware-storage iscsi enable esxi-01`\n2. Add target: `vmware-storage iscsi add-target esxi-01 10.0.0.100`\n3. Verify: `vmware-storage iscsi status esxi-01`\n\nThe `add-target` command automatically rescans storage. Use `--dry-run` to preview any write command first.\n\n### Find Deployable Images Across Datastores\n\n1. List all datastores: `vmware-storage datastore list`\n2. Scan for images: `vmware-storage datastore scan-images datastore01`\n3. Browse with a pattern: `vmware-storage datastore browse datastore01 --pattern \"*.iso\"`\n\n### vSAN Health Assessment\n\n1. Check health: `vmware-storage vsan health Cluster-Prod`\n2. Check capacity: `vmware-storage vsan capacity Cluster-Prod`\n3. If issues found, investigate with `vmware-monitor` for alarms and events\n\n## CLI\n\n```bash\n# Datastore\nvmware-storage datastore list\nvmware-storage datastore browse datastore01\nvmware-storage datastore scan-images datastore01\n\n# iSCSI\nvmware-storage iscsi status esxi-01\nvmware-storage iscsi enable esxi-01\nvmware-storage iscsi add-target esxi-01 192.168.1.100\nvmware-storage iscsi remove-target esxi-01 192.168.1.100\nvmware-storage iscsi rescan esxi-01\n\n# vSAN\nvmware-storage vsan health Cluster-Prod\nvmware-storage vsan capacity Cluster-Prod\n\n# Diagnostics\nvmware-storage doctor\n```\n\n## MCP Server\n\n**After `uv tool install vmware-storage`, start the MCP server with one command** (v1.5.15+):\n\n```bash\n# Recommended — single command, no network re-resolve\nvmware-storage mcp\n\n# With a custom config path\nVMWARE_STORAGE_CONFIG=/path/to/config.yaml vmware-storage mcp\n\n# Or via Docker\ndocker compose up -d\n```\n\n### Agent Configuration\n\nAdd to your AI agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vmware-storage\": {\n      \"command\": \"vmware-storage\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"VMWARE_STORAGE_CONFIG\": \"~/.vmware-storage/config.yaml\"\n      }\n    }\n  }\n}\n```\n\n<details>\n<summary>Alternative: uvx (no install) or legacy entry point</summary>\n\n```bash\n# Run without installing (requires PyPI access each launch)\nuvx --from vmware-storage vmware-storage mcp\n\n# Legacy entry point (still works, kept for backward compatibility)\nvmware-storage-mcp\n```\n\n> **Behind a corporate TLS proxy?** uvx may fail with `invalid peer certificate: UnknownIssuer`.\n> Use the recommended `vmware-storage mcp` form above (no network needed), or set `UV_NATIVE_TLS=true`.\n\n</details>\n\n## Why a Separate Skill?\n\n`vmware-aiops` has 49 MCP tools — too heavy for local LLMs (7B-14B). By splitting storage into its own skill:\n\n- **11 tools** — fits comfortably in small model context windows\n- **Domain-focused** — storage admins get only what they need\n- **Composable** — use alongside vmware-monitor or vmware-aiops as needed\n\n## Version Compatibility\n\n**Python**: 3.10+ (since v1.5.27 — previously 3.11+). Tested on 3.10 / 3.11 / 3.12.\n\n| vSphere / VCF | Support | Notes |\n|---------|---------|-------|\n| VCF 9.1 / vSphere 9.1 | Full | Released 2026-05-12. pyVmomi+vSAN SDK `<10.0` works via SOAP. |\n| VCF 9.0 / vSphere 9.0 | Full | pyVmomi 8.0.3+ with bundled vSAN SDK connects to vSphere 9. |\n| 8.0 | Full | vSAN SDK built into pyVmomi 8.0.3+ |\n| 7.0 | Full | All storage APIs work |\n| 6.7 | Compatible | iSCSI + datastore features work; vSAN limited |\n\n#### Official Broadcom References\n\n- **SDKs**: <https://developer.broadcom.com/sdks> — VCF Python SDK, vSAN Management SDK (bundled in pyVmomi)\n- **REST APIs**: <https://developer.broadcom.com/xapis> — vSAN Management API, VCF API\n- **CLI Tools**: <https://developer.broadcom.com/tools> — PowerCLI 9.1, ESXCLI\n\n## Safety\n\n| Feature | Description |\n|---------|-------------|\n| Read-heavy | 8/12 tools are read-only |\n| Input validation | IP addresses and ports validated before iSCSI operations |\n| Audit logging | All operations logged to `~/.vmware-storage/audit.log` |\n| No VM operations | Cannot create, delete, or modify VMs |\n| Credential safety | Passwords only from environment variables, never config files |\n\n## Troubleshooting\n\n| Problem | Cause & Fix |\n|---------|-------------|\n| iSCSI enable fails with \"already enabled\" | Not an error — adapter is already active. Run `iscsi status` to see configured targets. |\n| \"Datastore not found\" when browsing | Datastore names are **case-sensitive**. Run `datastore list` to get the exact name. |\n| `vsan_health` returns `overall_health: null` | `null` = not asked (see `health_not_queried_reason`), never a measurement; a string is always vSAN's own answer, including its own `\"unknown\"`. Usual cause: connected to standalone ESXi, but the health service runs in **vCenter**. |\n| Rescan doesn't discover new LUNs | Wait 15-30 seconds after adding targets, then rescan again. Verify target IP is reachable from ESXi. |\n| \"Password not found\" error | Variable names follow `VMWARE_<TARGET_UPPER>_PASSWORD` (hyphens → underscores). Check `~/.vmware-storage/.env`. |\n| Connection timeout to vCenter | Use `vmware-storage doctor --skip-auth` to bypass auth checks on high-latency networks. |\n| \"Datastore browse did not finish within Ns\" | The datastore is very large or busy. Narrow the search with a sub-path and a specific pattern (e.g. `datastore browse ds01 --path templates --pattern \"*.ova\"`) instead of browsing the root — do not just retry the same broad browse. |\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 9555,
  "sha": "1be249d8dfef378db73e4cbb083f1b71ce5a7e34954014d5fb5dbe20e838fa09",
  "repo_slug": "vmware-skills/vmware-storage",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_vmware_skills_vmware_storage_1138ffdc/readme"
}