virt-v2v

virt-v2v is a cursor rule for Cursor from kubev2v/forklift-console-plugin. It costs 16 tokens per session (3,753 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for virt-v2v, a tool that converts virtual-machine disks and prepares guest operating systems for KubeVirt.

In plain words
What is it for?
Working on disk conversion, operating-system inspection, driver changes, guest customization, and the virt-v2v entrypoint in Forklift.
Why use it?
It documents the conversion flow and the differences between cold migration and in-place conversion, reducing uncertainty when changing this code.

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/virt-v2v
Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Per session 16 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,753 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.00016 $0.03753
Opus 5 $0.00008 $0.01877
Sonnet 5 $0.00003 $0.00751
Haiku 4.5 $0.00002 $0.00375

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

Security

Grade A, and why

virt-v2v 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 3d 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/infrastructure/virt-v2v.mdc · 339 lines

How it starts

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

virt-v2v Integration

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

Overview

virt-v2v is the core guest conversion engine in Forklift. It runs as a pod during migration and is responsible for:

  1. Disk conversion — converting guest disk images from source format (VMDK, QCOW2, etc.) to raw format suitable for KubeVirt
  2. Guest OS inspection — detecting the OS type, distro, architecture via virt-v2v-inspector
  3. Driver injection — installing VirtIO drivers and removing source-specific drivers (e.g., VMware Tools)
  4. Guest customization — running virt-customize scripts for network config, static IPs, and cleanup

Source: pkg/virt-v2v/ and cmd/virt-v2v/entrypoint.go


Entrypoint Flow (cmd/virt-v2v/entrypoint.go)

The virt-v2v pod entrypoint follows this sequence:

1. Load environment config (AppConfig)
2. Link SSL certificates (vSphere only)
3. Create output directory (/var/tmp/v2v)
4. Branch based on mode:

   A. Remote Inspection (IsRemoteInspection=true):
      └─ RunRemoteV2vInspection() → exits

   B. Conversion (IsRemoteInspection=false):
      ├─ In-Place (IsInPlace=true):
      │   ├─ With LibvirtUrl → GetDomainXML() → RunVirtV2vInPlace() (-i libvirtxml)
      │   └─ Without LibvirtUrl → RunVirtV2vInPlaceDisk() (-i disk, e.g. EC2)
      ├─ Cold (default):
      │   └─ RunVirtV2v() → pipes stdout to virt-v2v-monitor
      │
      ├─ RunVirtV2VInspection() → local inspection on converted disks
      ├─ RunCustomize() → virt-customize with OS-specific scripts
      │   (failure is non-fatal → adds Warning)
      └─ Start HTTP server on :8080 (local migrations only)

Key behavior: customization failure does NOT fail the migration — it logs a warning exposed via /warnings.


Conversion Modes

Cold Migration (RunVirtV2v)

Used for vSphere, OVA, and HyperV. Runs virt-v2v with -o kubevirt output mode, producing KubeVirt YAML + converted disk images in the workdir.

Output is piped through virt-v2v-monitor which parses progress lines and exposes Prometheus metrics on :2112/metrics.

Read the full file on GitHub · 339 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. 3d ago First seen · 339 lines · 16 tokens per session scan A a9c32be883bc

Subscribe to this mod's changes

virt-v2v is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed 4d ago), licensed Apache-2.0. It adds 16 tokens to every session and 3,753 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.