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/vmware-skills/VMware-Storage under the MIT license.
VMware vSphere storage management — 15 MCP tools for datastores, iSCSI, vSAN, Fibre Channel / multipath diagnostics, and an access self-check.
Split from vmware-aiops for lighter context and local model compatibility. Companion skills: vmware-aiops (VM lifecycle), vmware-monitor (read-only monitoring), 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)
CategoryToolsCountDatastorelist all datastores, browse files, scan for OVA/ISO/OVF/VMDK images, list cached images4iSCSIenable adapter, show status, add target, remove target, rescan HBAs5vSANcluster health summary, capacity overview (total/used/free), data-efficiency (dedup/compression)3FC / multipath (read-only)FC HBA inventory with WWPN/WWNN; per-device path state across hosts, datastore backing devices, path-count differences across hosts2Access (read-only)which account the server uses and whether it holds each tool's vSphere privileges1
bash
uv tool install vmware-storage==2.3.0
vmware-storage init # guided setup: writes config + .env (chmod 600, password grep-safe), then verifies
vmware-storage doctor
Use companion skills for:
vmware-aiopsvmware-monitorvmware-vksvmware-aviUser IntentRecommended SkillRead-only monitoring, alarms, eventsvmware-monitorStorage: iSCSI, vSAN, datastoresvmware-storage ← this skillVM lifecycle, deployment, guest opsvmware-aiopsTanzu Kubernetes (vSphere 8.x+)vmware-vksNSX networking: segments, gateways, NATvmware-nsxNSX security: DFW rules, security groupsvmware-nsx-securityAria Ops: metrics, alerts, capacity planningvmware-ariaMulti-step workflows with approvalvmware-pilotCompliance baselines (CIS / 等保 / PCI-DSS), drift detection, LLM remediation advisorvmware-harden ( uv tool install vmware-harden)Load balancer, AVI, ALB, AKO, Ingressvmware-avi ( uv tool install vmware-avi)Audit log queryvmware-policy ( vmware-audit CLI)
Pre-flight (judgment):
vmkping <iscsi-target-ip> from the ESXi host must succeed BEFORE adding the target. Adding an unreachable target leaves the host in a degraded state, retrying forever.iscsi status first — if already enabled, do not "re-enable"; just add the target.add-target is idempotent (re-adding same IP is a no-op), but remove-target is not safely reversible mid-IO. Always verify no LUNs from this target are in use before removing.access-info --tool add_iscsi_target checks Host.Config.Storage on the root folder; not_granted_at_root may still be granted on that host's cluster.Steps:
iscsi status esxi-01 → confirm adapter state and existing targetsiscsi enable esxi-01 --dry-run then real (skip if already enabled)iscsi add-target esxi-01 <ip> --dry-run then real (auto-rescans on success)iscsi status esxi-01 again → confirm target listed AND devices appearingiscsi rescan esxi-01 once more, then check ESXi-side vmkping and target ACLJudgment: image search is read-only and safe, but blind scanning of every datastore is slow on large estates. Filter first.
datastore list → get the inventory; ignore datastores marked inaccessible or low free spacedatastore scan-images <ds> on the datastore most likely to hold images (typically named iso-*, templates, or central nfs-shared)datastore browse <ds> --pattern "*.iso" for ad-hoc searches; pattern is glob, not regexdatastore list --target <vc> to verify exact spelling.For filtered queries against the cache: use list_cached_images MCP tool with image_type and datastore parameters — avoids re-scanning.
Judgment: vSAN problems often masquerade as vSphere problems and vice-versa. Check both planes — if vSAN is healthy but VMs are slow, the issue is at the compute or network layer, not storage.
vsan health <cluster> → look beyond green/red — check disk group state, network partitioning, and cluster member counts. A "yellow" disk group is the early warning of a failure.vsan capacity <cluster> → utilization > 70% triggers slack-space risk; > 80% impedes resync; never let prod cross 80%.vmware-monitor health alarms for vSAN-related alarms (HCL warnings, network anomalies)vmware-monitor inventory clusters; vSAN is opt-in, not defaultreferences/investigation-protocol.md (in companion skill) — vSAN issues frequently fail the Mechanism criterion (capacity is correlated, not causal)Judgment: report what vSphere observed, not a verdict. standby paths are normal on active/passive arrays, and equal path counts do not prove two independent fabrics. Zoning, array masking and switch health are out of scope.
paths devices --datastore <ds> → dead/disabled paths behind one datastore, per host (devices needing attention sort first)paths devices --cluster <c> --only-differences → shared devices some hosts do not see, or see through a different number of paths; each host's paths_total shows which has fewerpaths devices --host <h> --adapter vmhba2 → what depends on one HBA; only_paths_via_adapter: true means that host has no other path to the devicepaths fc-adapters --cluster <c> → WWPNs to hand to the SAN teamcomplete is false: hosts in hosts_not_read were not read (the reason says NoPermission or the connection state). Name them as unknown — never report them as missing the device--cluster, --host or --datastore; this tool does not read every host at onceAll commands accept --target <name> to operate against a specific vCenter or ESXi host from your config:
bash
# Default target (first in config.yaml)
vmware-storage datastore list
# Specific target
vmware-storage datastore list --target prod-vcenter
vmware-storage iscsi status esxi-lab --target lab-esxi
ScenarioRecommendedWhyLocal/small models (Ollama, Qwen)CLI~2K tokens vs ~8K for MCPCloud models (Claude, GPT-4o)EitherMCP gives structured JSON I/OAutomated pipelinesMCPType-safe parameters, structured output
All MCP tools accept an optional target parameter to select which vCenter/ESXi to connect to. The 4 write tools take confirm (default false): without it they change nothing and return blast_radius — the host and adapters touched, and for remove_iscsi_target the paths, devices and datastores behind the target. Show it to the user; pass confirm: true only after they decide. dry_run is a deprecated alias.
The four Datastore read tools return the family list envelope — {items, returned, limit, total, truncated, hint} — rather than a bare array. Read the rows from items; truncated says whether the listing is complete, so it never has to be guessed from the row count. All four enumerate their collection in full, so total is the real count and truncated is always false.
CategoryToolTypeDescriptionDatastorelist_all_datastoresReadList datastores with capacity, usage %, VM countbrowse_datastoreReadBrowse files with optional path and glob patternscan_datastore_imagesReadFind OVA/ISO/OVF/VMDK in a datastorelist_cached_imagesReadQuery local image registry with type/datastore filtersiSCSIget_iscsi_statusReadShow adapter status, HBA device, IQN, send targetsenable_iscsiWriteEnable software iSCSI adapter on a hostadd_iscsi_targetWriteAdd iSCSI send target (IP + port) and rescanremove_iscsi_targetWriteRemove iSCSI send target and rescanrescan_storageWriteRescan all HBAs and VMFS volumesvSANget_vsan_healthReadCluster health summary and disk group detailsget_vsan_capacityReadTotal/used/free capacity in GB and usage %get_vsan_efficiencyReadDedup + compression status (vSAN Management SDK)FC / multipathlist_fc_adaptersReadFC/FCoE HBAs per host: WWPN/WWNN, port type, status, reported speedlist_storage_device_pathsReadPer-device path state across a cluster/host/datastore; visibility and path-count differencesAccessget_access_infoReadAccount in use and, per tool, whether its privileges are granted on the root folder
Read/write split: 11 tools are read-only, 4 modify state. Write tools require explicit parameters (host name, IP address), preview unless confirm: true, refuse when a datastore would lose every path or the host's storage view cannot be read, and are audit-logged. remove_iscsi_target is classified risk:high (destructive — LUNs can become inaccessible) and goes through the policy confirmation gate.
Running with local or small models? See references/agent-guardrails.md.
bash
# Datastore
vmware-storage datastore list [--target <name>]
vmware-storage datastore browse <ds_name> [--path <subdir>] [--pattern "*.ova"]
vmware-storage datastore scan-images <ds_name> [--target <name>]
# iSCSI
vmware-storage iscsi enable <host> [--dry-run]
vmware-storage iscsi status <host>
vmware-storage iscsi add-target <host> <ip> [--port 3260] [--dry-run]
vmware-storage iscsi remove-target <host> <ip> [--port 3260] [--dry-run]
vmware-storage iscsi rescan <host> [--dry-run]
# vSAN
vmware-storage vsan health <cluster> [--target <name>]
vmware-storage vsan capacity <cluster> [--target <name>]
# Fibre Channel / multipath (read-only)
vmware-storage paths fc-adapters [--cluster <c> | --host <h>]
vmware-storage paths devices (--cluster <c> | --host <h> | --datastore <ds>) [--device <naa>] [--adapter <vmhba>] [--only-differences]
# Diagnostics
vmware-storage doctor [--skip-auth]
vmware-storage access-info [--tool <name>] [--target <name>] # what may this account do?
Full CLI reference with all options and output formats: see
references/cli-reference.md
Not an error. The software iSCSI adapter is already active on that host. The response includes the current HBA device name and IQN. Run iscsi status to see configured send targets.
Datastore names are case-sensitive. Run vmware-storage datastore list to get the exact name. Common mistakes: Datastore1 vs datastore1, trailing spaces.
get_vsan_health returns overall_health: null#null means the health service was not asked, and health_not_queried_reason says why. It is deliberately not the string "unknown" — vSAN returns that itself, so using it for "we did not ask" made the two impossible to tell apart (on one VCF 9.1 cluster it stood in for red). A string in overall_health is always vSAN's own answer.
The usual cause is a standalone ESXi target: VsanVcClusterHealthSystem runs in vCenter's vSAN Health Service, so connect to the vCenter that manages the cluster. Otherwise read it in the vCenter UI under Cluster > Monitor > vSAN > Skyline Health.
health_checked_at is the age of vCenter's cached summary. This tool reads that cache — the same one Skyline Health shows — rather than triggering a full health run, which takes minutes and loads the cluster.
After adding iSCSI targets, the storage subsystem may need 10-30 seconds to enumerate new LUNs. Steps to resolve:
vmkping from ESXi shell)vmware-storage iscsi status <host>vmware-storage iscsi rescan <host>The password environment variable is missing. Variable names follow the pattern VMWARE_<TARGET_NAME_UPPER>_PASSWORD where hyphens become underscores. Example: target my-vcenter needs VMWARE_MY_VCENTER_PASSWORD. Check your ~/.vmware-storage/.env file.
The .env file contains passwords and must have owner-only permissions:
bash
chmod 600 ~/.vmware-storage/.env
The doctor command tests connectivity with a 5-second TCP timeout. If your vCenter is on a high-latency network, the check may fail even though the connection works. Use --skip-auth to bypass both connectivity and auth checks, then test manually.
invalid peer certificate: UnknownIssuer when starting MCP via uvx#Corporate TLS proxies inject certificates that uv's bundled CA store doesn't trust. Use the recommended vmware-storage mcp form (no PyPI re-resolve), or set export UV_NATIVE_TLS=true to make uv use system CAs.
vmware-aiops~/.vmware/audit.db (SQLite WAL, via vmware-policy) with timestamp, user, target, operation, parameters, and result--dry-run to preview API calls without executingipaddress.ip_address(), ports checked for 1-65535 range, host/cluster/datastore names looked up before operations_sanitize() — strips control characters (C0/C1), truncates to 500 chars — preventing malicious file names from injecting instructions into downstream LLM agents.env file), never from config.yaml; .env permissions are checked at startuppatterns/ directory hosts L5 auto-remediation candidate patterns under the Enterprise Harness Engineering framework. First PoC: patterns/iscsi-target-stale-rescan.yaml — iSCSI HBA rescan classified as risk:low + reversible:true + repeatable:true. Schema only; not yet enforced by the runtime. See references/capabilities.md § Automation Level Reference for the full L1–L5 table.Full security details: see
references/setup-guide.md
bash
uv tool install vmware-storage==2.3.0
mkdir -p ~/.vmware-storage
cp config.example.yaml ~/.vmware-storage/config.yaml
# Edit config.yaml with your vCenter/ESXi targets
# Add to ~/.vmware-storage/.env (create if missing, chmod 600):
# VMWARE_MY_VCENTER_PASSWORD=<your-password>
chmod 600 ~/.vmware-storage/.env
vmware-storage doctor
All tools are automatically audited via vmware-policy. Audit logs:
vmware-audit log --last 20
Full setup guide with multi-target config, MCP server setup, and Docker: see
references/setup-guide.md
text
User (natural language)
↓
AI Agent (Claude Code / Goose / Cursor)
↓ reads SKILL.md
vmware-storage CLI or MCP server (stdio transport)
↓ pyVmomi (vSphere SOAP API)
vCenter Server / ESXi
↓
Datastores / iSCSI / vSAN
The MCP server uses stdio transport (local only, no network listener). Connections to vSphere use SSL/TLS on port 443.
All operations are automatically audited via vmware-policy ( @vmware_tool decorator):
~/.vmware/audit.db (SQLite, framework-agnostic)~/.vmware/rules.yaml (deny rules, maintenance windows, risk levels)vmware-audit log --last 20vmware-audit log --status deniedvmware-policy is automatically installed as a dependency — no manual setup needed.