Skip to content

Comments

Rh virt/agent init#6

Merged
dmartinol merged 2 commits intoRHEcosystemAppEng:mainfrom
r2dedios:rh-virt/agent-init
Feb 23, 2026
Merged

Rh virt/agent init#6
dmartinol merged 2 commits intoRHEcosystemAppEng:mainfrom
r2dedios:rh-virt/agent-init

Conversation

@r2dedios
Copy link
Contributor

Summary

This PR enhances the OpenShift Virtualization agent skills with new VM lifecycle management capabilities and improves the overall agent context efficiency.

Changes

New Skills

  • VM Clone Skill: Enables cloning of existing virtual machines for testing, scaling, or creating templates. Supports cloning VM configuration with options to create new storage or reference existing storage.
  • VM Delete Skill: Implements permanent VM deletion with strict safety confirmations and typed verification to prevent accidental resource removal.

Enhancements

  • VM Creator Skill: Upgraded with an interactive menu system for improved user experience during VM provisioning.
  • MCP-First Approach: Refactored existing skills to prioritize Model Context Protocol (MCP) server tools, reducing reliance on kubectl commands for better integration and consistency.
  • Troubleshooting Documentation: Reorganized troubleshooting guides by category to optimize agent context usage and improve information retrieval efficiency.

…d vm-delete Skill

Signed-off-by: r2dedios <alex.ansi.c@gmail.com>
…MCP-first approach and splitted troubleshooting documents by category to improve Agent context usage

Signed-off-by: r2dedios <alex.ansi.c@gmail.com>
@r2dedios r2dedios requested a review from dmartinol February 17, 2026 12:47
@r2dedios r2dedios self-assigned this Feb 17, 2026
@r2dedios r2dedios added the enhancement New feature or request label Feb 17, 2026
@r2dedios
Copy link
Contributor Author

@dmartinol This PR is ready to be reviewed. Thanks


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).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is vm-snapshot another skill? I can't see it here

Comment on lines +14 to +15
model: inherit
color: blue
Copy link
Collaborator

@dmartinol dmartinol Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do model and color come from? I can't see them in the specs:
https://agentskills.io/specification#frontmatter-required


### Prerequisite Verification

**Before executing, verify MCP server availability:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this check is common to multiple skills, so it could be moved into a dedicated skill and just reference it here

Copy link
Collaborator

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! /lgtm

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the OpenShift Virtualization agent with new VM lifecycle management capabilities and improves agent context efficiency through documentation reorganization.

Changes:

  • Added VM Clone skill for duplicating VMs with flexible storage strategies (clone, share, or new empty storage)
  • Added VM Delete skill with strict safety protocols including typed confirmation and protection label enforcement
  • Enhanced VM Creator with interactive menu system for improved UX and MCP-first approach
  • Reorganized troubleshooting documentation by error category (scheduling, storage, lifecycle, runtime, network) for 29% token reduction
  • Refactored all skills to prioritize MCP tools over kubectl commands

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rh-virt/skills/vm-delete/SKILL.md New skill for permanent VM deletion with typed confirmation, pre-deletion validation, and storage cleanup options
rh-virt/skills/vm-clone/SKILL.md New skill for VM cloning with storage strategy selection (clone/share/new), batch cloning support, and cross-namespace capabilities
rh-virt/skills/vm-creator/SKILL.md Enhanced with interactive menu system, MCP-first refactoring, and improved ErrorUnschedulable diagnostics with VM restart workflow
rh-virt/skills/vm-lifecycle-manager/SKILL.md Updated with references to reorganized troubleshooting docs and OPTIONAL document consultation pattern
rh-virt/skills/vm-inventory/SKILL.md Added critical formatting rules (table vs list based on VM count), human-in-the-loop requirements section, and doc references
rh-virt/docs/troubleshooting/INDEX.md New navigation hub with MCP-first pattern documentation and quick reference for CLI→MCP mapping
rh-virt/docs/troubleshooting/scheduling-errors.md ErrorUnschedulable diagnostics with MCP tools first, CLI fallback pattern
rh-virt/docs/troubleshooting/storage-errors.md Storage provisioning, deletion, and cloning errors with MCP-first diagnostic procedures
rh-virt/docs/troubleshooting/lifecycle-errors.md VM stuck terminating, won't start/stop issues with MCP-first solutions
rh-virt/docs/troubleshooting/runtime-errors.md CrashLoopBackOff diagnostics and workaround patterns for MCP tool limitations
rh-virt/docs/troubleshooting/network-errors.md Network attachment failures and Multus/SR-IOV troubleshooting
rh-virt/docs/troubleshooting/.ai-index/semantic-index.json Semantic index mapping skills and errors to documentation for progressive disclosure
rh-virt/docs/troubleshooting.md Deleted - replaced by categorized documentation structure
rh-virt/README.md Updated to reflect 5 skills, new workflows, and reorganized documentation references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 745 to 746
⚠️ **This is a temporary limitation**: The openshift-virtualization MCP server doesn't yet support tolerations parameter in vm_create. Consider filing an issue at: https://github.com/openshift/openshift-mcp-server/issues
```
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vm-creator skill requires users to restart the VM after patching tolerations (line 810-841), but this critical step is not mentioned in the initial workaround proposal shown to the user. The restart is necessary because patching the VM spec doesn't immediately update the existing VirtualMachineInstance - it only affects future VMI creations. Without the restart, the toleration won't take effect and the VM will remain ErrorUnschedulable.

The user should be informed upfront in the diagnostic workflow (around line 745) that applying the workaround will require a VM restart to take effect.

Copilot uses AI. Check for mistakes.
"--userns=keep-id:uid=65532,gid=65532",
"-v", "${KUBECONFIG}:/kubeconfig:ro,Z",
"--entrypoint", "/app/kubernetes-mcp-server",
"quay.io/ecosystem-appeng/openshift-mcp-server:latest",
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the sample .mcp.json configuration, the container image for the openshift-virtualization MCP server is pinned only to the mutable latest tag ("quay.io/ecosystem-appeng/openshift-mcp-server:latest") even though this container is started automatically with KUBECONFIG mounted and host networking enabled. If an attacker ever gains the ability to push or replace that tag in the registry, they could ship a malicious image that exfiltrates cluster credentials or tampers with cluster resources when developers follow this configuration. To reduce this supply-chain risk, pin the MCP server image to an immutable reference (specific version tag or digest) in the documented configuration and recommend that users do the same.

Copilot uses AI. Check for mistakes.
"-v", "${KUBECONFIG}:/kubeconfig:ro,Z",
"--entrypoint", "/app/kubernetes-mcp-server",
"quay.io/ecosystem-appeng/openshift-mcp-server:latest",
"--kubeconfig", "/kubeconfig",
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the sample .mcp.json configuration, the MCP server image is referenced as "quay.io/ecosystem-appeng/openshift-mcp-server:latest", which is a mutable tag, while the container is run automatically with KUBECONFIG mounted and host networking. Using an unpinned latest image for a privileged helper like this creates a supply-chain risk: if that tag is ever compromised or replaced upstream, developers who follow this config could unintentionally run malicious code with access to their cluster. To harden this, update the documented configuration to pin the image to a specific version or digest and instruct users to avoid latest for this server.

Copilot uses AI. Check for mistakes.
@r2dedios r2dedios mentioned this pull request Feb 20, 2026
@dmartinol dmartinol merged commit d82408d into RHEcosystemAppEng:main Feb 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants