When starting a RHEL Linux virtual machine, you see the message: Cannot setup NMI watchdog on CPU
search cancel

When starting a RHEL Linux virtual machine, you see the message: Cannot setup NMI watchdog on CPU

book

Article ID: 308813

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • When booting a RHEL virtual machine running with any hardware version, you see these messages echoed to the console:
Cannot setup NMI watchdog on CPU 0
Cannot setup NMI watchdog on CPU 1
Cannot setup NMI watchdog on CPU 2
Cannot setup NMI watchdog on CPU 3


Environment

VMware vCenter Server 4.0.x
VMware vCenter Server 4.1.x
VMware vCenter Server 5.0.x

Cause

This issue occurs because some Linux operating systems, by default, enable support for Non Maskable Interrupt (NMI). It is a hardware dependent watchdog service which monitors the system hardware for failures. NMIs are generated periodically by system hardware to report the status to the NMI watchdog service. If the Linux kernel handler does not detect a certain NMI count in a specific period of time, it decides that the system has failed. This technology is similar to VMware Tools heartbeats for Virtual Machine monitoring in HA, except NMI runs at the kernel level whereas VMware Tools heartbeats run inside a guest operating system process.

Not all hardware support NMI. This issue is seen to occur with the latest virtual machine hardware version 8 and has been reproduced with version 7 also.

vCPUs presented to the guest operating system cannot have NMI enabled on them because they are abstracted representations of the host's physical CPU cores.

Resolution

To resolve this issue, disable NMI if it has been enabled in the guest by default.

To disable NMI:

  1. Open a vSphere console or SSH session to the Linux virtual machine.
  2. Run this command inside a terminal:

    vi /boot/grub/menu.lst

    Note : /boot/grub/menu.lst may be a symbolic link to /boot/grub/grub.conf.

  3. At the end of the kernel line, change the parameter value for nmi_watchdog from 1 to 0 (in some cases from 2 to 0).

    For example:

    t itle Red Hat Enterprise Linux Server (2.6.18-128.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/sda nmi_watchdog=0
    initrd /initrd-2.6.18-128.el5.img


  4. Save the configuration file changes using :wq. For more information, see Editing files on an ESX host using vi or nano (1020302).
  5. Reboot the virtual machine.

    The NMI watchdog has now been disabled and boot time messages should not be observed.
If NMI style guest monitoring is desired, customers can utilize the VMware Tools heartbeat in HA settings under VM monitoring

To enable VM Monitoring:
  1. Choose the cluster and click Edit Settings.
  2. Select VM Monitoring.
  3. Select VM Monitoring Only from the dropdown
  4. Under Virtual Machine Settings:
    1. Select the virtual machine to monitor.
    2. From the dropdown, select the appropriate settings for your environment. For more information, see:

    3. Click OK.


Additional Information

Editing files on an ESX host using vi or nano
RHEL Linux 仮想マシンの起動時に次のメッセージが表示される: CPU で NMI ウォッチドッグを設定できません
启动 RHEL Linux 虚拟机时,您将看到以下消息: 无法在 CPU 上设置 NMI 监视程序