Handling a Non-Responsive Virtual Machine by Sending a Non-Maskable Interrupt

Updated -

When a guest operating system is non-responsive, even when you click Shut Down, Restart, or the power button, you can use Cockpit to manually send a non-maskable interrupt (NMI) to the guest operating system.

An NMI is an interrupt that the guest operating system cannot ignore. You can configure the guest operating system to handle this interrupt, such as by crashing and generating a memory dump to enable debugging. A Linux guest operating system, by default, handles an NMI it receives by sending it to stdout.

To configure a Linux guest operating system to do a memory dump when it receives an NMI:

  1. Edit the sysctl kernel parameters file, which you can locate using man sysctl. Set the following kernel properties in the kernel parameters file to 1 to enable switching the guest operating system to panic mode when it receives an NMI:

        kernel.panic_on_unrecovered_nmi = 1
        kernel.unknown_nmi_panic = 1
    
  2. Enable the kdump service to generate crash dumps when switching to panic mode by entering the following command:

        systemctl start kdump.service
    

Prerequisites

  • A guest operating system must be installed. A virtual machine without an operating system installed does not respond to an NMI.
  • For Linux, you must configure how the guest operating system handles the non-maskable interrupt.

Sending an NMI to a Guest Operating System

To send an NMI to a guest operating system:

  1. In Cockpit, go to the Virtual Machines tab.
  2. Open the non-responsive virtual machine.
  3. Click Shut Down > Send Non-Maskable Interrupt.

Further Resources