In some testing I was doing with VM HA monitoring – and I would highly recommend Duncan’s post for some more information on the subject - I needed to crash a VM to test the functionality.
So in essence what does it do?
When enabling this feature – VMware HA monitors the guest itself for Operating system failure and if recognized – it reboots the VM (according to the defined threshold)
So how do you crash a Windows VM? And how do you crash a Linux VM?
This Microsoft KB gives you the answers
Methods to generate a manual memory dump fileThere are several methods to generate a manual kernel or complete memory dump file. These methods include using the NMI, keyboard (PS2/USB), remote kernel, or NotMyFault.exe tools.
How to generate a manual memory dump by using the NotMyFault toolIf you can log on while the problem is occurring, you can use the Microsoft SysInternals NotMyFault tool. To do this, follow these steps:
Note This will generate a memory dump file and a "Stop D1" error.
- Download the NotMyFault tool from the following Microsoft Web site:
- Click Start, locate and right-click Command Prompt, and then click Run as administrator.
- At the command line, type NotMyfault.exe /crash, and then press ENTER.
How to generate a manual memory dump file by using the keyboard
- If you are using a PS/2 keyboard, you have to create the
registry entry. For more information about how to generate a memory dump file by using the keyboard, click the following article number to view the article in the Microsoft Knowledge Base:
244139 Windows feature lets you generate a memory dump file by using the keyboard
- If you are using a USB keyboard, this feature is not supported in Windows Server 2008 Service Pack 1 until you install hotfix KB 971284. For more information about using the hotfix, click the following article number to view the article in the Microsoft Knowledge Base:
971284 A hotfix is available to enable crash on CTRL-SCROLL support on Vista S about using the hotfix and Windows Server 2008 on a USB keyboard
However, it is supported in Windows Server 2008 Service Pack 2 or later versions. You must create the CrashOnCtrlScroll registry entry on the Windows Server 2008-based computer for this feature to work. To enable the feature on a computer that uses a USB keyboard, follow these steps:
Note The keyboard operation will generate a memory dump file and a "Stop E2" error.
- Start Registry Editor.
- Locate and then click the following registry subkey:
- On the Edit menu, click Add Value, and then add the following registry entry.
Name : CrashOnCtrlScroll Data Type : REG_DWORD Value : 1
- Exit Registry Editor.
- Restart the computer. (On a computer that uses a USB keyboard, you do not have to restart the computer. Unplugging the keyboard and plugging it back again is sufficient. After that, the Memory dump file can be generated.)
This hotfix is included in Service Pack 2 for Windows Vista and Windows Server 2008.
From my testing – I could not get the manual method to work, so I tried the Sysinternals one which worked well for me.
The easiest way I found to crash a Linux machine was to issue the following command at command prompt
echo c > /proc/sysrq-trigger
Which of course produces this:
I wish for you that may these be the only crashes you encounter in your day.
Hope you enjoyed the ride…