Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/virt-accessing-rdp-console.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
name: vm-ephemeral
namespace: example-namespace
spec:
running: false
runStrategy: Halted
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kind: VirtualMachine
metadata:
name: vm-server
spec:
running: true
runStrategy: Always
template:
spec:
domain:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-configuring-downward-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
name: u1.medium
preference:
name: fedora
running: true
runStrategy: Always
template:
metadata:
labels:
Expand Down
5 changes: 0 additions & 5 deletions modules/virt-configuring-runstrategy-vm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@

You can configure a run strategy for a virtual machine (VM) by using the command line.

[IMPORTANT]
====
The `spec.runStrategy` and `spec.running` keys are mutually exclusive. A VM configuration that contains values for both keys is invalid.
====

.Procedure

* Edit the `VirtualMachine` resource by running the following command:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-configuring-vm-real-time.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ kind: VirtualMachine
metadata:
name: realtime-vm
spec:
running: true
runStrategy: Always
template:
metadata:
annotations:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-connecting-vm-secondarynw-using-fqdn.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ metadata:
name: example-vm
namespace: example-namespace
spec:
running: true
runStrategy: Always
template:
spec:
domain:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ metadata:
kubevirt.io/vm: vm-dv-clone
name: vm-dv-clone <1>
spec:
running: false
runStrategy: Halted
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-creating-service-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
name: example-vm
namespace: example-namespace
spec:
running: false
runStrategy: Halted
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-creating-vm-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This example manifest does not configure VM authentication.
name: u1.medium <3>
preference:
name: rhel.9 <4>
running: true
runStrategy: Always
template:
spec:
domain:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metadata:
kubevirt.io/vm: vm-dv-clone
name: vm-dv-clone <1>
spec:
running: false
runStrategy: Halted
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-defining-watchdog-device-vm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
kubevirt.io/vm: vm2-rhel84-watchdog
name: <vm-name>
spec:
running: false
runStrategy: Halted
template:
metadata:
labels:
Expand Down
4 changes: 2 additions & 2 deletions modules/virt-runstrategies-vms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
The `spec.runStrategy` key has four possible values:

`Always`::
The virtual machine instance (VMI) is always present when a virtual machine (VM) is created on another node. A new VMI is created if the original stops for any reason. This is the same behavior as `running: true`.
The virtual machine instance (VMI) is always present when a virtual machine (VM) is created on another node. A new VMI is created if the original stops for any reason.

`RerunOnFailure`::
The VMI is re-created on another node if the previous instance fails. The instance is not re-created if the VM stops successfully, such as when it is shut down.
Expand All @@ -18,7 +18,7 @@ The VMI is re-created on another node if the previous instance fails. The instan
You control the VMI state manually with the `start`, `stop`, and `restart` virtctl client commands. The VM is not automatically restarted.

`Halted`::
No VMI is present when a VM is created. This is the same behavior as `running: false`.
No VMI is present when a VM is created.

Different combinations of the `virtctl start`, `stop` and `restart` commands affect the run strategy.

Expand Down
2 changes: 1 addition & 1 deletion modules/virt-setting-resource-quota-limits-for-vms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kind: VirtualMachine
metadata:
name: with-limits
spec:
running: false
runStrategy: Halted
template:
spec:
domain:
Expand Down
2 changes: 1 addition & 1 deletion modules/virt-vm-custom-scheduler.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kind: VirtualMachine
metadata:
name: vm-fedora
spec:
running: true
runStrategy: Always
template:
spec:
schedulerName: my-scheduler <1>
Expand Down
2 changes: 1 addition & 1 deletion snippets/virt-dynamic-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
name: u1.medium
preference:
name: rhel.9
running: true
runStrategy: Always
template:
spec:
domain:
Expand Down
2 changes: 1 addition & 1 deletion snippets/virt-static-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
name: u1.medium
preference:
name: rhel.9
running: true
runStrategy: Always
template:
spec:
domain:
Expand Down
2 changes: 1 addition & 1 deletion virt/monitoring/virt-monitoring-vm-health.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can define a watchdog to monitor the health of the guest operating system by

The watchdog device monitors the agent and performs one of the following actions if the guest operating system is unresponsive:

* `poweroff`: The VM powers down immediately. If `spec.running` is set to `true` or `spec.runStrategy` is not set to `manual`, then the VM reboots.
* `poweroff`: The VM powers down immediately. If `spec.runStrategy` is not set to `manual`, the VM reboots.
* `reset`: The VM reboots in place and the guest operating system cannot react.
+
[NOTE]
Expand Down
9 changes: 1 addition & 8 deletions virt/nodes/virt-node-maintenance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,7 @@ endif::openshift-rosa,openshift-dedicated[]
[id="run-strategies"]
== Run strategies

A virtual machine (VM) configured with `spec.running: true` is immediately restarted. The `spec.runStrategy` key provides greater flexibility for determining how a VM behaves under certain conditions.

[IMPORTANT]
====
The `spec.runStrategy` and `spec.running` keys are mutually exclusive. Only one of them can be used.

A VM configuration with both keys is invalid.
====
The `spec.runStrategy` key determines how a VM behaves under certain conditions.

include::modules/virt-runstrategies-vms.adoc[leveloffset=+2]

Expand Down