Agentic VM Management
Overview
This module introduces AI-assisted virtual machine management for OpenShift Virtualization. Using the rh-virt skill pack with Claude Code or Cursor IDE, you can manage VM lifecycle operations through natural language prompts backed by the Model Context Protocol (MCP).
The rh-virt collection provides 10 specialized skills covering the complete VM lifecycle: inventory, creation, power management, cloning, snapshots, live migration, and deletion. All destructive operations require explicit user confirmation, giving you safety-first automation without sacrificing control.
What You Will Learn
In this module, you will learn:
-
How to install and configure the
rh-virtskill pack in Claude Code or Cursor IDE -
How to connect the agentic environment to your OpenShift cluster via a containerized MCP server
-
How to use natural language prompts to manage VM lifecycle operations
-
How the skill-first routing model maps user intent to the correct automation skill
-
How to create, start, stop, clone, snapshot, and delete virtual machines through AI-assisted workflows
-
How to interpret safety confirmations and human-in-the-loop checkpoints
Skills Overview
The rh-virt collection provides 10 skills for complete VM lifecycle management:
| Skill | Purpose |
|---|---|
|
List and inspect virtual machines across namespaces with status, resource, and health information. |
|
Create new virtual machines with automatic error diagnosis and scheduling workaround proposals. |
|
Start, stop, and restart virtual machines with explicit safety confirmations. |
|
Clone VMs with flexible storage strategies, cross-namespace support, and batch cloning. |
|
Permanently delete VMs and associated storage with typed confirmation and protection label enforcement. |
|
Create VM snapshots with storage class capability validation before execution. |
|
List and inspect VM snapshots across namespaces. |
|
Restore VMs from snapshots with pre-flight state checks and explicit user confirmation. |
|
Delete VM snapshots with storage reclamation reporting. |
|
Migrate VMs between nodes for load balancing and node maintenance, using live or cold migration. |
Prerequisites
Before proceeding with the tutorials in this module, ensure you have:
-
OpenShift 4.18+ cluster with OpenShift Virtualization operator installed
-
Claude Code CLI or Cursor IDE
-
Podman (version 4.0+) for the containerized MCP server
-
KUBECONFIG configured for the target cluster
-
ServiceAccount with RBAC permissions for VirtualMachine resources in target namespaces
Sections
- Getting Started with Agentic VM Management
-
Install the
rh-virtskill pack, configure the MCP server, and verify end-to-end connectivity using thevm-inventoryskill. - Creating Virtual Machines with Natural Language
-
Learn how to create virtual machines by describing requirements in natural language using the
vm-createskill.