Force a Manual Memory Dump on Your Windows Hyper-V Virtual Machine
Опубликовано Dec 12, 2023
Here's how to configure a Microsoft Hyper-V VM to allow the creation of a kernel memory dump. A manual dump process is demonstrated from the VM's Hyper-V host.
Hello, thanks for joining me today. We're going to discuss how to force a manual memory dump from a windows. Hyper V virtual machine. For demonstration purposes, we're using a VM called W 2019. This particular VM has a history of locking up or hanging where um user access is inaccessible when this occurs. Also, when we attempt to connect to it with Hyper V manager or with RDP manager, uh we're not able to connect to it. All visible process activity is stopped. So for troubleshooting, I want to get a manual memory dump from this system for analysis. This VM is running on a hyper V host and both the host and the VM uh play a role in doing the forced memory dump process. So let's go ahead at this point and configure our VM.
So on the VM, we bring up an administrative powershell ise window and we'll run powershell commands to configure our system recovery settings. We'll start off with our first command which will ensure that the system will not reboot on failure. So I'm gonna go ahead and run that right now. We do this to ensure that we actually get a memory dump. And the system simply doesn't do a restart when we force that failure from our host. The second command will specify the type of dump I want.
In this case, I want a kernel level memory dump and we run that. The last command is dedicated to specifying the path. This is usually the default location for windows memory dumps uh anyway, by default, but we're gonna go ahead and set that path to ensure that it is actually going to that location. So, ok, we've done that. Ok? So we've set up everything on the VM. Let's go ahead and move back to the host at this point. So on the host, we have an administrative powershell window once again. And in this case, RVM is actually online and running, but we do want to simulate that scenario where it has gone into that hang state. So we're going to run this particular command to force the memory dump to occur.
So I'm gonna go ahead and run it now. It'll ask me if I want to accept that. And I do and this indicates that the process has begun on the VM to force the dump. Ok. Let's go ahead and connect and see that. Ok? Ok. So we do have a memory dump that is taking place at this point. So we're going to allow this to complete and rejoin after that. So our memory dump has completed, I've logged back into the VM. I've gone to the location where we expect to see our memory dump and I do in fact see a newly created memory dump. So that concludes a review of how to force a manual memory dump on a windows hyper VVM.