Running “xrandr --size 800x600” on a virtual machine affected both monitors on my workstation. That was completely unexpected and I am wondering how to explain that.

Below you will find the detailed description.

I run KVM on a Debian 11 server, which has no monitor or keyboard attached to it. One of the VMs running on that server is a Ubuntu desktop 22.04 LTS (I needed the desktop version due to the application I was running there). From another machine (a workstation running Debian 11, xfce) with two monitors I access the Ubuntu VM when I need to. I use ssh to the server to establish a ssh tunnel, and then access the Ubuntu machine with the command “/usr/lib/ssvnc/vncviewer localhost:5906 &”.

A couple of weeks ago I decided to increase the Ubuntu VM resolution to 1600x1200 to make my work easier, and that initially worked. However, today, after a reboot of the Debian server and all VMs, I noticed that the Ubuntu screen (through VNC) would still have the resolution of 1600x1200 when displayed on my workstation, but it would display as black on the top and gray on the bottom, without any image. The VM console was dead. However, I could still access the VM through ssh. So, I started trying different commands to fix the problem. One of the commands I issued on the VM (through ssh) was “xrandr –size 800x600”.

When I issued the xrandr command, one display on my workstation turned off, and the other one went to 800x600 resolution. That was completely unexpected. I am asking myself how can a command issued on a VM which is running on a different machine affect the screen resolution of the workstation used to access that VM. Just to be clear, I was accessing that VM both through ssh and through vncviewer (still back and gray screen image) when that happened.

If you think I issued the xrandr command on the wrong machine, that was not the case: history makes it clear.

Just to be complete, the solution to the video problem was to make a change on the KVM xml file, from video type=vga to type=virtio.

But my real concern is how a xrandr command issued on a VM which is running on another machine could affect the video of the client machine used to access that VM.

I would appreciate an explanation for that.

Thanks,

Albert

Reply via email to