In development environments or when debugging a issue, it is usually a pain to get a crash dump of an existing VM state.
Anton Naumovich from Hyper-V team recently released a tool which can convert a VM saved state to a full memory dump file. This tool enables easier debugging of issues in the VMs and provides the fastest way to generate a memory dump file from a VM. It comes as a single executable and with a single command; any saved VM or online snapshot can be converted into a full memory dump file.
You can get the tool from http://code.msdn.microsoft.com/vm2dmp. This location also contains the usage information for the tool.
Hyper-V(tm) VM State to Memory Dump Converter (vm2dmp) is a command-line tool that converts the saved state of a Hyper-V virtual machine to a full memory dump file compatible with Debugging Tools for Windows. You can use this tool to convert the memory contents of a virtual machine at a point of time to a full memory dump file. The vm2dmp tool makes it easier to debug hard problems when they occur on virtual machines. Using this tool, developers can save time by avoiding the need to create a dump file over a slow debugger connection or from the operating system running inside the virtual machine.
License and Disclaimer
“Hyper-V(tm) VM State to Memory Dump Converter” and associated documentation are licensed under the Microsoft Public License (Ms-PL) as described here, and are provided “AS-IS”. You bear the risk of using it. No express warranties, guarantees or conditions are provided.
“Hyper-V(tm) VM State to Memory Dump Converter” is not supported or endorsed by Microsoft Corporation and should be used at your own risk.
Copy the vm2dmp.exe to the installation folder for Debugging Tools for Windows (e.g. C:\Program Files\Debugging Tools for Windows\). After this operation vm2dmp is ready to use.
Create a dump file from virtual machine:
vm2dmp.exe –vm VISTASP1-ENT-32 -dmp C:\VM\memory.dmp
Create a dump file from snapshot's state:
vm2dmp.exe –vm VISTASP1-ENT-32 –snap “VISTASP1-ENT-32-snapshot-SP1” -dmp C:\VM\memory.dmp
Create a dump file using virtual machine state files:
vm2dmp.exe -bin C:\VM\example.bin -vsv C:\VM\example.vsv -dmp C:\VM\memory.dmp
Create a dump file using local symbols:
vm2dmp.exe -bin C:\VM\example.bin -vsv C:\VM\example.vsv -dmp C:\VM\memory.dmp –sym C:\symbols
For detailed instructions you can download user guide from here
- A computer running the release version (RTM) one of the following Windows operating systems:
- Windows Server 2008 R2
- Windows 7
- Installation of “Debugging Tools for Windows”.
- For required symbol information; either internet connection or correct guest operating system symbols for the virtual machine being converted into dump file, cached locally on the host.
- Guest operating system to be one of Hyper-V supported operating systems when state information was created.