{"id":34250378,"url":"https://github.com/yaacov/kubectl-mtv","last_synced_at":"2026-04-12T20:01:46.046Z","repository":{"id":286549739,"uuid":"961738059","full_name":"yaacov/kubectl-mtv","owner":"yaacov","description":"A kubectl plugin that helps users of Forklift migrate virtualization workloads from oVirt, VMware, OpenStack, and OVA files to KubeVirt on Kubernetes.","archived":false,"fork":false,"pushed_at":"2026-03-10T11:19:00.000Z","size":3501,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-10T18:48:30.711Z","etag":null,"topics":["forklift","kubectl-plugin","kubevirt","migration-tool"],"latest_commit_sha":null,"homepage":"https://yaacov.github.io/kubectl-mtv/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaacov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T04:57:16.000Z","updated_at":"2026-03-10T11:18:22.000Z","dependencies_parsed_at":"2025-12-12T12:06:43.181Z","dependency_job_id":null,"html_url":"https://github.com/yaacov/kubectl-mtv","commit_stats":null,"previous_names":["yaacov/kubectl-mtv"],"tags_count":101,"template":false,"template_full_name":null,"purl":"pkg:github/yaacov/kubectl-mtv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaacov%2Fkubectl-mtv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaacov%2Fkubectl-mtv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaacov%2Fkubectl-mtv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaacov%2Fkubectl-mtv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaacov","download_url":"https://codeload.github.com/yaacov/kubectl-mtv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaacov%2Fkubectl-mtv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30639901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-18T00:09:27.587Z","status":"ssl_error","status_checked_at":"2026-03-18T00:09:26.123Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forklift","kubectl-plugin","kubevirt","migration-tool"],"created_at":"2025-12-16T09:18:55.476Z","updated_at":"2026-03-18T01:29:02.467Z","avatar_url":"https://github.com/yaacov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubectl-mtv\n\nA kubectl plugin for migrating virtual machines to KubeVirt using Forklift.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/hiking.svg\" alt=\"kubectl-mtv logo\" width=\"200\"\u003e\n\u003c/p\u003e\n\n## Overview\n\nkubectl-mtv helps migrate VMs from vSphere, oVirt, OpenStack, EC2, and OVA to Kubernetes/OpenShift using KubeVirt. It's a command-line interface for the [Forklift](https://github.com/kubev2v/forklift) project.\n\n## Installation\n\nInstall the latest release (Linux / macOS):\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/yaacov/kubectl-mtv/main/install.sh | bash\n```\n\nThis downloads the binary, verifies its checksum, and sets up shell completion. Installs to `~/.local/bin` by default.\n\nOr build from source:\n\n```bash\nmake build\nmkdir -p ~/.local/bin\ncp kubectl-mtv ~/.local/bin/kubectl-mtv\n```\n\nOnce installed, kubectl discovers it as a plugin:\n\n```bash\nkubectl mtv --help\n```\n\nFor more options (krew, manual download, shell completion, uninstall), see the [Installation Guide](guide/02-installation-and-prerequisites.md).\n\n[![asciicast](https://asciinema.org/a/uQWEl16tfen7TJAi.svg)](https://asciinema.org/a/uQWEl16tfen7TJAi)\n\n## MCP Support\n\nkubectl-mtv includes a built-in MCP (Model Context Protocol) server for AI agents that support MCP add‑ons, such as Cursor IDE and Claude Desktop.\n\nSee [MCP Server Guide](guide/22-model-context-protocol-mcp-server-integration.md) for detailed setup instructions and usage examples.\n\n## Quick Start\n\n### 1. Create Provider\n\n```bash\n# vSphere\nkubectl mtv create provider --name vsphere-01 --type vsphere \\\n  --url https://vcenter.example.com \\\n  --username admin --password secret --cacert @ca.cert\n```\n\n### 2. Create Migration Plan\n\nNetwork and storage mappings are created automatically with sensible defaults.\nUse `--network-pairs` / `--storage-pairs` to override inline if needed.\n\n```bash\n# Using system defaults for best network and storage mapping\nkubectl mtv create plan --name migration-1 \\\n  --source vsphere-01 \\\n  --vms vm1,vm2,vm3\n\n# Overriding mappings inline\nkubectl mtv create plan --name migration-1 \\\n  --source vsphere-01 \\\n  --vms vm1,vm2,vm3 \\\n  --network-pairs \"VM Network:default\" \\\n  --storage-pairs \"datastore1:standard\"\n```\n\n### 3. Start Migration\n\n```bash\nkubectl mtv start plan --name migration-1\n```\n\n### 4. Monitor Progress\n\n```bash\n# Interactive TUI with scrolling, help panel, and adjustable refresh\nkubectl mtv get plans --vms --watch\n```\n\n### Advanced: Reusable Mappings\n\nIf you need to reuse the same network/storage configuration across multiple plans,\ncreate named mappings and reference them:\n\n```bash\n# Network mapping\nkubectl mtv create mapping network --name prod-net \\\n  --source vsphere-01 --target openshift \\\n  --network-pairs \"VM Network:default,Management:openshift-sdn/mgmt\"\n\n# Storage mapping with enhanced features\nkubectl mtv create mapping storage --name prod-storage \\\n  --source vsphere-01 --target openshift \\\n  --storage-pairs \"datastore1:standard;volumeMode=Block;accessMode=ReadWriteOnce,datastore2:fast;volumeMode=Filesystem\" \\\n  --default-offload-plugin vsphere --default-offload-vendor flashsystem\n\n# Reference them in a plan\nkubectl mtv create plan --name migration-1 \\\n  --source vsphere-01 \\\n  --network-mapping prod-net \\\n  --storage-mapping prod-storage \\\n  --vms vm1,vm2,vm3\n```\n\nFor a complete walkthrough, see the [Quick Start Guide](guide/03-quick-start-first-migration-workflow.md).\n\n## Inventory Management\n\nQuery and explore provider resources before migration:\n\n```bash\n# List VMs\nkubectl mtv get inventory vms --provider vsphere-01\n\n# Filter VMs by criteria\nkubectl mtv get inventory vms --provider vsphere-01 --query \"where memoryMB \u003e 4096\"\n\n# List networks and storage\nkubectl mtv get inventory networks --provider vsphere-01\nkubectl mtv get inventory storages --provider vsphere-01\n```\n\nSee [Inventory Management Guide](guide/09-inventory-management.md) for advanced queries and filtering.\n\n## VDDK Support\n\nFor optimal VMware disk transfer performance, build a VDDK image from VMware's VDDK SDK:\n\n```bash\n# Build VDDK image\nkubectl mtv create vddk-image \\\n  --tar VMware-vix-disklib-8.0.1.tar.gz \\\n  --tag quay.io/myorg/vddk:8.0.1\n\n# Use it when creating a provider\nkubectl mtv create provider --name vsphere-01 --type vsphere \\\n  --url https://vcenter.example.com \\\n  --vddk-init-image quay.io/myorg/vddk:8.0.1\n```\n\nSee [VDDK Setup Guide](guide/08-vddk-image-creation-and-configuration.md) for detailed instructions.\n\n## Help and Reference Topics\n\nThe built-in help system includes machine-readable output and reference topics for domain-specific query languages:\n\n```bash\n# Get help for any command\nkubectl mtv help create plan\n\n# Learn the TSL query language or KARL affinity syntax\nkubectl mtv help tsl\nkubectl mtv help karl\n\n# Machine-readable command schema (JSON/YAML) for automation and AI agents\nkubectl mtv help --machine\nkubectl mtv help --machine --short get plan\n```\n\nSee [Command Reference](guide/26-command-reference.md) for the full help command documentation.\n\n## Features\n\n- **Multi-Platform Support**: Migrate from vSphere, oVirt, OpenStack, EC2, and OVA\n- **Auto-Mapping**: Automatic network and storage mapping for all source providers\n- **Flexible Mapping**: Use existing mappings, inline pairs, or automatic defaults\n- **Advanced Queries**: Filter and search inventory with powerful query language\n- **VDDK Support**: Optimized VMware disk transfers\n- **Real-time Monitoring**: Track migration progress live\n- **Timezone-Aware Display**: View timestamps in local time or UTC with `--use-utc` flag\n- **System Health Checks**: Comprehensive health diagnostics for the MTV/Forklift system with actionable recommendations\n- **Settings Management**: View and configure ForkliftController settings (feature flags, performance tuning, resource limits)\n- **Machine-Readable Help**: Full command schema available as JSON/YAML for automation, MCP servers, and AI agents\n\n## Environment Variables\n\n- `MTV_VDDK_INIT_IMAGE`: Default VDDK init image for VMware providers\n- `MTV_INVENTORY_URL`: Base URL for inventory service\n- `MTV_INVENTORY_INSECURE_SKIP_TLS`: Skip TLS verification for inventory service connections (set to \"true\" to enable)\n\n## Documentation\n\n**[Complete Technical Guide](guide/)** - Comprehensive documentation covering all features and use cases\n\n### Quick Links\n\n- [Installation \u0026 Prerequisites](guide/02-installation-and-prerequisites.md)\n- [Quick Start Tutorial](guide/03-quick-start-first-migration-workflow.md)\n- [Provider Management](guide/06-provider-management.md)\n- [Inventory Management](guide/09-inventory-management.md)\n- [Mapping Management](guide/11-mapping-management.md)\n- [Migration Plan Creation](guide/13-migration-plan-creation.md)\n- [Migration Hooks](guide/17-migration-hooks.md)\n- [MCP Server Integration](guide/22-model-context-protocol-mcp-server-integration.md)\n- [Command Reference](guide/26-command-reference.md)\n\n## Running from a Container Image\n\nStart the MCP server using docker or podman:\n\n```bash\n# Run the MCP server on port 8080\ndocker run --rm -p 8080:8080 \\\n  -e MCP_KUBE_SERVER=https://api.cluster.example.com:6443 \\\n  -e MCP_KUBE_TOKEN=sha256~xxxx \\\n  quay.io/yaacov/kubectl-mtv-mcp-server:latest\n\n# Run in read-only mode (disables write operations)\ndocker run --rm -p 8080:8080 \\\n  -e MCP_KUBE_SERVER=https://api.cluster.example.com:6443 \\\n  -e MCP_KUBE_TOKEN=sha256~xxxx \\\n  -e MCP_READ_ONLY=true \\\n  quay.io/yaacov/kubectl-mtv-mcp-server:latest\n```\n\nThe server accepts the following environment variables:\n\n| Variable | Default | Description |\n|---|---|---|\n| `MCP_HOST` | `0.0.0.0` | Listen address |\n| `MCP_PORT` | `8080` | Listen port |\n| `MCP_KUBE_SERVER` | | Kubernetes API server URL |\n| `MCP_KUBE_TOKEN` | | Bearer token for Kubernetes auth |\n| `MCP_KUBE_INSECURE` | | Set to `true` to skip TLS verification |\n| `MCP_CERT_FILE` | | Path to TLS certificate (enables HTTPS) |\n| `MCP_KEY_FILE` | | Path to TLS private key |\n| `MCP_OUTPUT_FORMAT` | `markdown` | Default output format |\n| `MCP_MAX_RESPONSE_CHARS` | `0` | Max response size (0 = unlimited) |\n| `MCP_READ_ONLY` | `false` | Set to `true` to disable write operations |\n\n## Building \u0026 Testing\n\nBuild and test the container image with the MCP end-to-end test suite:\n\n```bash\n# Build the image (linux/amd64)\nmake image-build-amd64\n\n# Run e2e tests against the container image\nmake test-e2e-mcp-image MCP_IMAGE=quay.io/yaacov/kubectl-mtv-mcp-server\n\n# Run e2e tests against the local binary build\nmake test-e2e-mcp\n\n# Run e2e tests against an already running server\nMCP_SSE_URL=http://localhost:8080/sse make test-e2e-mcp-external\n```\n\nYou can also set `MCP_IMAGE` in `e2e/mcp/.env` (see `e2e/mcp/env.example`) and\nuse `CONTAINER_ENGINE` to choose between docker and podman.\n\n## Deploying MCP Server to OpenShift\n\nDeploy the MCP server directly to OpenShift:\n\n```bash\n# Deploy the MCP server (pod and service)\noc apply -f https://raw.githubusercontent.com/yaacov/kubectl-mtv/main/deploy/mcp-server.yaml\n\n# Register the MCP server with OpenShift Lightspeed\noc patch olsconfig cluster --type merge \\\n  -p \"$(curl -s https://raw.githubusercontent.com/yaacov/kubectl-mtv/main/deploy/olsconfig-patch.yaml)\"\n```\n\nTo remove the MCP server:\n\n```bash\n# Unregister from Lightspeed\noc patch olsconfig cluster --type json \\\n  -p '[{\"op\":\"remove\",\"path\":\"/spec/mcpServers\"},{\"op\":\"remove\",\"path\":\"/spec/featureGates\"}]'\n\n# Delete the MCP server resources\noc delete -f https://raw.githubusercontent.com/yaacov/kubectl-mtv/main/deploy/mcp-server.yaml\n```\n\nSee [MCP Server Guide](guide/22-model-context-protocol-mcp-server-integration.md) for more details on OpenShift integration.\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaacov%2Fkubectl-mtv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaacov%2Fkubectl-mtv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaacov%2Fkubectl-mtv/lists"}