Virt-manager won't resize VM resolution with window

,

I’m trying to use virt-manager, but when I launch a VM, the resolution doesn’t scale properly. See the black bars on the left and right sides in the attached screenshot:

I followed this post, but the VM still doesn’t scale: Under qeum-kvm / virt-manager, how to add custom resolution

It doesn’t scale normally in fullscreen mode either.

hostnamectl output:
Icon name: computer-laptop
Chassis: laptop :laptop:
Machine ID: 2caa7f889eb84500a609464996089977
Boot ID: d1f3b9f7a5a745eb937cb68c3a8e0bab
Operating System: Fedora Linux 43.20251102.0 (Silverblue)
CPE OS Name: cpe:/o:fedoraproject:fedora:43
OS Support End: Wed 2026-12-02
OS Support Remaining: 1y 3w 6d
Kernel: Linux 6.17.5-300.fc43.x86_64
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: Latitude 3520
Hardware SKU: 0B21
Hardware Version: A01
Firmware Version: 1.43.2
Firmware Date: Mon 2025-09-01
Firmware Age: 2month 3d

Check this:

# Host
virsh dumpxml VM_NAME --xpath "//graphics|//video"

# Guest
systemctl status spice-vdagentd.service
systemctl status spice-vdagent.service --user

I am using workstation and am able to set the resolution in the display settings for the VM. Once I have done that then I resize the window to match the size of the VM desktop.

In your image it may scale if you expand the window vertically. The layout (16x9) is normally fixed to avoid distortion of images that expand in one direction but not the other.

virsh list does not know any of my VMs it seems?

In the XML that I can view in VMM I have these sections:

    <video>
      <model type="virtio" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>

I have vdagent services running and I do not see the VM resize when I change the Windows size.

I do have these errors

Nov 05 12:49:34 f43kde.internal spice-vdagent[1966]: Adding graphics device info: channel_id: 0 monitor_id: 0 device_address: pci/0000/01.0, device_display_id: 0 xrandr output ID: 33
Nov 05 12:49:34 f43kde.internal spice-vdagent[1966]: display: failed to call GetCurrentState from mutter over DBUS
Nov 05 12:49:34 f43kde.internal spice-vdagent[1966]:    error message: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.DisplayConfig without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Host is f42 kde guess in f43 kde.

FYI On my mac I use UTM that is kvm/qemu based and the VM screen does resizes when I change the window size.

kscreen-doctor -o shows the changed screen size.

If you use xorg and wayand mixed, the resize has to be don in the terminal manually as a workaround.

I used xfce in a virt-manager window while running Workstation/Wayland.
One workaround is to run the following in the guest every time you resize your window:

$ xrandr --output Virtual-1 --auto

Please check if your output also is Virtual-1.

There’s not enough info in the OP to be sure this is the same issue.
It works correctly for me on a fully upgraded host and guest F43 with GNOME.
A similar problem was fixed by a relatively recent update:
2394505 – spice-vdagent does not run automatically in GNOME (so copy/paste to/from host and other agent-backed functions do not work in KVM VMs)

The agent is running but I’m not using gnome, which I hope is not required!

Do you see that error I hilighted? If not I think I need to report the error as a bug.

No, this is what I got: cpaste

This works for me in GNOME:

busctl --user introspect \
    org.gnome.Mutter.DisplayConfig \
    /org/gnome/Mutter/DisplayConfig \
    org.gnome.Mutter.DisplayConfig
busctl --user call \
    org.gnome.Mutter.DisplayConfig \
    /org/gnome/Mutter/DisplayConfig \
    org.gnome.Mutter.DisplayConfig GetCurrentState

Does KDE provide a similar D-Bus service?

Host output:

I included the Virtual Machine Manager window just to confirm I spelled the VM name correctly.

Guest output:

I’m using the system defaults, so I assume Silverblue is using xorg or wayland.

My system doesn’t come with xrandr:

Screenshot From 2025-11-05 20-22-34

You need this to make it work:

1 Like

Please do that first what @vgaetera wrote.

I am on Workstation too. After installing the pakage mentioned, and if you are in a xfce guest, and still get the issue of not increasing to window size, you will need the command i posted.

Remember, it is for x11 guests on a wayland v-machine.

So you need to execute in the terminal of the guest.

This has mostly solved my issue. A few things to note:

spice-vdagent is already installed, but I got an error message when I tried installing it. I’m not sure if I should be concerned about the “–allow-inactive” flag:

I can’t enable spice-vdagent, but I can start it:

I ran the following command in my guest, then rebooted:

And now the resolution is scaling properly.

However, upon rebooting again, the resolution fails to scale again. Presumably because spice-vdagent is not enabled?