Skip to content

feat: Auto-detect OpenShift Virtualization and enable kubevirt MCP toolset #1772

Description

@sradco

Problem

The embedded MCP server in OLS currently uses a hardcoded toolset list: ["core", "config", "helm", "metrics"]. The kubevirt toolset is not enabled even when OpenShift Virtualization is installed on the cluster.

This means users with OpenShift Virtualization get no VM-specific troubleshooting tools in OLS unless an admin manually patches the openshift-mcp-server-config ConfigMap — which the operator immediately reverts on reconciliation.

Proposal

The OLS operator should auto-detect whether OpenShift Virtualization is installed (e.g., by checking for the HyperConverged CRD or the kubevirt-hyperconverged CR in openshift-cnv namespace) and automatically add "kubevirt" to the MCP server toolsets during ConfigMap reconciliation.

Detection logic (example)

// During reconcileAppServerResources:
if crdExists("hyperconvergeds.hco.kubevirt.io") {
    toolsets = append(toolsets, "kubevirt")
}

Why this matters

We tested OLS with the kubevirt toolset enabled against three VM troubleshooting scenarios (storage failure, crashloop, migration failure). With gpt-5.2 in troubleshooting mode, OLS correctly identified root causes in all three cases using the kubevirt MCP tools. Without the toolset enabled, OLS can only use alert data and generic Kubernetes tools, producing significantly weaker diagnostics.

Testing results

Model kubevirt toolset Root causes identified
gpt-4o-mini disabled 0/3 (only alert summaries)
gpt-4o-mini enabled + explicit prompt 2/3
gpt-5.2 enabled 3/3 (all scenarios, simple questions)

Related PRs

Acceptance criteria

  • When OpenShift Virtualization is installed, the kubevirt toolset is automatically enabled in the MCP server config
  • When OpenShift Virtualization is NOT installed, the kubevirt toolset is not included (no error, no degradation)
  • No manual configuration required by the cluster admin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions