Bug 885806 - RFE: support qxl multihead
Summary: RFE: support qxl multihead
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
: 1093902 1337745 1339289 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-10 16:55 UTC by James Harrion
Modified: 2020-01-26 21:49 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-01-26 21:49:03 UTC
Embargoed:


Attachments (Terms of Use)

Description James Harrion 2012-12-10 16:55:42 UTC
Description of problem:
Trying to set up a Windows 7 VM across two physical monitors

Version-Release number of selected component (if applicable):
virt-manager-0.9.4-2.fc17.noarch
virt-manager-common-0.9.4-2.fc17.noarch
spice-gtk-python-0.12-5.fc17.x86_64
spice-vdagent-0.10.1-1.fc17.x86_64
spice-gtk3-0.12-5.fc17.x86_64
spice-glib-0.12-5.fc17.x86_64
spice-gtk-0.12-5.fc17.x86_64
spice-client-0.10.1-5.fc17.x86_64
spice-gtk-tools-0.12-5.fc17.x86_64
spice-xpi-2.7-2.fc17.x86_64
spice-server-0.10.1-5.fc17.x86_64
libvirt-daemon-config-nwfilter-0.9.11.7-1.fc17.x86_64
libvirt-python-0.9.11.7-1.fc17.x86_64
libvirt-daemon-config-network-0.9.11.7-1.fc17.x86_64
libvirt-daemon-lxc-0.9.11.7-1.fc17.x86_64
libvirt-daemon-0.9.11.7-1.fc17.x86_64
libvirt-client-0.9.11.7-1.fc17.x86_64
libvirt-0.9.11.7-1.fc17.x86_64

Windows Device driver:
Red Hat QXL GPU
QXL 6.1.0.10012
Date: 05/10/2012
Signed by Red Hat, Inc

How reproducible:
Steps to Reproduce:
I have this host XML file in libvirtd/qemu:

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit Windows7
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>Windows7</name>
  <uuid>36e52831-d8b3-e780-43f8-5fc6b95dd0b7</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.15'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/vg_lp000138/Windows7'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/>
    </controller>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:99:60:5d'/>
      <source network='default'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <graphics type='spice' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' vram='131072' heads='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

  
Actual results:
Error starting domain: internal error only 1 graphics device is supported:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1090, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 554, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error only 1 graphics device is supported


Expected results:
Monitor A and B to have an extended Windows 7 desktop.

Not sure what I am doing wrong.

Additional info:
uname-a
nexus.qwert.com 3.6.8-2.fc17.x86_64 #1 SMP Tue Nov 27 19:35:02 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Comment 1 Cole Robinson 2012-12-16 16:01:22 UTC
That's expected, libvirt in F17 doesn't support multiple graphics connections, though other hypervisors do which is why virt-manager allows it.

You can accomplish what you want using multihead qxl, see the 'heads' parameter here:

http://libvirt.org/formatdomain.html#elementsVideo

For how to change the guest XML by hand, see:

http://wiki.libvirt.org/page/FAQ#What_is_the_.27virsh_edit.27_command_and_how_do_I_use_it.3F

virt-manager doesn't have multihead support though, so use the standalone virt-viewer tool: sudo virt-viewer <vmname>

I'm moving this bug to the upstream tracker, we can use it to track virt-manager multihead support

Comment 2 Cole Robinson 2014-05-03 17:04:25 UTC
*** Bug 1093902 has been marked as a duplicate of this bug. ***

Comment 3 James Harrion 2014-05-06 15:17:02 UTC
Hi Cole,
I had totally forgotten about bug and have not responded. The article you pointed out talks about the number of heads.

The XML for my Windows 7 machine has "heads=2". Does this mean two screens with need for two seperate Spice channels? I currently have one spice channel.

Not sure what I need to do next.

Many thanks,
james Harrison

Comment 4 Cole Robinson 2014-05-06 15:21:05 UTC
(In reply to James Harrion from comment #3)
> Hi Cole,
> I had totally forgotten about bug and have not responded. The article you
> pointed out talks about the number of heads.
> 
> The XML for my Windows 7 machine has "heads=2". Does this mean two screens
> with need for two seperate Spice channels? I currently have one spice
> channel.
> 

Ah I see, you did use the heads parameter, but indeed it only requires one <graphics type='spice'> connection.

There's some more info here:

http://people.freedesktop.org/~teuf/spice-doc/html/ch02s07.html

But actually it talks about multiple qxl devices and not qxl heads. My understanding though is that using heads=2 and virt-viewer, and configuring the monitors inside the VM, you should see two display windows on the host machine.

Comment 5 Daniel Berrangé 2014-05-06 15:25:22 UTC
(In reply to Cole Robinson from comment #4)
> But actually it talks about multiple qxl devices and not qxl heads. My
> understanding though is that using heads=2 and virt-viewer, and configuring
> the monitors inside the VM, you should see two display windows on the host
> machine.

Actually the 'heads' attribute in the XML is completely unused / irrelevant for SPICE / QXL. Only the VirtualBox virtualization driver needs that attribute to be set. So just ignore that value.

With SPICE / QXL there are two ways to get multiple heads. The old way was to simply add multiple QXL graphics cards. The modern way, is to just have a single QXL graphics card in the guest, and have the SPICE guest agent installed in the guest OS.  The number of heads exposed is then completely dynamic between 1 and 4.

eg if you have SPICE guest agent running, and open GNOME display properties in the guest, you should be able to just turn on the extra monitors, at which point virt-viewer will open new windows for each. Alternatively you can turn them on/off from virt-viewer menus too.

Comment 6 Cole Robinson 2014-05-06 15:29:58 UTC
Oh, sorry for the misinformation, not sure where I got that heads= bit from.

Comment 7 James Harrion 2014-05-06 16:14:43 UTC
Hi,
Since starting this bug I have upgraded to F20.

I have tried the old method with two "Video QXL" devices. running virt-viewer, the 2nd monitor showed up saying "Waiting for display 2", and no display. Windows control panel monitors didnt register 2 monitors.

The new way didnt work...

James

Comment 8 James Harrion 2014-05-16 14:10:36 UTC
Its working.

Using the old method.... I have two QXL Video definitions in my VM definition.

Updated the QXL driver and it worked. Im now using the driver from:

     http://www.spice-space.org/download/windows/qxl/qxl-0.1-21

Close the ticket if needed.

Thanks,
James Harrison

Comment 9 Cole Robinson 2014-05-16 16:54:02 UTC
It works with virt-viewer, but virt-manager should still need extra support to actually access monitor > 1

Comment 10 Adam Williamson 2015-01-09 23:38:28 UTC
I can't 'turn on' additional displays from GNOME Displays, but I can from virt-viewer, FWIW.

Comment 11 Adam Williamson 2015-01-09 23:41:00 UTC
The design is also a bit of problem for testing, for e.g., https://bugzilla.redhat.com/show_bug.cgi?id=725219 - if I can't 'turn on' the additional displays until anaconda has already started up, I can't test how it behaves on start up when multiple monitors are connected.

Comment 12 Cole Robinson 2016-05-20 14:59:02 UTC
*** Bug 1337745 has been marked as a duplicate of this bug. ***

Comment 13 Cole Robinson 2020-01-26 21:46:50 UTC
*** Bug 1339289 has been marked as a duplicate of this bug. ***

Comment 14 Cole Robinson 2020-01-26 21:49:03 UTC
I think the reality is that virt-manager is never going to really support qxl multihead. It would take
a significant architecting of how we handle VM windows internally, for a usecase that is reasonably
niche and that is already covered by virt-viewer. virt-manager's graphical console aims to cover
most regular users, but when it comes to advanced spice stuff the answer is to use virt-viewer, which
provides a lot more flexibility especially via command line options etc.

Closing this as WONTFIX


Note You need to log in before you can comment on or make changes to this bug.