You are not logged in.

#1 2015-02-09 16:32:10

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 58

automatically adjust VM resolution in virt-manager/KVM

How can I get my Arch/KDE installation in a libvirt/KVM VM accessed via Space/QXL/virt-manager to change the guest resolution to the size of the window on the host? Or at least change it to the native screen resolution when I switch to fullscreen? Thanks.

Last edited by OlafLostViking (2015-09-01 15:55:30)

Offline

#2 2015-07-05 09:18:45

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 58

Re: automatically adjust VM resolution in virt-manager/KVM

Today, after rebooting without changing any configurations, my virtual output devices in the VM changed from Virtual-? to qxl-? and now resizing works! Yay smile. Some graphical glitches are still to be seen, but this could also be a KF5 problem.

Last edited by OlafLostViking (2015-07-05 09:19:56)

Offline

#3 2015-09-01 15:55:22

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 58

Re: automatically adjust VM resolution in virt-manager/KVM

And broken again... sad

I am running

  • aur/spice-vdagent 0.16.0-2

  • aur/xf86-video-qxl 0.1.4-3

  • extra/spice 0.12.5-1

  • extra/spice-protocol 0.12.9-1

  • extra/xorg-server 1.17.2-4

on the client as well as on the host (obviously the vdagent is only installed on the virtualised client).

Is really nobody else using a virtualisation setup with libvirt/KVM on and with Arch?

Offline

#4 2017-07-06 20:04:53

johnLate
Member
Registered: 2012-03-26
Posts: 10

Re: automatically adjust VM resolution in virt-manager/KVM

Did you find a way to get it to work?

As a workaround I'm currently running

xrandr --output Virtual-0 --mode auto

manually on the client after resizing the virt-manager window. (Hint: use a toolbar icon or a keyboard shortcut.)

Offline

#5 2017-07-07 13:01:38

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 58

Re: automatically adjust VM resolution in virt-manager/KVM

Glad to see that at least one other person is trying to use KDE in a KVM VM ;-).

Unfortunately I didn't find a nice solution. Putting "spice-vdagent" into a sddm-greeter wrapper works somehow. SDDM doesn't adjust to the VM, but the Plasma desktop does. Until you use fullscreen. After that it won't change anymore. And SDDM doesn't come back to live after logging out. I also failed trying to use Xsetup etc.

A little improvement to your approach could be to use udev. The disadvantage is it only works for your special user...

$ cat <<EOF > /usr/local/bin/xrandr.sh
xrandr --output Virtual-0 --auto
EOF
$ cat <<EOF > /etc/udev/rules.d/99-xrandr.rules
KERNEL=="card0", SUBSYSTEM=="drm", ACTION=="change", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/YOURUSER/.Xauthority", RUN+="/bin/bash /usr/local/bin/xrandr.sh"
EOF

HTH

Offline

Board footer

Powered by FluxBB