Spin up a fresh Ubuntu VM in Hyper-V and it's a near-universal first annoyance: the desktop is stuck at a low, fixed resolution and won't resize with the window, no matter how you drag it. There are two real fixes here, and which one you need depends on whether you're using Enhanced Session Mode.
Why This Happens
Hyper-V exposes video to a Linux guest through a synthetic framebuffer driver (hyperv_fb). In a Basic Session (the default VMConnect window), that driver only advertises a small, fixed list of resolutions — it has no way to know how big your window actually is, so it just picks one and sticks with it.
Enhanced Session Mode works completely differently: instead of a raw framebuffer, it tunnels an RDP-like session over a Hyper-V socket, which does know your window's actual size and resizes dynamically, exactly like resizing a Remote Desktop window. This is the fix that makes the problem disappear entirely rather than working around it.
Fix 1: Turn On Enhanced Session Mode (Recommended)
This needs to be enabled in two places:
On the Hyper-V host, in Hyper-V Manager: right-click the host → Hyper-V Settings → Enhanced Session Mode Policy → check Allow enhanced session mode.
Inside the Ubuntu guest, install the pieces that let it accept that session:
sudo apt update
sudo apt install -y linux-virtual linux-tools-virtual linux-cloud-tools-virtual
sudo apt install -y xrdp
sudo systemctl enable --now xrdp
Reboot the VM. When you reconnect via VMConnect, it should now negotiate an enhanced session automatically — resize the window and the guest resolution follows immediately, the same way it would over RDP.
Fix 2: Manually Set a Resolution (Basic Session)
If you're intentionally staying on a Basic Session (e.g. no GUI login manager, or a minimal/server install), you can still get a usable resolution out of hyperv_fb by generating a custom mode with cvt and adding it manually:
cvt 1920 1080
# Outputs a Modeline you can pass to xrandr, e.g.:
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual-1 "1920x1080_60.00"
xrandr --output Virtual-1 --mode "1920x1080_60.00"
The output name (Virtual-1 above) varies — run xrandr on its own first to see what your VM calls its display. This survives until reboot; if you want it permanent, drop the same three commands into an Xorg startup script or a systemd unit.
Which One Should You Use?
If you have any GUI use for the VM at all, Enhanced Session Mode is worth the five minutes of setup — it's a proper fix rather than a workaround, it gives you clipboard sharing and drive redirection for free, and you'll never think about resolution again. Fix 2 is really only worth it for headless-adjacent setups where you occasionally need a GUI and don't want xrdp running permanently.
Full walkthrough with the exact host and guest settings is on the channel.
