Skip to content

feat(kubevirt): add run policy support to VM lifecycle management#1012

Open
awels wants to merge 1 commit intocontainers:mainfrom
awels:update_start_vm_different_policy
Open

feat(kubevirt): add run policy support to VM lifecycle management#1012
awels wants to merge 1 commit intocontainers:mainfrom
awels:update_start_vm_different_policy

Conversation

@awels
Copy link
Copy Markdown

@awels awels commented Apr 3, 2026

Adds a new run_policy parameter to the vm_lifecycle tool that allows users to control the VM's runStrategy when starting a virtual machine.

The parameter supports three policies:

  • HighAvailability: VM runs continuously (sets runStrategy to Always)
  • RestartOnFailure: VM restarts on failure (sets runStrategy to RerunOnFailure)
  • Once: VM runs once and stops after completion (sets runStrategy to Once)

The run_policy parameter is optional and defaults to HighAvailability to maintain backward compatibility with existing usage.

Changes include:

  • Updated StartVM function to accept RunPolicy parameter
  • Added 19 unit tests covering all run policy combinations
  • Added 3 integration tests for vm_lifecycle tool
  • Updated tool schema with enum values and documentation
  • Auto-generated README.md updates

Adds a new run_policy parameter to the vm_lifecycle tool that allows
users to control the VM's runStrategy when starting a virtual machine.

The parameter supports three policies:
- HighAvailability: VM runs continuously (sets runStrategy to Always)
- RestartOnFailure: VM restarts on failure (sets runStrategy to RerunOnFailure)
- Once: VM runs once and stops after completion (sets runStrategy to Once)

The run_policy parameter is optional and defaults to HighAvailability
to maintain backward compatibility with existing usage.

Changes include:
- Updated StartVM function to accept RunPolicy parameter
- Added 19 unit tests covering all run policy combinations
- Added 3 integration tests for vm_lifecycle tool
- Updated tool schema with enum values and documentation
- Auto-generated README.md updates

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Alexander Wels <awels@redhat.com>
@awels
Copy link
Copy Markdown
Author

awels commented Apr 3, 2026

/cc @lyarwood

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant