How to get the right Hyper-V window size in Windows 11

In the realm of IT administration, ensuring that Hyper-V virtual machines (VMs) operate seamlessly on a Windows 11 desktop is paramount. The window size of these VMs plays a critical role in maintaining productivity and functionality. An incorrectly sized window can significantly hinder user experience (UX) and restrict the capabilities of business applications. While adjusting the window size may seem straightforward, it is a crucial task that must be addressed for every VM session.

Why is the correct window size important for VMs?

Selecting the appropriate window size for your VMs is essential for several reasons. A window that is too large may result in portions of the screen being obscured, leading to missing interface elements. For instance, if the VM window is cut off by the host’s taskbar, as illustrated in Figure 1, users may struggle to access vital components like the taskbar and start menu, rendering the VM challenging to navigate.

<figure class="main-article-image full-col" data-img-fullsize="https://www.techtarget.com/rms/onlineimages/howtosizehypervsessions_1-f.jpg”>

Figure 1. An example of a Hyper-V Windows 11 session with an improperly sized window.

Conversely, a window that is too small can lead to application errors due to the session failing to meet minimum resolution requirements. This issue may affect the entire application or specific functions within it. Even when the window size does not impede application functionality, it can make text and images difficult to read and view.

How do you pick the correct window size for Hyper-V VMs?

To determine the appropriate window size for your Hyper-V VMs, start by identifying the resolution of your host display. This can be accomplished by right-clicking on the desktop and selecting Display Settings. Here, you will find your display resolution, which, as shown in Figure 2, may be set to 1920 x 1080 (Full HD).

<figure class="main-article-image full-col" data-img-fullsize="https://www.techtarget.com/rms/onlineimages/howtosizehypervsessions_2-h.jpg”>

Figure 2. The Display settings of a desktop session set to HD resolution.

Based on these dimensions, it is advisable not to select a resolution exceeding 1920 x 1080, as this could obscure parts of the interface. Microsoft recommends a minimum resolution of 800 x 600 for modern systems, making a range between these resolutions ideal, with 1366 x 768 being the default.

When connecting your session with enhanced session mode activated, Hyper-V will suggest an optimal window size based on the current display resolution. The method for setting the Hyper-V VM resolution will vary depending on whether the VM is operating in basic or enhanced session mode.

Adjust the resolution of a basic Hyper-V VM session

A basic session differs significantly from an enhanced session, as it does not utilize the Remote Desktop Protocol (RDP) and connects directly to the VM console. Consequently, it lacks support for resizing the window, local clipboard access, and local printer integration. To switch between enhanced and basic modes, users can click on the designated icon in the top bar, as shown in Figure 3.

<figure class="main-article-image full-col" data-img-fullsize="https://www.techtarget.com/rms/onlineimages/howtosizehypervsessions_3-h.jpg”>

Figure 3. The icon on the Hyper-V session that allows you to switch between enhanced and basic modes.

Additionally, users can navigate to the View Menu to toggle enhanced mode on and off. Some VMs, particularly Linux or older Windows VMs, may not support enhanced mode and will connect automatically to basic mode. To adjust the window size in basic mode, users must modify the video output for the VM using PowerShell on the host running the VM. Ensure the VM is powered off and that you possess administrator rights in PowerShell, then execute the following command:

Set-VMVideo -VMName "VM NAME" -HorizontalResolution 1366 -VerticalResolution 768

Replace the VMName parameter with the name of the VM for which you wish to change the resolution. You can also specify your desired resolution, such as 1366 x 768. This PowerShell command is applicable to both Linux and Windows VMs.

Adjust the resolution of an enhanced Hyper-V VM session

An enhanced session utilizes the Remote Desktop Protocol (RDP) to connect with the VM’s desktop, providing numerous advantages.

Upon connecting to a modern Windows VM within Hyper-V, users will typically enter an enhanced session by default. This mode leverages RDP to facilitate a more dynamic connection, allowing for window resizing and access to local clipboard and printer functionalities. Enhanced sessions can also be configured for Linux VMs, provided that XRDP is installed and set up correctly.

During the connection process to an enhanced session, users will be prompted to select their preferred resolution, as depicted in Figure 4. Expanding the options allows users to save their resolution settings for future connections, eliminating repetitive prompts.

<figure class="main-article-image full-col" data-img-fullsize="https://www.techtarget.com/rms/onlineimages/howtosizehypervsessions_4-h.jpg”>

Figure 4. The pop-up for Display settings on an enhanced Hyper-V VM with the option to change the session’s size.

Once connected, users can alter the window size through various methods, including selecting fullscreen mode by clicking the expand window icon in the top-right corner. Due to the nature of enhanced sessions, resizing the window will automatically adjust the VM’s resolution, as illustrated in Figure 5.

<figure class="main-article-image full-col" data-img-fullsize="https://www.techtarget.com/rms/onlineimages/howtomanagerhypervsessions_5-h.jpg”>

Figure 5. The automatic resizing feature, which Hyper-V’s enhanced sessions offer, fixing an improperly sized desktop.

In an enhanced session, even selecting a resolution that is too large or too small can be easily rectified by simply resizing the window.

Chris Twiest works as a technology officer at RawWorks in the Netherlands, focusing on the future Workspace and Cloud technologies for the end user.

Winsage
How to get the right Hyper-V window size in Windows 11