Ubuntu in Hyper-V: Fixing the Screen Resolution
Why It Looks Wrong
A fresh Ubuntu VM on Hyper-V often boots into a resolution that does not match the window — either a small 1024x768 box in the corner of a large window, or a stretched image. Hyper-V's synthetic graphics device does not do what a physical monitor does, so Ubuntu falls back to a conservative default.
There are two separate mechanisms and it is worth knowing which one your VM uses, because the fix differs.

The GRUB Method, Which Usually Works
This is the reliable approach and it works on both the older framebuffer driver and the newer one.
Edit the GRUB configuration:
sudo nano /etc/default/grub
Find GRUB_CMDLINE_LINUX_DEFAULT and add the video parameter:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"
Then regenerate the configuration:
sudo update-grub
sudo reboot
The video=hyperv_fb:WxH parameter tells the Hyper-V framebuffer what mode to set. It applies at boot, before the desktop starts, which is why it works where changing display settings inside the desktop session does not.
Note the driver name. On newer kernels Ubuntu uses hyperv_drm rather than hyperv_fb. If the parameter appears to be ignored, try:
video=hyperv_drm:1920x1080
You can confirm which driver is active:
lsmod | grep -i hyperv
dmesg | grep -i -E 'hyperv_fb|hyperv_drm'
dmesg will also tell you if the requested mode was rejected, which is the usual reason a correct-looking parameter does nothing — the hardware may not support the exact resolution you asked for.
The Hyper-V Side
There is a PowerShell cmdlet that sets the VM's video adapter:
Set-VMVideo -VMName "Ubuntu 20.04" -HorizontalResolution 1920 -VerticalResolution 1080 -ResolutionType Single
Two things to know before you try it:
The parameter names are -HorizontalResolution and -VerticalResolution, with a space, not a colon. The version of this snippet that circulated used -horizontalresolution:1900 — a colon separator and a typo in the number — which fails with a parameter error.
It only takes effect for VMs using the synthetic video adapter in "Single" resolution mode, and often only for Generation 2 VMs with the correct integration services. On many setups it silently does nothing, which is why the GRUB method is the one I reach for first.
Confirm your VM generation:
Get-VM -Name "Ubuntu 20.04" | Select-Object Name, Generation
Which Resolution To Ask For
Pick a mode the Hyper-V framebuffer supports. Common values that work:
1920x1080— the default choice on a 1080p host1600x900— good for a laptop host1280x720— small windows, low overhead
Non-standard ratios like 1920x1200 sometimes fail. If the VM boots to a black screen after a change, that is the failure mode: boot into recovery, edit /etc/default/grub from the root shell, and remove the parameter. It is recoverable, but knowing the recovery route before you reboot matters.
The Stretched-Image Case
If the desktop is present but stretched rather than small, that is usually a guest tools issue rather than a resolution one. Make sure linux-image-virtual and the Hyper-V daemons are installed:
sudo apt install linux-image-virtual linux-tools-virtual linux-cloud-tools-virtual
Those packages provide the integration services that let the guest respond to window resizing. Without them, the framebuffer sets a fixed mode and the desktop stretches to fill it.


If It Is Still Wrong
Between hyperv_fb and hyperv_drm, kernel version differences and the two Hyper-V generations, there is a real chance neither fix lands on the first attempt. The diagnostic that saves time is dmesg, always:
dmesg | grep -i -E 'hyperv|drm|fb0'
It will tell you which driver bound, which modes it parsed and which were rejected. Everything else is guessing.
Don't trust the download button. Trust the hash.
If this was useful, More hands-on tech guides at TechGeek. No pressure — read it whenever it's useful.