Command Palette

Search for a command to run...

Back to skills
skill № 65813

KubeVirt VM Management

Virtual machine management with KubeVirt on Kubernetes. Use when creating, managing, or troubleshooting VMs running on Kubernetes clusters.

FreeNo executable scripts
rohitg00by rohitg00267 installs in other catalogs

Install KubeVirt VM Management in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

KubeVirt VM Management

Manage virtual machines on Kubernetes using kubectl-mcp-server's KubeVirt tools (13 tools).

Requires the kubevirt toolset: start kubectl-mcp-server with --toolsets default,kubevirt (or MCP_TOOLSETS=default,kubevirt).

When to Apply

Use this skill when:

  • User mentions: "KubeVirt", "virtual machine", "VM", "VirtualMachineInstance", "VMI"
  • Operations: starting/stopping VMs, live migration, managing VM lifecycle
  • Keywords: "VM on Kubernetes", "virtualization", "data volume", "instance type"

Priority Rules

Priority Rule Impact Tools
1 Detect KubeVirt installation first CRITICAL detect_ecosystem
2 Check VM status before operations HIGH kubevirt_vm_get
3 List VMIs for running VMs HIGH kubevirt_vmis_list
4 Use instance types for consistency MEDIUM kubevirt_instancetypes_list

Quick Reference

Task Tool Example
Detect KubeVirt detect_ecosystem detect_ecosystem()
List VMs kubevirt_vms_list kubevirt_vms_list(namespace)
Start VM kubevirt_vm_start kubevirt_vm_start(name, namespace)
Live migrate VM kubevirt_vm_migrate kubevirt_vm_migrate(name, namespace)

Check Installation

detect_ecosystem()

List VMs

# List VirtualMachines
kubevirt_vms_list(namespace="default")

# List VirtualMachineInstances (running VMs)
kubevirt_vmis_list(namespace="default")

Get VM Details

# Get VM definition
kubevirt_vm_get(name="my-vm", namespace="default")

# Shows:
# - Spec (CPU, memory, disks)
# - Running status
# - Conditions

VM Lifecycle

Start VM

kubevirt_vm_start(name="my-vm", namespace="default")

Stop VM

kubevirt_vm_stop(name="my-vm", namespace="default")

Restart VM

kubevirt_vm_restart(name="my-vm", namespace="default")

Pause/Unpause VM

# Pause (freeze CPU)
kubevirt_vm_pause(name="my-vm", namespace="default")

# Unpause
kubevirt_vm_unpause(name="my-vm", namespace="default")

Live Migration

# Migrate VM to another node
kubevirt_vm_migrate(name="my-vm", namespace="default")

# Check migration status
kubevirt_vmis_list(namespace="default")
# Look for: migrationState

Instance Types

# List available instance types
kubevirt_instancetypes_list()

# Instance types define:
# - CPU count
# - Memory size
# - GPU allocation

Data Volumes

# List data volumes (persistent VM disks)
kubevirt_datavolumes_list(namespace="default")

# List data sources (golden images)
kubevirt_datasources_list(namespace="default")

Create VM

kubectl_apply(manifest="""
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: my-vm
  namespace: default
spec:
  running: true
  template:
    metadata:
      labels:
        kubevirt.io/vm: my-vm
    spec:
      domain:
        cpu:
          cores: 2
        memory:
          guest: 4Gi
        devices:
          disks:
          - name: rootdisk
            disk:
              bus: virtio
          - name: cloudinitdisk
            disk:
              bus: virtio
      volumes:
      - name: rootdisk
        containerDisk:
          image: quay.io/kubevirt/fedora-cloud-container-disk-demo
      - name: cloudinitdisk
        cloudInitNoCloud:
          userData: |
            #cloud-config
            password: fedora
            chpasswd: { expire: False }
""")

Create VM with DataVolume

kubectl_apply(manifest="""
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: vm-with-pvc
  namespace: default
spec:
  running: true
  dataVolumeTemplates:
  - metadata:
      name: vm-with-pvc-disk
    spec:
      source:
        http:
          url: https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
      storage:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
  template:
    spec:
      domain:
        cpu:
          cores: 2
        memory:
          guest: 4Gi
        devices:
          disks:
          - name: rootdisk
            disk:
              bus: virtio
      volumes:
      - name: rootdisk
        dataVolume:
          name: vm-with-pvc-disk
""")

Troubleshooting

VM Not Starting

1. kubevirt_vm_get(name, namespace)  # Check status/conditions
2. kubevirt_vmis_list(namespace)  # Check VMI exists
3. kubectl_get(resource_type="events", namespace)  # Check events
4. kubectl_get(resource_type="pods", namespace, label_selector="kubevirt.io/vm=<name>")  # Check virt-launcher

Migration Failed

1. kubevirt_vmis_list(namespace)  # Check migrationState
2. kubectl_get(resource_type="events", namespace)  # Check events
3. # Common issues:
   # - No suitable target node
   # - Insufficient resources
   # - Shared storage required

Related Skil

Full SKILL.md on ClawHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the KubeVirt VM Management skill do?

Virtual machine management with KubeVirt on Kubernetes. Use when creating, managing, or troubleshooting VMs running on Kubernetes clusters.

How do I install the KubeVirt VM Management skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the KubeVirt VM Management skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare KubeVirt VM Management with