Handling a Non-Responsive Virtual Machine by Sending a Non-Maskable Interrupt
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:
-
Edit the
sysctl
kernel parameters file, which you can locate usingman sysctl
. Set the following kernel properties in the kernel parameters file to1
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
-
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:
- In Cockpit, go to the Virtual Machines tab.
- Open the non-responsive virtual machine.
- Click Shut Down > Send Non-Maskable Interrupt.
Further Resources
- For more information on configuring the
kdump
service, see Configuring kdump on the command line in the Kernel Administration Guide. - For more information on the sysctl service, see Working with sysctl and kernel tunables in the Kernel Administration Guide.
Comments