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 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.
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
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:
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:
You can also check the amount of VRM in the VM’s XML file. If you have big screen, e.g., widescreen, you might need to increase VRAM in the config and then VM screen size will follow virt-manager window dimensions.
Just an addition I observed from the OP’s first screenshot is, that it is Kali Linux (Guest) they test with. The Default desktop is in Kali Xfce and this again is still using x11.
So I tried with XFCE on Fedora which just comes with:
You are right about spice-vdagent being enabled, but it isn’t running. This is the output on my guest:
systemctl --user status spice-vdagent.service
○ spice-vdagent.service - Spice guest session agent
Loaded: loaded (/usr/lib/systemd/user/spice-vdagent.service; enabled; preset: enabled)
Active: inactive (dead) since Thu 2025-11-13 19:45:35 MST; 37s ago
Duration: 171ms
Invocation: eb6ed1e1b1b84a31a56c01391986c398
Docs: man:spice-vdagent(1)
Process: 1512 ExecStart=/usr/bin/spice-vdagent -x (code=exited, status=0/SUCCESS)
Main PID: 1512 (code=exited, status=0/SUCCESS)
Mem peak: 22.5M
CPU: 128ms
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: vdagent started
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: libEGL warning: DRI3 error: Could not get DRI3 device
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: spice-vdagent[1512]: display: failed to call GetCurrentState from mutter over DBUS
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: spice-vdagent[1512]: error message: Cannot invoke method; proxy is for the well-known name org.gnom>
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: display: failed to call GetCurrentState from mutter over DBUS
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: spice-vdagent[1512]: No guest output map, using output index as display id
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: error message: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.DisplayConfi>
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: No guest output map, using output index as display id
Nov 13 19:45:39 concrete-jungle systemd[875]: /usr/lib/systemd/user/spice-vdagent.service:23: Unknown key 'StandardError' in section [Install], ignoring.
Once I run systemctl --user status spice-vdagent.service, I can reboot, and the resolution scales– specifically if I enable it again. If I shutdown and then power on, it does not scale.
(these are some weird quirks that I do not fully understand. I may be missing some steps in the setup process)
However, as @ilikelinux posted, xrandr --output Virtual-1 --auto fixes the resolution. I will mark that as the solution.
It is just a Workaround, however as you can not select that, solution sounds good
p.s. might be a good Idea to put xrandr back to the live iso. So we not have to install it everytime.
At least as long we do not have a definitive solution.
I faced the same problem after not so smooth upgrade to F43 that required manual intervention using dnf distro-sync and some other magic.
The spice-vdagent service worked fine, but the screen resolution just didn’t follow the virt-manager window size.
In my case, I had to manually select the appropriate resolution in KDE Display Configuration that matched current virt-manager window dimensions. After that, automatic resolution change on window resize started working again.