Getty Images
How to get the right Hyper-V window size in Windows 11
When users work from a Hyper-V VM session in Windows 11, they need to ensure a properly sized window to avoid UX and functionality issues with the session and business apps.
Hyper-V VMs work within a window on a Windows 11 desktop, so it is essential for IT administrators to deliver the proper window size to ensure productivity and a functional workstation.
An improperly sized window can drastically affect the UX and even limit business applications' functionality. While it isn't a difficult process to ensure a virtual machine (VM) is the right size, it is essential for all VM sessions.
As a VM administrator, you need to assess the needs of each type of VM session and ensure they have the proper sizing.
Why is the correct window size important for VMs?
There are several reasons why selecting the correct window size for your VMs is essential. Having a too large window can lead to parts of the screen being cut off and sections of interface can be missing, as shown in Figure 1.
You can see at the bottom that the window is cut off by the taskbar from the host -- the machine running the VM via Hyper-V. Parts of the VM's interface, such as the taskbar and part of the start menu, are missing from the VM interface. This will make it incredibly difficult to use the VM.
Another issue that comes with selecting the wrong size is a window size that is too small leading to application errors because the session can't meet the minimum resolution requirement. These requirements can be for the whole application or specific functions within the application. Even if the window size doesn't limit application functions, it can lead to text or images being difficult to read and view.
How do you pick the correct window size for Hyper-V VMs?
First, it's essential to know the resolution of your host display. You can find this by clicking the right mouse on the desktop and clicking on Display Settings. Here, you can find your display resolution. Figure 2 shows the resolution is 1920 x 1080 (Full HD).
Based on these dimensions, you should never select a resolution over 1920 x 1080 because it will cut off parts of the interface. Microsoft advises a resolution of at least 800 x 600 for a modern system, so somewhere in between these resolutions should be fine. 1366 x 768 is the default resolution.
When you connect your session with enhanced session turned on, Hyper-V will advise you on a good window size for the given display resolution. The method to set the Hyper-V VM resolution will depend on whether the VM is a basic or an enhanced session.
Adjust the resolution of a basic Hyper-V VM session
A basic session is quite different from an enhanced session because it doesn't use the RDP protocol and connects to the VM console. There is no support for resizing the window, local clipboard and local printers in a basic session. There is also no USB and sound redirect in a basic session. To switch between enhanced and basic modes, you can click on this icon in the top bar, shown in Figure 3.
You can also navigate to View Menu and turn enhanced mode on and off.
Some VMs, such as Linux VMs or older Windows VMs, don't support enhanced mode and will automatically connect to basic mode. To set the window size for basic mode, you need to change the video output for the VM. You can do this with PowerShell on the host that runs the VM. Ensure the VM is turned off and you have administrator rights in PowerShell with the following command:
Set-VMVideo -VMName "VM NAME" -HorizontalResolution 1366 -VerticalResolution 768
In place of the VMName parameter, enter the VM name of which you want to change the resolution. You can also fill in the resolution that you want. In the example, it's 1366 x 768. It's also possible to change the window size and resolution of your VM within the VM by going to the display settings. The PowerShell command will work on Linux and Windows VMs.
Adjust the resolution of an enhanced Hyper-V VM session
By default, when you connect to a modern Windows VM within Hyper-V you will get an enhanced session. An enhanced session uses the Remote Desktop Protocol (RDP) to connect with the VM's desktop. This brings all the benefits of RDP to the VM connection, such as resizing the window and access to the local clipboard and local printer. Enhanced sessions can also work on Linux VMs but require the installation and setup of XRDP.
When connecting to an enhanced session, you will be prompted to select your resolution for the session, as shown in Figure 4. If you expand the options, you can also save the resolution so you don't get asked the same question when you connect again to the VM.
In this window, you can also select whether you want the local clipboard and printers passed through to the VM. After connecting to the VM, you can change the window size in a few ways. You can select fullscreen by clicking the expand window icon in the top-right corner of the screen. Because it's an enhanced session, you can also resize the window; this will automatically resize the resolution of the VM, as shown in Figure 5.
Even selecting a too-big or too-small resolution can easily be fixed in an enhanced session by 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.