feat(kubevirt): add pause and unpause actions to vm_lifecycle tool - #1306
Merged
Conversation
Contributor
|
👋 Heads up — this pull request changes files owned by @ksimon1. You are listed as an owner of one or more of the changed areas in |
lyarwood
marked this pull request as draft
July 17, 2026 10:05
This was referenced Jul 17, 2026
Open
lyarwood
force-pushed
the
kubevirt-pause
branch
3 times, most recently
from
July 17, 2026 11:18
2baf140 to
28e1258
Compare
ksimon1
reviewed
Jul 20, 2026
ksimon1
reviewed
Jul 20, 2026
lyarwood
force-pushed
the
kubevirt-pause
branch
2 times, most recently
from
August 13, 2026 09:18
dba4410 to
71020bd
Compare
lyarwood
marked this pull request as ready for review
August 14, 2026 09:33
1 task
ksimon1
reviewed
Aug 14, 2026
codingben
reviewed
Aug 16, 2026
codingben
reviewed
Aug 16, 2026
Cali0707
reviewed
Aug 19, 2026
lyarwood
force-pushed
the
kubevirt-pause
branch
from
August 20, 2026 10:26
71020bd to
8722821
Compare
lyarwood
force-pushed
the
kubevirt-pause
branch
from
August 20, 2026 21:45
8722821 to
ab8add1
Compare
The vm_lifecycle tool only supported start, stop, and restart actions. This meant AI agents could not pause/unpause VMs, causing them to fall back to stopping VMs instead (which is a fundamentally different operation). Add pause and unpause actions that use the KubeVirt subresource API (subresources.kubevirt.io/v1) to suspend and resume running VMIs in-place. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
lyarwood
force-pushed
the
kubevirt-pause
branch
from
August 20, 2026 21:46
ab8add1 to
1f92b81
Compare
Contributor
Author
|
@Cali0707 thanks for the review again, hopefully everything is addressed now. |
Contributor
|
/lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
pauseandunpauseactions to thevm_lifecycletool using KubeVirt's subresource API (subresources.kubevirt.io/v1).With #1361 merged, the
AccessControlRoundTrippernatively resolves subresources without aKindfield via the discovery client fallback, allowing requests to KubeVirt's subresource endpoints without requiring explicit API group bypass declarations.Changes
pauseandunpauseactions tovm_lifecycletoolPauseVMandUnpauseVMhelper functions inpkg/kubevirtusing REST calls to the VMI subresource endpoints (/pauseand/unpause)PauseVM,UnpauseVM, and MCP tool invocation error casespause-vmandunpause-vmmcpchecker eval tasksREADME.mdanddocs/configuration.md)Related