0

So I have a Windows 10 VM running on Arch Linux and it is working fine with 1 Display. When I add the second video tag with virsh edit VM-name, and get the two displays, the mouse starts moving around weird and when not in movement place it self all the way to the left. Then when I try to click anywhere it moves to the top left corner and not pressing where it was.

How can I get the mouse to move normally or debug this error?

I see the VM with virt-viewer, setup up with libvirt and has spice set to graphics.

XML:

<domain type="kvm" id="2">
  <name>windows10</name>
  <uuid>1814f800-8c7f-441b-9c35-bd4fdd4bb5b3</uuid>
  <metadata>
    <libosinfo:libosinfo>
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">7864320</memory>
  <currentMemory unit="KiB">7864320</currentMemory>
  <vcpu placement="static">2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch="x86_64" machine="pc-q35-3.1">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
    </hyperv>
  </features>
  <cpu mode="host-passthrough" check="none"/>
    <clock offset="localtime">
      <timer name="rtc" tickpolicy="catchup"/>
      <timer name="pit" tickpolicy="delay"/>
      <timer name="hpet" present="no"/>
      <timer name="hypervclock" present="yes"/>
    </clock>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>destroy</on_crash>
    <pm>
      <suspend-to-mem enabled="no"/>
      <suspend-to-disk enabled="no"/>
    </pm>
    <devices>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <disk type="file" device="disk">
        <driver name="qemu" type="raw" cache="none" io="native"/>
        <source file="/var/lib/libvirt/images/win10.raw"/>
        <backingStore/>
        <target dev="sda" bus="virtio"/>
        <alias name="virtio-disk0"/>
        <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
      </disk>
      <disk type="file" device="cdrom">
        <driver name="qemu" type="raw"/> 
        <source file="/usr/share/virtio-win.iso"/>
        <backingStore/>
        <target dev="sdb" bus="sata"/>
        <readonly/>
        <alias name="sata0-0-1"/>
        <address type="drive" controller="0" bus="0" target="0" unit="1"/>
      </disk>
      <disk type="file" device="cdrom">
        <driver name="qemu" type="raw"/>
        <source file="/usr/share/win10.iso"/>
        <backingStore/>
        <target dev="sdc" bus="sata"/>
        <readonly/>
        <alias name="sata0-0-2"/>
        <address type="drive" controller="0" bus="0" target="0" unit="2"/>
      </disk>
      <controller type="usb" index="0" model="qemu-xhci" ports="15">
        <alias name="usb"/>
        <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
      </controller>
      <controller type="sata" index="0">
        <alias name="ide"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
      </controller>
      <controller type="pci" index="0" model="pcie-root">
        <alias name="pcie.0"/>
      </controller>
      <controller type="pci" index="1" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="1" port="0x10"/>
        <alias name="pci.1"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
      </controller>
      <controller type="pci" index="2" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="2" port="0x11"/>
        <alias name="pci.2"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
      </controller>
      <controller type="pci" index="3" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="3" port="0x12"/>
        <alias name="pci.3"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
      </controller>
      <controller type="pci" index="4" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="4" port="0x13"/>
        <alias name="pci.4"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
      </controller>
      <controller type="pci" index="5" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="5" port="0x14"/>
        <alias name="pci.5"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
      </controller>
      <interface type="network">
        <mac address="xxx"/>
        <source network="default" bridge="virbr0"/>
        <target dev="vnet0"/>
        <model type="e1000e"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      <serial type="pty">
        <source path="/dev/pts/2"/>
        <target type="isa-serial" port="0">
          <model name="isa-serial"/>
        </target>
        <alias name="serial0"/>
      </serial>
      <console type="pty" tty="/dev/pts/2"> 
        <source path="/dev/pts/2"/>
        <target type="serial" port="0"/>
        <alias name="serial0"/>
      </console>
      <input type="tablet" bus="usb">
        <alias name="input0"/>
        <address type="usb" bus="0" port="1"/>
      </input>
      <input type="mouse" bus="ps2">
        <alias name="input1"/>
      </input>
      <input type="keyboard" bus="ps2">
        <alias name="input2"/>
      </input>
      <graphics type="spice" port="5900" autoport="yes" listen="127.0.0.1">
        <listen type="address" address="127.0.0.1"/>
      </graphics>
      <video>
        <model type="qxl" ram="131072" vram="65536" vgamem="65536" heads="2" primary="yes"/>
        <alias name="video0"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
      </video>
      <memballoon model="virtio">
        <alias name="balloon0"/>
        <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
      </memballoon>
    </devices>
    <seclabel type="dynamic" model="dac" relabel="yes">
      <label>+65534:+992</label>
      <imagelabel>+65534:+992</imagelabel>
    </seclabel>
  </domain>
1

If anyone experiences this, the answer to my problem was to add a channel device with spicevmc. Also, make sure you have the spice-vdagent running

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.