Configuring a watchdog device

A watchdog device provides a guest watchdog application with access to a watchdog timer.

About this task

When the guest is loading the watchdog module, it provides the new device node /dev/watchdog for the watchdog device. The watchdog timer is started when the watchdog device is opened by the guest watchdog application. The watchdog application confirms a healthy system state by writing to /dev/watchdog at regular intervals. If nothing is written to the device node for a specified time, the watchdog timer elapses, and QEMU assumes that the guest is in an error state. QEMU then triggers a predefined action against the guest. For example, the virtual server might be terminated and rebooted, or a dump might be initiated.

Procedure

Use the watchdog element as child of the devices element to configure a watchdog device (see <watchdog>).
watchdog model attribute: diag288
watchdog action attribute: <timeout-action>

Example

<devices>
    ...
    <watchdog model="diag288" action="inject-nmi"/>
    ...
</devices>