HCal4
Posts: 10
Joined: Thu Jun 01, 2017 12:04 am

Dual Monitors with Windows 10 on KVM

Wed Jun 28, 2017 1:08 pm

How to run a Windows 10 guest on KVM with Dual Monitors

Assumptions:
  • You are using virt-manager
  • You already have Windows 10 running as a guest (need a tutorial?)
  • You have shut down the Windows 10 guest
  • You have backed up your guest. This could break something and I don't want to leave you worse off than you are now.
  • Pro-tip: If you have a new-ish computer that came with windows (and oddly some that didn't) a valid windows key is in your acpi tables. Run the command below to get it and download a free iso from microsoft.

    Code: Select all

    sudo hexdump -s 56 -e '"MSDM key: " /29 "%s\n"' /sys/firmware/acpi/tables/MSDM
Steps:
  • In virt-manager select your Windows 10 guest and click Edit and then Virtual Machine Details.
  • If you see anything other than you vm settings click the i icon. For some reason if the VM is running virt-manager sometime loads the VM's display instead of the settings so don't worry.
    vmsettings.png
    vmsettings.png (54.94 KiB) Viewed 1752 times
  • You should have one device labeled Video QXL. (My screenshot has two) To add a second click the Add Hardware button.
  • Select Video from the list and in the drop down menu set the model to QXL. Click Finish at the bottom.
    addvideo.png
    addvideo.png (36.2 KiB) Viewed 1752 times
  • You should now have two Video QXL devices.
  • Start the VM and close virt-manager
  • in a terminal run

    Code: Select all

    remote-viewer spice://localhost:5900
  • This will open a window with your Windows guest.
  • Reboot the guest and close the remote-viewer window.
  • In your host's terminal run

    Code: Select all

    remote-viewer spice://localhost:5900
  • In the remote-viewer menu bar select View and tick the Display 2 box.

Notes:
  • The remote-viewer windows sometimes open on top of each other.
  • If your cursor is wonky on the second screen try using the tablet hardware instead of the mouse (it is an emulation setting and doesn't require a tablet, a mouse will work)
  • You can launch remote-viewer from the GUI if you prefer. It is labeled "Remote Viewer"
I think I've replicated my steps pretty closely, but let me know if you get stuck so I can help and fix the tutorial.
Last edited by HCal4 on Fri Jun 30, 2017 1:30 pm, edited 3 times in total.

User avatar
Justin
Development Team
Posts: 3617
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: Dual Monitors with Windows 10 on KVM

Thu Jun 29, 2017 6:21 am

Nice well laid out guide! Thanks!

HCal4
Posts: 10
Joined: Thu Jun 01, 2017 12:04 am

Re: Dual Monitors with Windows 10 on KVM

Fri Jun 30, 2017 1:06 pm

Thanks, I figure if I post things that take me a while to figure out maybe it will save someone from the same trouble.

HCal4
Posts: 10
Joined: Thu Jun 01, 2017 12:04 am

Re: Dual Monitors with Windows 10 on KVM

Fri Jun 30, 2017 1:25 pm

To get USB pass through working I stole a few lines from a fix I used on another distribution to get a paper scanner working.

As root, edit /etc/udev/rules.d/40-scanner-permissions.rules

Add the following lines:
# usb trick
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE:="0666"
SUBSYSTEM=="usb_device",MODE:="0666"


reboot!

I'm not positive this is the best way. I think it might be better to set up some security access groups, but I'm not sure. Maybe someone more knowledgeable can suggest a better way.

Return to “Tutorials”