/rh-virt:vm-snapshot-listfrom rh-virt
List virtual machine snapshots across namespaces with status, age, and recovery information. Use when: - "List snapshots for VM [name]" - "Show snapshots in namespace [name]" - "What snapshots exist for [vm]?" Read-only operation - no user confirmation required. NOT for creating/deleting snapshots (use vm-snapshot-create/delete instead).
Ships in rh-virt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
List virtual machine snapshots in OpenShift Virtualization. This read-only skill displays snapshot information including status, age, size, and recovery options.
Required MCP Server: openshift-virtualization (OpenShift MCP Server)
Required MCP Tools:
resources_list (from openshift-virtualization) - List VirtualMachineSnapshot resourcesresources_get (from openshift-virtualization) - Get snapshot detailsRequired Environment Variables:
KUBECONFIG - Path to Kubernetes configuration file with cluster accessRequired Cluster Setup:
Before executing, verify MCP server availability:
Check MCP Server Configuration
openshift-virtualization exists in mcps.jsonCheck Environment Variables
KUBECONFIG is set (check presence only, never expose value)Human Notification Protocol:
When prerequisites fail:
❌ Cannot execute vm-snapshot-list: MCP server 'openshift-virtualization' is not available
📋 Setup Instructions:
1. Add openshift-virtualization to mcps.json
2. Set KUBECONFIG environment variable
3. Restart Claude Code to reload MCP servers
🔗 Documentation: https://github.com/openshift/openshift-mcp-server
Trigger this skill when:
User phrases that trigger this skill:
Do NOT use this skill when:
vm-snapshot-create skillvm-snapshot-restore skillvm-snapshot-delete skillRequired Information from User:
If user doesn't provide namespace, ask for it.
MCP Tool: resources_list (from openshift-virtualization)
Parameters (with VM filter using label selector):
{
"apiVersion": "snapshot.kubevirt.io/v1beta1",
"kind": "VirtualMachineSnapshot",
"namespace": "<namespace>",
"labelSelector": "vm.kubevirt.io/name=<vm-name>"
}
Parameters (all snapshots in namespace):
{
"apiVersion": "snapshot.kubevirt.io/v1beta1",
"kind": "VirtualMachineSnapshot",
"namespace": "<namespace>"
}
Note: The label selector vm.kubevirt.io/name=<vm-name> may not always exist. If no results are returned, fall back to listing all snapshots and filtering by checking spec.source.name field in the results.
Expected Output: List of VirtualMachineSnapshot resources
Parse each snapshot to extract:
metadata.name - Snapshot namemetadata.namespace - Namespacemetadata.creationTimestamp - Creation timespec.source.name - VM namestatus.phase - Status (InProgress, Succeeded, Failed)status.readyToUse - Ready for restore (true/false)Error Handling:
If snapshots found:
## VM Snapshots
**Namespace**: `<namespace>`
<if vm_name provided>
**VM**: `<vm-name>`
</if>
### Available Snapshots
| Snapshot Name | VM Name | Status | Created | Age | ReadyToUse |
|---------------|---------|--------|---------|-----|------------|
| `pre-upgrade-snapshot` | `database-01` | Succeeded ✓ | 2024-01-15 10:30 | 2 days | true |
| `backup-snapshot` | `database-01` | Succeeded ✓ | 2024-01-10 08:00 | 7 days | true |
| `test-snapshot` | `web-server` | Succeeded ✓ | 2024-01-14 14:20 | 3 days | true |
**Total Snapshots**: 3
---
### Snapshot Details
**Snapshot: `pre-upgrade-snapshot`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-15 10:30:00 UTC
- **Age**: 2 days
- **Ready to Use**: true
**Snapshot: `backup-snapshot`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-10 08:00:00 UTC
- **Age**: 7 days
- **Ready to Use**: true
**Snapshot: `test-snapshot`**
- **VM**: `web-server`
- **Status**: Succeeded ✓
- **Created**: 2024-01-14 14:20:00 UTC
- **Age**: 3 days
- **Ready to Use**: true
---
### Actions
**To restore from a snapshot:**
"Restore VM from snapshot "
**To delete a snapshot:**
"Delete snapshot "
**To create a new snapshot:**
"Create snapshot of VM "
If no snapshots found:
## VM Snapshots
**Namespace**: `<namespace>`
<if vm_name provided>
**VM**: `<vm-name>`
</if>
**No snapshots found.**
<if vm_name provided>
No snapshots exist for VM `<vm-name>` in namespace `<namespace>`.
</if>
<else>
No snapshots exist in namespace `<namespace>`.
</else>
**To create a snapshot:**
"Create snapshot of VM "
Error: "Forbidden: User lacks permissions to list virtualmachinesnapshots"
Cause: Missing RBAC permissions for listing snapshots.
Solution:
oc auth can-i list virtualmachinesnapshots -n <namespace>Error: "No snapshots exist in namespace <namespace>"
Cause: Namespace has no snapshots, or wrong namespace.
Solution:
namespaces_list to see available namespacesevents_list in namespaceError: Snapshot listed but status.phase: Failed or readyToUse: false
Cause: Snapshot creation failed due to storage issues, hot-plugged volumes, or missing VolumeSnapshotClass.
Solution:
resources_get to check status.conditions for error messagesevents_list for snapshot-related errorsopenshift-virtualization - OpenShift MCP server with kubevirt toolsetresources_list (from openshift-virtualization) - List Kubernetes resources by type
vm-snapshot-create - Create VM snapshotsvm-snapshot-restore - Restore VMs from snapshotsvm-snapshot-delete - Delete VM snapshotsvm-inventory - List VMs before creating snapshotsUser: "List all snapshots for database-01"
Agent: "Which namespace is database-01 in?"
User: "production"
Agent: [Invokes vm-snapshot-list skill]
[Lists snapshots with VM filter]
## VM Snapshots
**Namespace**: `production`
**VM**: `database-01`
### Available Snapshots
| Snapshot Name | VM Name | Status | Created | Age | ReadyToUse |
|---------------|---------|--------|---------|-----|------------|
| `database-01-pre-upgrade` | `database-01` | Succeeded ✓ | 2024-01-15 10:30 | 2 hours | true |
| `database-01-daily-backup` | `database-01` | Succeeded ✓ | 2024-01-14 02:00 | 1 day | true |
**Total Snapshots**: 2
---
### Snapshot Details
**Snapshot: `database-01-pre-upgrade`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-15 10:30:00 UTC
- **Age**: 2 hours
- **Ready to Use**: true
**Snapshot: `database-01-daily-backup`**
- **VM**: `database-01`
- **Status**: Succeeded ✓
- **Created**: 2024-01-14 02:00:00 UTC
- **Age**: 1 day
- **Ready to Use**: true
---
### Actions
**To restore from a snapshot:**
"Restore VM database-01 from snapshot <snapshot-name>"
**To delete a snapshot:**
"Delete snapshot <snapshot-name>"
**To create a new snapshot:**
"Create snapshot of VM database-01"
User: "Show me all snapshots in namespace production"
Agent: [Invokes vm-snapshot-list skill]
[Lists all snapshots without VM filter]
## VM Snapshots
**Namespace**: `production`
### Available Snapshots
| Snapshot Name | VM Name | Status | Created | Age | ReadyToUse |
|---------------|---------|--------|---------|-----|------------|
| `database-01-pre-upgrade` | `database-01` | Succeeded ✓ | 2024-01-15 10:30 | 2 hours | true |
| `database-01-daily-backup` | `database-01` | Succeeded ✓ | 2024-01-14 02:00 | 1 day | true |
| `web-server-backup` | `web-server` | Succeeded ✓ | 2024-01-13 03:00 | 2 days | true |
**Total Snapshots**: 3
VMs with snapshots: `database-01` (2), `web-server` (1)
User: "List snapshots for test-vm"
Agent: "Which namespace is test-vm in?"
User: "dev"
Agent: [Invokes vm-snapshot-list skill]
[Lists snapshots - none found]
## VM Snapshots
**Namespace**: `dev`
**VM**: `test-vm`
**No snapshots found.**
No snapshots exist for VM `test-vm` in namespace `dev`.
**To create a snapshot:**
"Create snapshot of VM test-vm"
What SKILL.md sets; muted values are Claude Code's defaults
inherit10 skills in this plugin
/vm-cloneClone existing virtual machines for testing, scaling, or creating templates.
Use when:
- "Clone VM [source] to [target]"
- "Create a copy of VM [name]"
- "Duplicate VM [name] for testing"
- "Create 3 copies of template-vm"
This skill clones VM configuration and optionally creates new storage or references existing storage.
NOT for snapshots (use vm-snapshot for point-in-time backups).
/vm-createCreate new virtual machines in OpenShift Virtualization with automatic instance type resolution and OS selection.
Use when:
- "Create a new VM"
- "Deploy a virtual machine with [OS]"
- "Set up a VM in namespace [name]"
- "Provision a [size] VM"
This skill handles VM creation with intelligent defaults for OpenShift Virtualization.
NOT for managing existing VMs (use vm-lifecycle-manager or vm-delete instead).
/vm-Other plugins' skills for the same job
npx claudepluginhub rhecosystemappeng/agentic-catalog --plugin rh-virt