From 290110732de7db0dd2800b93250c773daeef8e05 Mon Sep 17 00:00:00 2001 From: SNiemann15 Date: Thu, 5 Jun 2025 12:24:01 +0200 Subject: [PATCH] Watchdog add support for IBM Z --- modules/virt-defining-watchdog-device-vm.adoc | 15 ++++++++------- modules/virt-installing-watchdog-agent.adoc | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/modules/virt-defining-watchdog-device-vm.adoc b/modules/virt-defining-watchdog-device-vm.adoc index 63b1e841957e..f6eba87db8f7 100644 --- a/modules/virt-defining-watchdog-device-vm.adoc +++ b/modules/virt-defining-watchdog-device-vm.adoc @@ -10,7 +10,7 @@ You configure a watchdog device for the virtual machine (VM). .Prerequisites -* The VM must have kernel support for an `i6300esb` watchdog device. {op-system-base-full} images support `i6300esb`. +* For `x86` systems, the VM must use a kernel that works with the `i6300esb` watchdog device. If you use `s390x` architecture, the kernel must be enabled for `diag288`. {op-system-base-full} images support `i6300esb` and `diag288`. * You have installed the {oc-first}. .Procedure @@ -23,26 +23,27 @@ apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: labels: - kubevirt.io/vm: vm2-rhel84-watchdog + kubevirt.io/vm: name: spec: runStrategy: Halted template: metadata: labels: - kubevirt.io/vm: vm2-rhel84-watchdog + kubevirt.io/vm: spec: domain: devices: watchdog: name: - i6300esb: - action: "poweroff" <1> + : <1> + action: "poweroff" <2> # ... ---- -<1> Specify `poweroff`, `reset`, or `shutdown`. +<1> The watchdog device model to use. For `x86` specify `i6300esb`. For `s390x` specify `diag288`. +<2> Specify `poweroff`, `reset`, or `shutdown`. The `shutdown` action requires that the guest virtual machine is responsive to ACPI signals. Therefore, using `shutdown` is not recommended. + -The example above configures the `i6300esb` watchdog device on a RHEL8 VM with the poweroff action and exposes the device as `/dev/watchdog`. +The example above configures the watchdog device on a VM with the `poweroff` action and exposes the device as `/dev/watchdog`. + This device can now be used by the watchdog binary. diff --git a/modules/virt-installing-watchdog-agent.adoc b/modules/virt-installing-watchdog-agent.adoc index 9a21f4111a1a..b8fcdb5c9257 100644 --- a/modules/virt-installing-watchdog-agent.adoc +++ b/modules/virt-installing-watchdog-agent.adoc @@ -12,6 +12,20 @@ You install the watchdog agent on the guest and start the `watchdog` service. . Log in to the virtual machine as root user. +. This step is only required when installing on {ibm-z-name} (`s390x`). Enable `watchdog` by running the following command: ++ +[source,terminal] +---- +# modprobe diag288_wdt +---- + +. Verify that the `/dev/watchdog` file path is present in the VM by running the following command: ++ +[source,terminal] +---- +# ls /dev/watchdog +---- + . Install the `watchdog` package and its dependencies: + [source,terminal]