![光标跳到左角(Windows 10 vm - kvm)](https://linux22.com/image/150373/%E5%85%89%E6%A0%87%E8%B7%B3%E5%88%B0%E5%B7%A6%E8%A7%92%EF%BC%88Windows%2010%20vm%20-%20kvm%EF%BC%89.png)
因此,我有一个在 Arch Linux 上运行的 Windows 10 虚拟机,并且它在 1 个显示器上运行良好。当我添加第二个video
标签virsh edit VM-name
并获得两个显示器时,鼠标开始奇怪地移动,当不移动时,它会一直向左移动。然后,当我尝试单击任意位置时,它会移动到左上角,而不是按原来的位置。
如何让鼠标正常移动或调试此错误?
我看到虚拟机带有 virt-viewer,使用 libvirt 设置,并且已将 SPICE 设置为图形。
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
如果有人遇到过这种情况,我的问题的答案是使用spicevmc添加通道设备。另外,请确保您正在运行Spice-vdagent