【问题标题】:QEMU: problems with mouse and keyboard settingsQEMU:鼠标和键盘设置问题
【发布时间】:2015-04-14 06:15:53
【问题描述】:

我在 QEMU KVM 中运行 Windows 8,有两件事使它不太好用。

首先:鼠标很慢(它滞后于移动)并且我看到的鼠标最多。这意味着每次我移动时,首先我会看到宿主鼠标在移动,然后访客鼠标会慢慢地移到它下面。

第二:键盘不能很好地处理按键。所以假设我按“a”几秒钟。通常我希望每 x 毫秒输入一次。在 QEMU 中,一开始只写一个 a,只有当我释放 key 时,所有其他的都是一次写的。

我的配置是:

<!--
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 Windows_8
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>Windows_8</name>
  <uuid>b0208dac-b52b-1c2f-99a0-464daa8028b1</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='smx'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='abm'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='pdpe1gb'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='rdrand'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='monitor'/>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/sda'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <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:9f:53:97'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='vga' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

我尝试过所有类型的鼠标:PS/2、触摸板和 USB。

这是一个常见问题吗?有解决办法吗? 也许是一些客座司机? (不过我只发现安装 Spice 的教程太难了,如果你知道可以理解的请指点一下)

感谢任何有用的建议。

【问题讨论】:

    标签: virtualization qemu kvm


    【解决方案1】:

    我不认为它与 QEMU 严格相关,因为它可能是 QEMU 和尤其是 Windows 之间的问题。 请see this article,它帮助我在几周前解决了一个类似的问题。

    【讨论】:

    • 谢谢,注册表帮助解决了键盘问题。但是鼠标仍然滞后,我看到了宿主鼠标。至于特定于 QEMU 的问题,我认为是这样,因为在 VMWare 中鼠标运行良好(但 VMWare 似乎与主机没有很好的分离 - 它导致主机系统经常冻结几秒钟,即使我只分配了 1/4处理器和 1/2 的 RAM)。
    • 当然与您的问题无关,但根据您上面的配置,我可以建议您进行以下更改:(1)为您的磁盘使用 virtio 总线(即代替 你应该使用 );它将提高整体性能(2)我在Win10预览测试机上的配置大致相同,一切正常
    • 感谢欧根的建议。实际上尝试安装 virtio 是我想要实现的目标之一。我尝试了alt.fedoraproject.org/pub/alt/virtio-win/stablelaunchpad.net/kvm-guest-drivers-windows/+download的安装程序,但是当我将驱动程序更改为virtio时,我无法启动,所以我认为安装不成功。你能告诉我一些如何安装它的最新教程吗?
    • 您的 virtio 安装没有问题。问题是当您将总线从 IDE 切换到 virtio 时,Windows 不知道如何处理新驱动程序。我的诀窍是先安装 virtio 驱动程序,然后才将磁盘总线切换到 virtio。为此,只需创建一个额外的 1MB 磁盘并将 virtio 设置为总线类型。然后在 Windows 上安装 virtio 驱动程序。然后关闭电源,将你的磁盘总线完全切换到 virtio,你就可以开始了。最后删除它所属的虚拟磁盘:-)
    猜你喜欢
    • 1970-01-01
    • 2013-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-05
    • 1970-01-01
    • 1970-01-01
    • 2011-03-17
    相关资源
    最近更新 更多