diff --git a/modules/virt-accessing-rdp-console.adoc b/modules/virt-accessing-rdp-console.adoc index 4e0aa7436b..ec5c2feb29 100644 --- a/modules/virt-accessing-rdp-console.adoc +++ b/modules/virt-accessing-rdp-console.adoc @@ -25,7 +25,7 @@ metadata: name: vm-ephemeral namespace: example-namespace spec: - running: false + runStrategy: Halted template: metadata: labels: diff --git a/modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc b/modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc index 987774ce06..10e5b21803 100644 --- a/modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc +++ b/modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc @@ -22,7 +22,7 @@ kind: VirtualMachine metadata: name: vm-server spec: - running: true + runStrategy: Always template: spec: domain: diff --git a/modules/virt-configuring-downward-metrics.adoc b/modules/virt-configuring-downward-metrics.adoc index 797ba6eebb..f988d08a39 100644 --- a/modules/virt-configuring-downward-metrics.adoc +++ b/modules/virt-configuring-downward-metrics.adoc @@ -40,7 +40,7 @@ spec: name: u1.medium preference: name: fedora - running: true + runStrategy: Always template: metadata: labels: diff --git a/modules/virt-configuring-runstrategy-vm.adoc b/modules/virt-configuring-runstrategy-vm.adoc index e56d84c470..c585c95950 100644 --- a/modules/virt-configuring-runstrategy-vm.adoc +++ b/modules/virt-configuring-runstrategy-vm.adoc @@ -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: diff --git a/modules/virt-configuring-vm-real-time.adoc b/modules/virt-configuring-vm-real-time.adoc index 3dd0f52f30..a3483d0441 100644 --- a/modules/virt-configuring-vm-real-time.adoc +++ b/modules/virt-configuring-vm-real-time.adoc @@ -23,7 +23,7 @@ kind: VirtualMachine metadata: name: realtime-vm spec: - running: true + runStrategy: Always template: metadata: annotations: diff --git a/modules/virt-connecting-vm-secondarynw-using-fqdn.adoc b/modules/virt-connecting-vm-secondarynw-using-fqdn.adoc index 55ab60138c..be2b6ff6e8 100644 --- a/modules/virt-connecting-vm-secondarynw-using-fqdn.adoc +++ b/modules/virt-connecting-vm-secondarynw-using-fqdn.adoc @@ -40,7 +40,7 @@ metadata: name: example-vm namespace: example-namespace spec: - running: true + runStrategy: Always template: spec: domain: diff --git a/modules/virt-creating-new-vm-from-cloned-pvc-using-datavolumetemplate.adoc b/modules/virt-creating-new-vm-from-cloned-pvc-using-datavolumetemplate.adoc index b1d2cad5a1..0de6292020 100644 --- a/modules/virt-creating-new-vm-from-cloned-pvc-using-datavolumetemplate.adoc +++ b/modules/virt-creating-new-vm-from-cloned-pvc-using-datavolumetemplate.adoc @@ -47,7 +47,7 @@ metadata: kubevirt.io/vm: vm-dv-clone name: vm-dv-clone <1> spec: - running: false + runStrategy: Halted template: metadata: labels: diff --git a/modules/virt-creating-service-cli.adoc b/modules/virt-creating-service-cli.adoc index 126fc7b17e..847714d437 100644 --- a/modules/virt-creating-service-cli.adoc +++ b/modules/virt-creating-service-cli.adoc @@ -25,7 +25,7 @@ metadata: name: example-vm namespace: example-namespace spec: - running: false + runStrategy: Halted template: metadata: labels: diff --git a/modules/virt-creating-vm-cli.adoc b/modules/virt-creating-vm-cli.adoc index c69f8b212d..de67ef21bd 100644 --- a/modules/virt-creating-vm-cli.adoc +++ b/modules/virt-creating-vm-cli.adoc @@ -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: diff --git a/modules/virt-creating-vm-cloned-pvc-data-volume-template.adoc b/modules/virt-creating-vm-cloned-pvc-data-volume-template.adoc index cb47006fee..a7f323abdd 100644 --- a/modules/virt-creating-vm-cloned-pvc-data-volume-template.adoc +++ b/modules/virt-creating-vm-cloned-pvc-data-volume-template.adoc @@ -27,7 +27,7 @@ metadata: kubevirt.io/vm: vm-dv-clone name: vm-dv-clone <1> spec: - running: false + runStrategy: Halted template: metadata: labels: diff --git a/modules/virt-defining-watchdog-device-vm.adoc b/modules/virt-defining-watchdog-device-vm.adoc index f2959f889e..cb6854361a 100644 --- a/modules/virt-defining-watchdog-device-vm.adoc +++ b/modules/virt-defining-watchdog-device-vm.adoc @@ -25,7 +25,7 @@ metadata: kubevirt.io/vm: vm2-rhel84-watchdog name: spec: - running: false + runStrategy: Halted template: metadata: labels: diff --git a/modules/virt-runstrategies-vms.adoc b/modules/virt-runstrategies-vms.adoc index 39eb8483ca..6a68799b55 100644 --- a/modules/virt-runstrategies-vms.adoc +++ b/modules/virt-runstrategies-vms.adoc @@ -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. @@ -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. diff --git a/modules/virt-setting-resource-quota-limits-for-vms.adoc b/modules/virt-setting-resource-quota-limits-for-vms.adoc index 4f802b6897..7123c09479 100644 --- a/modules/virt-setting-resource-quota-limits-for-vms.adoc +++ b/modules/virt-setting-resource-quota-limits-for-vms.adoc @@ -19,7 +19,7 @@ kind: VirtualMachine metadata: name: with-limits spec: - running: false + runStrategy: Halted template: spec: domain: diff --git a/modules/virt-vm-custom-scheduler.adoc b/modules/virt-vm-custom-scheduler.adoc index 7d973f8713..83de4f57a5 100644 --- a/modules/virt-vm-custom-scheduler.adoc +++ b/modules/virt-vm-custom-scheduler.adoc @@ -22,7 +22,7 @@ kind: VirtualMachine metadata: name: vm-fedora spec: - running: true + runStrategy: Always template: spec: schedulerName: my-scheduler <1> diff --git a/snippets/virt-dynamic-key.yaml b/snippets/virt-dynamic-key.yaml index cd5b8eae9e..2caf565d52 100644 --- a/snippets/virt-dynamic-key.yaml +++ b/snippets/virt-dynamic-key.yaml @@ -18,7 +18,7 @@ spec: name: u1.medium preference: name: rhel.9 - running: true + runStrategy: Always template: spec: domain: diff --git a/snippets/virt-static-key.yaml b/snippets/virt-static-key.yaml index 14d2bf1e7a..b80495a807 100644 --- a/snippets/virt-static-key.yaml +++ b/snippets/virt-static-key.yaml @@ -18,7 +18,7 @@ spec: name: u1.medium preference: name: rhel.9 - running: true + runStrategy: Always template: spec: domain: diff --git a/virt/monitoring/virt-monitoring-vm-health.adoc b/virt/monitoring/virt-monitoring-vm-health.adoc index ab7a199d64..1134e6a647 100644 --- a/virt/monitoring/virt-monitoring-vm-health.adoc +++ b/virt/monitoring/virt-monitoring-vm-health.adoc @@ -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] diff --git a/virt/nodes/virt-node-maintenance.adoc b/virt/nodes/virt-node-maintenance.adoc index 04a2acfd94..9bdce4d490 100644 --- a/virt/nodes/virt-node-maintenance.adoc +++ b/virt/nodes/virt-node-maintenance.adoc @@ -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]