Posey's Tips & Tricks
Dealing with a Hyper-V VM That's Stuck on Screen
A three-keystroke solution to a problem that has no discernible cause.
I want to talk about a Hyper-V issue that I have never heard anyone else talk about: a full screen virtual machine (VM) session that becomes stuck on screen. I have run into this problem a couple of times over the years, but repeatedly over the past few months. As such, I wanted to talk about some ways to deal with the issue.
Before I discuss my solution, let me give you a bit of context for the nature of the problem. My experience has been that the "stuck VM" issue can sometimes occur when remotely accessing a Hyper-V VM through an RDP session.
Windows normally displays RDP sessions within a window. If you want to close the RDP session, then all you have to do is close the window. It is possible, however, to run an RDP session full-screen. If you look at Figure 1, for example, it almost appears as though the open windows were running on my local machine. In reality, the windows are running in a full-screen RDP session.
The normal way to close a full-screen RDP session is to simply move your mouse pointer to the upper middle portion of the screen. This causes a tab to appear at the top of the screen. As you can see in Figure 2, this tab displays either the name or the IP address of the VM that you are accessing, and provides options to close or resize the RDP session window.
Recently, however, I have been encountering issues in which the blue tab shown in Figure 2 above fails to appear, leaving the RDP session stuck on screen with no obvious way to close it.
Unfortunately, I have yet to definitively determine the issue's underlying cause. I have encountered the issue most often while recording video-based training courses. As such, it's possible that the issue is tied to the recording software that I was using. However, I suspect that it probably isn't the recording software that's causing the issue, but rather a screen resolution mismatch.
The problematic VMs were configured to run at a resolution of 1920x1080, but the computer I was using to access the VMs and record the videos is equipped with a 4K display. It's possible that displaying a 1080p VM at 4K resolution might sometimes cause problems for the RDP client. Microsoft provides a PowerShell cmdlet (Set-VMVideo) that you can use to change a VM's resolution, but I have not yet had the opportunity to see if this cmdlet can help with the problem.
So, what can you do when a full-screen RDP session becomes stuck on screen and you can't close or minimize the window? For a while, I thought the only option was to shut down the VM. Of course, shutting down the VM isn't an ideal fix. Besides, the issue tended to come back the next time I connected to the VM.
Regardless of why the problem happens, the solution is surprisingly simple. The Windows RDP client supports a number of different keyboard shortcuts, and one of those shortcuts actually toggles the RDP session between windowed mode and full-screen mode. The keys that you need to press and hold are Ctrl, Alt and Pause (which is displayed as Break on some keyboards).
Upon pressing all three keys (which need to be held down simultaneously), a normal window bar will appear at the top of the RDP session. You can then use this bar to close or resize the window. You can see what this looks like in Figure 3.
In case you are wondering, I minimized the Hyper-V Manager because the window bar was the same color as the Hyper-V Manager, so displaying the Windows desktop rather than the Hyper-V Manager made the bar easier to see.
So, just remember that if you ever have trouble escaping from a full screen RDP session, just press Ctrl, Alt and Pause.
Brien Posey is a 20-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.