Is there a real easy way to BSOD a windows VM in ESXi ( 5.5 )? Hopefully without logging into the VM.
— Dominic Rivera (@virtualdominic) July 14, 2014
While catching up on my Twitter feed this morning, I saw an interesting question from Dominic Rivera. I remember a few years back I was troubleshooting an issue and required to panic a Virtual Machine, I did not recall the steps that GSS had walked me through but I figure if anyone would know, it would be my buddy Paudie who used to work in GSS. Sure enough, he had the answer which was using a nifty little tool on the ESXi Shell called vmdumper.
~ # vmdumper --help
vmdumper: [options] <world id> <unsync|sync|vmx|vmx_force|samples_on|samples_off|nmi|screenshot|backtrace>
-f: ignore vsi version check
-h: print friendly help message
-l: print information about running VMs
-g: log specified text to the vmkernel log
UPDATE: It turns out there is an even simpler thanks to Frank Buechsel who is also from GSS. Frank mentioned you can send an NMI request simply using either the vSphere Web/C# Client. In the vSphere Web Client, you just need to right click on the VM and go to All vCenter Actions->Export Systems Logs. To be able to perform this action, you will need the Global->Diagnostic privilege for the the given user.
If you wish to perform this operation using the vSphere C# Client, you just need to select the VM and then at the top menu and click File->Export System Logs and you will have the option of sending the NMI request this way.
Using the vmdumper utility, you can create a BSOD (Blue Screen of Death) for a Windows or Kernel Panic for Linux Virtual Machines by sending an NMI (Non-Maskable Interrupt) request.
To send an NMI or any other request, you need to first identify the VM's World ID, this can be done using either ESXCLI or vmdumper utility itself.
esxcli vm process list | grep -A1 '^[VMNAME]'
vmdumper -l | grep [VMNAME]
vmdumper [WORLD-ID] nmi
After learning about the vmdumper utility, I also performed a quick search online and found VMware KB 2005715 that provides some additional information. It looks like the KB only references ESXCLI as a way to locate the World ID, I will see if we can get the KB updated to also include vmdumper method of identifying the VM's World ID.