hyperv

A set of project rules describing a Hyper-V provider for managing virtual machines. Hyper-V is Microsoft's virtualization system; the rules cover Windows remote management, SMB file storage, drivers, APIs, and Kubernetes resources.

In plain words
What is it for?
Use it when working on Hyper-V VM inventory, disk validation, SMB mounts, REST endpoints, or the provider's Kubernetes resource definitions.
Why use it?
It gives an agent the architecture and constraints needed to make changes consistently in this provider.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/kubev2v/forklift-console-plugin/hyperv
Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,331 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.03331
Opus 5 $0.00014 $0.01665
Sonnet 5 $0.00005 $0.00666
Haiku 4.5 $0.00003 $0.00333

Measured 2d ago against content hash 5bfe038d6d1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hyperv scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/backend/providers/hyperv.mdc · 376 lines

How it starts

The opening of the file, as written. The whole thing — 376 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hyper-V Provider

Analyzed from commit: 412c71822 on 2026-05-04

Architecture Overview

The Hyper-V provider collects VM inventory directly from a Windows Hyper-V host via WinRM (PowerShell remoting over HTTPS). Disk files are accessed through an SMB share mounted in a sidecar pod via the SMB CSI driver.

┌──────────────────────┐
│  Hyper-V Host        │
│  (Windows Server)    │
│  - WinRM :5986       │
│  - SMB share         │
└──────────┬───────────┘
           │ WinRM/HTTPS (PowerShell commands)
           ▼
┌─────────────────────────┐
│  Inventory Collector    │  (runs inside forklift-controller)
│  - WinRM driver         │
│  - Stores in libmodel DB│
│  - Validates VMs (OPA)  │
└────────────┬────────────┘
             │ HTTP (validate-disks)
             ▼
┌─────────────────────────┐
│  HyperV Provider Server │  (Deployment + SMB CSI mount)
│  - Mounts SMB share     │
│  - /validate-disks      │
│  - /healthz             │
└─────────────────────────┘
             │
             ▼
┌─────────────────────────┐
│  Inventory REST API     │  (gin handlers in forklift-controller)
│  /providers/hyperv/…    │
└─────────────────────────┘

Key Source Locations

Component Path (under pkg/)
Collector controller/provider/container/hyperv/
Data model controller/provider/model/hyperv/
Types (wire format) controller/provider/model/hyperv/types/
REST API handlers controller/provider/web/hyperv/
HyperVProviderServer controller controller/hyperv/
Driver interface & WinRM impl lib/hyperv/driver/
PowerShell scripts lib/hyperv/powershell/scripts.go

HyperVProviderServer CRD

Kind: HyperVProviderServer (group forklift.konveyor.io/v1beta1) Finalizer: api.HyperVProviderFinalizer Controller name: hyperv-server

Lifecycle

  1. Provider controller creates a HyperVProviderServer CR for each Hyper-V provider.
  2. The controller ensures:
    • PersistentVolume — SMB CSI driver (smb.csi.k8s.io), ReadOnlyMany, source from smbUrl in Secret.
    • PersistentVolumeClaim — Binds to static PV.
    • Deployment — Runs provider server image (Settings.Providers.HyperV.ContainerImage), mounts SMB at /hyperv.
    • Service — ClusterIP on port 8080.
  3. On deletion: Service → Deployment → PVC → PV cleanup.

Read the full file on GitHub · 376 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 376 lines · 27 tokens per session scan A 5bfe038d6d1e

Subscribe to this mod's changes

hyperv is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed 2d ago), licensed Apache-2.0. It adds 27 tokens to every session and 3,331 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.