Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] spice-vdagent driving me nuts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1174

PostPosted: Wed May 31, 2017 8:03 pm    Post subject: [Solved] spice-vdagent driving me nuts Reply with quote

Hi,

I run qemu straight-up with KVM, no libvirt.

I have always been able to run a Win7 system with Spice with no problems. However, once we upgraded to Windows 10, my mouse performance became abominable. It is absolutely unusable... it sticks in place, then jumps clear across the screen, or it will move a few inches, then jump back to where it came from and start all over again... It is impossibly frustrating.

I took this to mean that they hadn't gotten support for Win10 down right... so I mapped 2nd mouse directly to the qemu Windows 10 instance, and it worked a lot better. Still sticky, but much better.... but still driving me a little nuts. I figured it would be fixed in a few months... That was a year ago...

So, Once my coworker (who uses fedora and libvirt) showed me that his system worked fine using Qemu/kvm/spicy I was chagrinned. I decided to give it another shot. I asked him to do a 'ps -ef |grep qemu' and give me the command that libvirt was running on his behalf -- with all the switches.

I still cannot get this thing to work. I just went on another 4 hour stint of aggressively banging my head against this wall, and I still have nothing to show for it. I've changed my startup script a million times based upon google-research and his ps listing for his qemu executable.

Here is what i have now:
My Startup Script
Code:

#/bin/bash
exec qemu-system-x86_64 \
        -enable-kvm -cpu host \
        -vga qxl \
        -global qxl-vga.vram_size_mb=128 \
        -global qxl-vga.ram_size_mb=128 \
        -global qxl-vga.vgamem_mb=128 \
        -smp cpus=4,cores=4,threads=1,sockets=1 \
        -soundhw hda \
        -drive file=/dev/sdc1,if=virtio,format=raw \
        -usb \
        -usbdevice host:04b9:0300 \
        -usbdevice host:04f2:0981 \
        -net tap,ifname=tap0,script=no,downscript=no \
        -net nic,model=virtio -m 16G \
        -monitor stdio \
        -usbdevice tablet \
        -device virtio-serial \
        -spice port=5930,disable-ticketing \
        -chardev spicevmc,id=charchannel0,name=vdagent \
        -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \
        -name MY-WIN \
        -device qxl "$@"


/etc/conf.d/spice-vdagent:
Code:
# The virtual communication port provided by the hypervisor/vm
# Default: /dev/virtio-ports/com.redhat.spice.0
PORT="/dev/virtio-ports/com.redhat.spice.0"

# Userspace Input Device
# Default: /dev/uinput or /dev/input/uinput
DEVICE="/dev/uinput"

# Extra arguments for spice-vdagentd
# Default: none
#SPICE_VDAGENT_ARGS=""


emerge -pv qemu:
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-emulation/qemu-2.8.1-r2::gentoo  USE="aio alsa bluetooth bzip2 caps curl fdt filecaps jpeg ncurses nls opengl pin-upstream-blobs png pulseaudio seccomp spice usb vhost-net xattr -accessibility -debug (-glusterfs) -gnutls -gtk -gtk2 -infiniband -iscsi -lzo -nfs -numa -python -rbd -sasl -sdl -sdl2 (-selinux) -smartcard -snappy -ssh -static -static-user -systemtap -tci {-test} -usbredir -vde -virgl -virtfs -vnc -vte -xen -xfs" LINGUAS="-bg -de_DE -fr_FR -hu -it -tr -zh_CN" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64 -aarch64 -alpha -arm -cris -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -or32 -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="i386 x86_64 -aarch64 -alpha -arm -armeb -cris -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -or32 -ppc -ppc64 -ppc64abi32 -ppc64le -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx" 0 KiB


emerge -pv spice-vdagent:
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-emulation/spice-vdagent-0.17.0::gentoo  USE="consolekit (-selinux) -systemd" 0 KiB


My Co-workers working config (I set each switch to its own line for readability):
Code:
/usr/bin/qemu-system-x86_64 -machine accel=kvm
-name guest=win10pro_64-bit,debug-threads=on
-S
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-5-win10pro_64-bit/master-key.aes
-machine pc-i440fx-2.7,accel=kvm,usb=off,vmport=off
-cpu Haswell-noTSX,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff
-m 4096
-realtime mlock=off
-smp 8,sockets=8,cores=1,threads=1
-uuid c537bb5d-29a0-481d-9a05-4cbf217a417c
-no-user-config
-nodefaults
-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-5-win10pro_64-bit/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control
-rtc base=localtime,driftfix=slew
-global kvm-pit.lost_tick_policy=discard
-no-hpet
-no-shutdown
-global PIIX4_PM.disable_s3=1
-global PIIX4_PM.disable_s4=1
-boot strict=on
-device nec-usb-xhci,id=usb,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/home/standuser/.virtualmachines/windows10pro-x86_64.qcow2,format=qcow2,if=none,id=drive-ide0-0-0
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=28,id=hostnet0
-device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:60:37:da,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=input0,bus=usb.0,port=1
-spice port=5901,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on
-k en-us -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 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
-msg timestamp=on


My qemu starts without any complaints whatsoever. But when I try to start spice-vdagent:
Code:
/etc/init.d/spice-vdagent start
 * Checking for required modules and devices ...
 * Required virtio port does not exist. Make sure you
 * started the virtual machine with appropriate parameters.                                                     [ !! ]
 * ERROR: spice-vdagent failed to start


I try to get a little more output:
Code:
spice-vdagent -d -x
spice-vdagent[18236]: Cannot access vdagent virtio channel /dev/virtio-ports/com.redhat.spice.0


I'm not seeing anything else in dmesg or in my /var/log/messages of help.

It doesn't matter if I start my qemu first, or try to start spice-vdagent... it fails the same. The /dev/virtio-ports/com.redhat.spice.0 file is never created.

Of course, I'm not 100% certain that having a working vdagent will solve my problem, but I won't know for sure until I get it working right. I'm hoping it will..

Any help is greatly appreciated. Thank you.

G
_________________
To look without without looking within is like looking without without looking at all.


Last edited by grooveman on Mon Jun 19, 2017 6:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1174

PostPosted: Mon Jun 05, 2017 1:11 pm    Post subject: Reply with quote

Bump.
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1174

PostPosted: Thu Jun 15, 2017 5:32 pm    Post subject: Reply with quote

So I guess nobody does this? Everyone using libvirt?
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1174

PostPosted: Mon Jun 19, 2017 6:54 pm    Post subject: Reply with quote

OK... I got this...

Not sure what the silver bullet was... but boy, what a difference.

Final Config:
Code:
        -enable-kvm -cpu host \
        -monitor stdio \
        -name MYWIN10 \
        -vga qxl \
        -drive file=/dev/sdc1,if=virtio,format=raw \
        -net nic,model=virtio \
        -net tap,ifname=tap0,script=no,downscript=no \
        -usbdevice tablet \
        -m 16G \
        -global qxl-vga.vram_size_mb=128 \
        -global qxl-vga.ram_size_mb=128 \
        -global qxl-vga.vgamem_mb=128 \
        -smp cpus=4,cores=4,threads=1,sockets=1 \
        -soundhw hda \
        -usb \
        -usbdevice host:0579:0300 \
        -device virtio-serial-pci \
        -spice port=5930,disable-ticketing \
        -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
        -chardev spicevmc,id=spicechannel0,name=vdagent \
        -device qxl "$@"


I think my in my previous config, my tablet settings were not taking... This is because putting a # at the beginning of my config line seemed to remove everything but the "\" character at the end (even though my vim filters showed it was commented). I also discovered that they now have spice tools for windows... I installed those. Finally, I caught that I was using 'charchannel' on one line, and 'spicechannel' on another, when they should have been the same.

Performance is now very good. I can even watch youtube videos (if I don't go full screen).
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum