You are not logged in.

#1 2019-01-11 10:31:08

vic-t
Member
Registered: 2016-12-11
Posts: 22

KVM: No mouse in Win10 guest

Qemu 3.1.0 with Libvirt 4.9.0

Seemingly out of nothing, 2 days ago I lost my mouse (Qemu USB Tablet) in my Win10 guest and I just can't get it back to work. The VM otherwise runs fine, I can connect via RDP and use the mouse properly, but connecting through virt-manager or virt-viewer, I only have keyboard. When hovering the mouse over the VM window, the cursor goes away. But even clicking (left and right) seems to have no impact at all.

What I tried so far:

- Several reboots of VM and VM host
- Uninstall of the latest Windows updates that were sent to my VM in the last 48 hours. NB: I have other Win10 VMs where these updates are installed and where the mouse still works fine.
- Reinstall of the Spice guest drivers (QXL and vdagent)
- Uninstall several drivers (e.g. HID and mice) within the Windows VM to force reinstall
- Remove one of the two virtual screens
- Remove not needed components and interfaces of the VM (such as a link to the CDROM)
- I ran a vimdiff on the XML files of this VM and a working one and found no significant differences
- I checked the Windows event log for irregularities, I did the same with the libvirt log and found nothing that I

This was all quite useless. After installing the compatibility version of the QXL DOD drivers, I had a partial success, though: I could use the mouse in the logon screen for windows, but once logged in, the mouse wouldn't work correctly anymore (i.e. the cursor would no longer be visible, right clicking twice in the same spot would once open a context menu in the upper left corner of the screen, the second time in the upper right corner).

As a next step, I created a new VM based on the same image. This was successful insofar that I can again use both keyboard and mouse without issues. However, I can't get the vdagent to work anymore, automatic resize seems off the table now. I tried uninstalling (and removing) drivers, a reinstall of various versions of the spice guest tools (0.141 in particular as that version works in another VM), various versions of the qxl dod video drivers, but all to no avail, automatic resize just won't work anymore.

It seems to me that reverting changes on the host (I issued 2 pacman -Syu in the last 6 days which updated the kernel from 4.19 to 4.20) wouldn't make much sense, seeing as how other VMs with more or less the exact same configuration seem to work just fine.

I'm puzzled. First, I don't understand how this could have happened at all seeing as I did not change the configuration on neither the host nor the VM. Secondly, since the original VM xml doesn't seem to be out of line in comparison to others, I don't understand how a new VM improved things. Last, I can't figure out why the guest tools seem to have no effect anymore. It seems there is no easy solution, I hope someone can point me in the right direction.

For reference:

Current qemu start line generated by virt-manager:

v    8829 70.8  6.5 9234156 8622668 ?     Sl   10:43  19:52 /usr/bin/qemu-system-x86_64 -name guest=win10,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-15-win10/master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu IvyBridge,ss=on,vmx=on,pcid=on,hypervisor=on,arat=on,tsc_adjust=on,umip=on,xsaveopt=on,pdpe1gb=on,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/win10_VARS.fd,if=pflash,format=raw,unit=1 -m 8192 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 3a6d0a14-034b-4755-9d50-f40f75896f47 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=27,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.0,addr=0x5 -device ahci,id=sata0,bus=pci.0,addr=0x6 -drive file=/var/lib/libvirt/images/Win10Prod-clone.qcow2,format=qcow2,if=none,id=drive-sata0-0-0 -device ide-hd,bus=sata0.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1 -netdev tap,fd=29,id=hostnet0 -device e1000e,netdev=hostnet0,id=net0,mac=52:54:00:48:fd:35,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 -device ich9-intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on

Previous (failing) qemu start command:

v    9138  224  0.0 17375092 105788 ?     Rl   11:14   0:22 /usr/bin/qemu-system-x86_64 -name guest=Win10_Work,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-16-Win10_Work/master-key.aes -machine pc-i440fx-2.11,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=KVM Hv -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/Win10_Work_VARS.fd,if=pflash,format=raw,unit=1 -m 16384 -mem-prealloc -mem-path /dev/hugepages/libvirt/qemu/16-Win10_Work -realtime mlock=off -smp 8,sockets=1,cores=8,threads=1 -uuid a9a627e5-1497-4a49-a180-99cc9082862c -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=27,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot menu=off,strict=on -device nec-usb-xhci,id=usb,bus=pci.0,addr=0x5 -device lsi,id=scsi0,bus=pci.0,addr=0xc -device ahci,id=sata0,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/var/lib/libvirt/images/Win10Prod-clone.qcow2,format=qcow2,if=none,id=drive-virtio-disk1,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xa,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=1,write-cache=on -drive file=/dev/sda,format=raw,if=none,id=drive-virtio-disk2,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x9,drive=drive-virtio-disk2,id=virtio-disk2,write-cache=on -netdev tap,fd=29,id=hostnet0,vhost=on,vhostfd=31 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d6:e4:9c,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input2,bus=usb.0,port=1 -spice unix,addr=/tmp/Win10_Work.sock,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 -device AC97,id=sound0,bus=pci.0,addr=0x4 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on

UPDATE: Since I started the "old" configuration again just in order to show you how the command looks like, I'm coming to the realization that the old configuration works just fine once more - including resizing! It all just works as before. I'm flabbergasted.

While I'm happy I can work again (the VM in question is my production machine), I'd really appreciate if someone can help me better understand what just happened here so that I can take a more focused approach should I, or someone else, experience this again.

Offline

#2 2019-01-12 08:41:26

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 118

Re: KVM: No mouse in Win10 guest

I use TigerVNC instead of native QEMU facilities and have no problem.

Offline

#3 2019-01-13 20:26:04

vic-t
Member
Registered: 2016-12-11
Posts: 22

Re: KVM: No mouse in Win10 guest

Kirill Bugaev wrote:

I use TigerVNC instead of native QEMU facilities and have no problem.

Since I use this VM directly from the host, this setup is about performance. I don't want lags or jitters of any kind which is why an additional layer such as VNC is not ideal. Not only is spice supposed to be faster as a protocol than VNC, it can also connect through a socket which seems to make a big difference. And as I mentioned, I have several other VMs set up the same way without any issues either, for almost a year now. Not to forget, the VM in question works fine again, too.

I still don't understand what broke it initially. Unfortunately, I lost so much time over this, I can't afford to investigate in detail at this moment. I still opened this thread in case someone else runs into the same issue; maybe my findings will help.

Offline

Board footer

Powered by FluxBB