Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

20.18. Watchdog Device

A virtual hardware watchdog device can be added to the guest virtual machine via the <watchdog> element. The watchdog device requires an additional driver and management daemon in the guest virtual machine. As merely enabling the watchdog in the libvirt configuration does not do anything useful on its own. Currently there is no support notification when the watchdog fires.

  ...
  <devices>
    <watchdog model='i6300esb'/>
  </devices>
  ...

  ...
  <devices>
    <watchdog model='i6300esb' action='poweroff'/>
  </devices>
</domain>

Figure 20.66. Watchdog Device

The following attributes are declared in this XML:
  • model - The required model attribute specifies what real watchdog device is emulated. Valid values are specific to the underlying hypervisor.
  • The model attribute may take the following values:
    • i6300esb — the recommended device, emulating a PCI Intel 6300ESB
    • ib700 — emulates an ISA iBase IB700
  • action - The optional action attribute describes what action to take when the watchdog expires. Valid values are specific to the underlying hypervisor. The action attribute can have the following values:
    • reset — default setting, forcefully resets the guest virtual machine
    • shutdown — gracefully shuts down the guest virtual machine (not recommended)
    • poweroff — forcefully powers off the guest virtual machine
    • pause — pauses the guest virtual machine
    • none — does nothing
    • dump — automatically dumps the guest virtual machine.
Note that the 'shutdown' action requires that the guest virtual machine is responsive to ACPI signals. In the sort of situations where the watchdog has expired, guest virtual machines are usually unable to respond to ACPI signals. Therefore using 'shutdown' is not recommended. In addition, the directory to save dump files can be configured by auto_dump_path in file /etc/libvirt/qemu.conf.