When troubleshooting issues related to virtual machine availability or responsiveness on VMware ESXi, it may be necessary to suspend a virtual machine and collect diagnostic information.
For vSphere 6.5 onward, support bundles can include encrypted information from an ESXi host. For more information on what information is included in the support bundles, see Data collected when gathering diagnostic information from vSphere products
This article provides several methods for suspending a virtual machine on several versions of VMware ESXi. Deciding whether to crash or suspend a virtual machine is outside the scope of this article.
For more information on:
Troubleshooting, see Troubleshooting a virtual machine that has stopped responding
VMware vSphere ESXi 6.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
VMware vSphere vCenter Server 6.x
VMware vSphere vCenter Server 7.x
VMware vSphere vCenter Server 8.x
Several methods are available to suspend a virtual machine, some of which are applicable to specific versions of VMware ESXi. Choose the method most appropriate for the environment:
The vSphere Client can be used to suspend a virtual machine and collect the data using "Export System Logs" option from virtual machine's Action Menu.
Prerequisites
Procedure
Prerequisites
Console session open to the ESXi host, either at the local console or via SSH.
The virtual machine must be registered in the inventory.
The vm-support
command-line log collection utility supports the use of manifests to create or collect specific information from a host or virtual machine.
Log in to the ESXi Shell as root.
# vm-support --performance --manifests="HungVM:Suspend_VM" --groups="Hardware Logs Network Storage System Userworld VirtualMachines" --vm="</vmfs/volumes/path/to/virtualmachine.vmx>"
Prerequisites
Procedure
Suspend virtual machine
task to complete.Prerequisites
# vim-cmd vmsvc/getallvms
# vim-cmd vmsvc/power.suspend VMID
Prerequisites
Procedure
# cd /vmfs/volumes/vsan:524fcc9a876dcefd-be39dfd52bd37e0e/<VM directory>
# cat <file name>.vmem
# /usr/lib/vmware/osfs/bin/objtool open -u <object ID>
If the virtual machine is a Full Clone desktop in Horizon, it must be placed on Maintenance Mode before proceeding with the preceding steps. Otherwise, if Horizon has the desktops set to Ensure desktops are always powered on, the virtual machine gets powered on as the virtual machine is suspended.
In the VMware Horizon View Administrator, Navigate to Inventory > Desktops.
Right-click the virtual machine and click Enter Maintenance Mode.
Suspend the virtual machine.
If the virtual machine is an Instant Clone desktop in Horizon, suspending the virtual machine in vSphere will not be useful as Horizon will recycle the VM before the completion of data collection. Instead follow these steps:
Take a snapshot of the VM in vSphere. Select the option to Snapshot the virtual machine's memory.
Follow the steps in Converting a snapshot file to memory dump using the vmss2core tool to convert the vmss to a dmp file.
“vm-support” command in ESX/ESXi to collect diagnostic information
Collecting diagnostic information for VMware ESX/ESXi