Skip to content

Update cloneable-vms.md#451

Open
DefinedState wants to merge 1 commit intocozystack:mainfrom
DefinedState:patch-1
Open

Update cloneable-vms.md#451
DefinedState wants to merge 1 commit intocozystack:mainfrom
DefinedState:patch-1

Conversation

@DefinedState
Copy link

@DefinedState DefinedState commented Mar 15, 2026

For VMInstance yaml:

  • replace 'running: true' with runStrategy
  • fix 'resources' section - sockets was missed
  • small fixes to get all 'external*' one after another

Summary by CodeRabbit

Documentation

  • Updated cloneable virtual machine configuration documentation with expanded VMInstance spec options
  • New supported fields include external access, port mapping, disk sources, instance type selection, and granular resource allocation (CPU, memory, sockets)
  • Improved VM lifecycle control mechanism for enhanced configuration flexibility

For VMInstance yaml:
- replace 'running: true' with runStrategy
- fix 'resources' section - sockets was missed
- small fixes to get all 'external*' one after another

Signed-off-by: Myroslav Mishov <mob.m.mishov@gmail.com>
@netlify
Copy link

netlify bot commented Mar 15, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit c9d3006
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/69b61e87ce662f0008917a0f
😎 Deploy Preview https://deploy-preview-451--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the documentation for VMInstance YAML configurations. The primary goal is to ensure the provided examples are up-to-date and accurate, reflecting the correct usage of VM lifecycle management and resource definitions. These changes enhance the clarity and completeness of the documentation for users creating cloneable virtual machines.

Highlights

  • VMInstance YAML Examples: Updated the VMInstance YAML examples in the documentation to replace the deprecated 'running: true' field with 'runStrategy: Once' for better clarity and adherence to current API practices.
  • Resource Definition Correction: Corrected the 'resources' section in the VMInstance YAML examples by adding the 'sockets: "1"' field, which was previously missing, ensuring complete and accurate resource allocation examples.
  • YAML Field Ordering: Reordered 'external' related fields within the VMInstance YAML examples to group them together ('external', 'externalMethod', 'externalPorts'), improving readability and consistency.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • content/en/docs/v1/virtualization/cloneable-vms.md
    • Replaced 'running: true' with 'runStrategy: Once' in VMInstance YAML examples.
    • Added 'sockets: "1"' to the 'resources' section in VMInstance YAML examples.
    • Reordered 'external' related fields ('external', 'externalMethod', 'externalPorts') for consistency in VMInstance YAML examples.
    • Added 'instanceType: ""' to one VMInstance YAML example.
    • Added a comment to 'cloudInitSeed: "1"' indicating it must be unique.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

📝 Walkthrough

Walkthrough

Documentation update to the cloneable VM example that expands the VMInstance specification with new configuration fields including external access, disk definitions, instance type, run strategy, and resource constraints.

Changes

Cohort / File(s) Summary
Documentation Update
content/en/docs/v1/virtualization/cloneable-vms.md
Added external, externalPorts, disks, instanceType, runStrategy, and resources (cpu, memory, sockets) fields to the VMInstance YAML example. Replaced deprecated running: true with runStrategy: Once.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A bunny hops through docs with glee,
New fields for VMs now to see!
External ports, disks, and resources bright,
The cloneable spec takes flight!
RunStrategy hops where running used to be! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using only 'Update cloneable-vms.md' without describing the specific nature of the changes made. Use a more descriptive title that captures the main changes, such as 'Replace running with runStrategy and add sockets to cloneable-vms.md' or 'Update VMInstance spec examples in cloneable-vms.md with runStrategy and resources.sockets'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the cloneable-vms.md documentation to align the VMInstance examples with recent changes, such as replacing running: true with runStrategy and adding sockets to the resources. The changes also improve readability by grouping related external* fields. The updates make the examples more accurate and consistent. I've added one suggestion to improve the clarity of the resource specification in one of the examples.

- 22
instanceProfile: ubuntu
running: true
instanceType: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using instanceType: "" is ambiguous. When defining resources manually with the resources block, it's clearer to omit the instanceType field. This allows it to use the default, which is then overridden by your specific resource requests. This avoids any confusion about what an empty instanceType implies. Please consider removing this line for clarity.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@content/en/docs/v1/virtualization/cloneable-vms.md`:
- Line 54: Several v1 doc pages still use the deprecated VMInstance field
`running: true`; update those VMInstance examples to use the `runStrategy` field
(e.g., `runStrategy: Once` or the appropriate strategy) instead. Edit the
examples in the noted files
(content/en/docs/v1/virtualization/proxmox-migration.md, windows.md,
mikrotik.md, gpu.md) and replace `running: true` with the correct `runStrategy`
entry, keeping surrounding YAML structure and any comments intact so examples
remain valid.
- Around line 46-61: Update the VM examples to use runStrategy: Always instead
of runStrategy: Once (replace both occurrences of the runStrategy field) to
reflect running: true semantics, and remove the empty instanceType: "" fields
(or replace them with a valid instance type like "u1.medium") where present so
the examples don't contain an empty string; look for the runStrategy and
instanceType fields in the cloneable-vms examples (both occurrences around the
VM spec blocks) and apply these two edits consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4bf2489-e91e-4acd-a7d7-ad59ca83a038

📥 Commits

Reviewing files that changed from the base of the PR and between 7abc47b and c9d3006.

📒 Files selected for processing (1)
  • content/en/docs/v1/virtualization/cloneable-vms.md

Comment on lines +46 to 61
external: true
externalMethod: PortList
disks:
- name: ubuntu-source
externalPorts:
- 22
disks:
- name: ubuntu-source
instanceProfile: ubuntu
instanceType: ""
running: true
runStrategy: Once
sshKeys:
- <paste your ssh public key here>
external: true
resources:
cpu: "2"
memory: 4Gi
sockets: "1"
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Search for runStrategy usage patterns in the codebase and check for KubeVirt documentation

# Search for other runStrategy examples in documentation
echo "=== Searching for runStrategy usage in docs ==="
rg -n 'runStrategy:' --type=md

# Search for running: true usage in documentation
echo -e "\n=== Searching for running: true usage in docs ==="
rg -n 'running:\s*true' --type=md

# Search for instanceType examples
echo -e "\n=== Searching for instanceType usage patterns ==="
rg -nC2 'instanceType:' --type=md

Repository: cozystack/website

Length of output: 5857


🌐 Web query:

What are the valid values for runStrategy in KubeVirt VMInstance and what is the difference between runStrategy: Once and runStrategy: Always?

💡 Result:

runStrategy (on a VirtualMachine’s spec.runStrategy, which controls how its VirtualMachineInstance (VMI) is kept running) has five valid values: Always, RerunOnFailure, Once, Manual, Halted. [1][2]

Difference: Once vs Always

  • runStrategy: Once: the VM is started and runs a single time, and is not restarted when it completes—whether it ended in Success or Failure. [1][2]
  • runStrategy: Always: KubeVirt is tasked with keeping the VM running continuously by recreating (respawning) the VMI whenever it terminates, whether termination was controlled (e.g., guest-initiated shutdown) or uncontrolled (e.g., crash). This behavior is equivalent to the deprecated spec.running: true. [1]

Sources: KubeVirt Run Strategies user guide [1] and KubeVirt API reference (VirtualMachineSpec.runStrategy) [2].


Update runStrategy: Once to runStrategy: Always and remove empty instanceType field.

The file incorrectly uses runStrategy: Once on lines 54 and 152. According to the migration guide in content/en/docs/v1/operations/upgrades/_index.md (lines 76–77), the correct mapping is:

  • running: truerunStrategy: Always (keep VM running continuously)
  • running: falserunStrategy: Halted

runStrategy: Once runs the VM a single time and does not restart it—a different behavior than the original running: true.

Additionally, instanceType: "" on lines 53 and 151 uses an empty string. All other documentation examples provide actual instance types (e.g., "u1.medium", "u1.xlarge"). Either provide a value or omit the field entirely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/virtualization/cloneable-vms.md` around lines 46 - 61,
Update the VM examples to use runStrategy: Always instead of runStrategy: Once
(replace both occurrences of the runStrategy field) to reflect running: true
semantics, and remove the empty instanceType: "" fields (or replace them with a
valid instance type like "u1.medium") where present so the examples don't
contain an empty string; look for the runStrategy and instanceType fields in the
cloneable-vms examples (both occurrences around the VM spec blocks) and apply
these two edits consistently.

instanceProfile: ubuntu
instanceType: ""
running: true
runStrategy: Once
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find all VMInstance examples using running: true

echo "=== Files with 'running: true' in VMInstance specs ==="
rg -n 'running:\s*true' --type=md -C3

Repository: cozystack/website

Length of output: 5800


Update other documentation files to maintain consistency.

This PR updates the VMInstance examples to use runStrategy instead of running: true. However, several other v1 documentation files still use the old running: true field, creating inconsistency:

  • content/en/docs/v1/virtualization/proxmox-migration.md (line 137)
  • content/en/docs/v1/virtualization/windows.md (line 94)
  • content/en/docs/v1/virtualization/mikrotik.md (line 62)
  • content/en/docs/v1/virtualization/gpu.md (line 146)

Consider updating these files in a follow-up PR to ensure consistent guidance across all documentation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/virtualization/cloneable-vms.md` at line 54, Several v1
doc pages still use the deprecated VMInstance field `running: true`; update
those VMInstance examples to use the `runStrategy` field (e.g., `runStrategy:
Once` or the appropriate strategy) instead. Edit the examples in the noted files
(content/en/docs/v1/virtualization/proxmox-migration.md, windows.md,
mikrotik.md, gpu.md) and replace `running: true` with the correct `runStrategy`
entry, keeping surrounding YAML structure and any comments intact so examples
remain valid.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant