Windows
游標跳到左角(windows 10 vm - kvm)
所以我有一個在 Arch Linux 上執行的 Windows 10 VM,它在 1 個顯示器上執行良好。當我添加第二個
video
標籤virsh edit VM-name
並獲得兩個顯示時,滑鼠開始奇怪地移動,當不移動時,它一直向左放置。然後,當我嘗試點擊任何位置時,它會移動到左上角而不是按下它所在的位置。如何讓滑鼠正常移動或調試此錯誤?
我看到帶有 virt-viewer 的虛擬機,使用 libvirt 進行設置,並將香料設置為圖形。
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>
如果有人遇到這種情況,我的問題的答案是添加一個帶有 spicevmc 的通道設備。另外,確保你有 spice-vdagent 正在執行