Multi-monitor setup for KVM

Last modified by mjminkki@helsinki_fi on 2024/12/10 12:49

Short version

    • ==

Add a second (and 3rd and 4th...) display-adapter to the Virtual Machine when it's shut down. Start the VM. Enter this on the terminal:

spice://localhost:5900remote-viewer 


Longer version:

Open up virt-manager and open the Virtual Machine (VM), but DON'T START IT UP yet.


Go to the settings.

Choose "Add Hardware".

02 add hardware.png

On the next page, find Video

and check that it has QXL.

Click Finish

03 add video.png

Check that the VM sees the two adapters

04 you have two QXL.png

Now you can start up the VM

05 press play.png

Enter this on the terminal:

spice://localhost:5900remote-viewer 

05 remote-viewer.png

If it fails, wait few secs and try again

09 error connecting.png

Login to the VM

<no pic here>

You will now see 2-3 windows on your

Linux desktop

06 login to see.png


In the end this is what you would see on a dual monitor set up when you started the VM. In my example I have two monitors with different resolutions and
the second monitor has Firefox opened. After the picture I moved one Windows-window to the second monitor.

08 all screens.png


You can now move around the VM windows and put them on the monitor of your choice. Each window represents an unique monitor for the VM.

All the windows of VM are independent of how many physical monitors you have. You can have X amount of virtual monitors on a single physical monitor.