[Spice-devel] Vdagent not working on xen linux hvm DomUs

Fabio Fantoni fabio.fantoni at m2r.biz
Tue Oct 29 13:02:29 CET 2013


Il 29/10/2013 10:40, Alon Levy ha scritto:
> On 10/29/2013 11:16 AM, Fabio Fantoni wrote:
>> Il 18/10/2013 15:58, Fabio Fantoni ha scritto:
>>>> On 10/14/2013 05:52 PM, Fabio Fantoni wrote:
>>>>> /  I have added vdagent support on libxl for hvm domUs using
>>>> upstream qemu.
>>>> />/  On windows domUs it is working without problems found in over
>>>> one year
>>>> />/  that I'm using it.
>>>> />/
>>>> />/  On linux domUs is not working, it seems to be a problem on the
>>>> kernel
>>>> />/  side and/or linux vdagent services.
>>>> />/  The domU parameters are the same on both linux and windows domUs
>>>> and
>>>> />/  below you can be find some details on dom0 if needed:
>>>> />/  http://lists.xen.org/archives/html/xen-devel/2013-10/msg01111.html
>>>> />/  On my latest test with Fedora19 domU:
>>>> />/  - on install one month ago there was this log:
>>>> />/  /var/log/spice-vdagent.log (nomore now)
>>>> />>/  spice-vdagent[1398]: err: Missing virtio device
>>>> />>/  '/dev/virtio-ports/com.redhat.spice.0': No such file or directory
>>>> /
>>>> This seems to be the error. You are missing the virtio device. Does the
>>>> domU have the virtio-serial module loaded (or compiled in)? does the vm
>>>> have the appropriate corresponding options in xen for creating that
>>>> virtio pci device and the virtio serial port on top of it, with that
>>>> name?
>>> Thanks for reply.
>>> I use the default kernel already installed on Fedora19 (plus software
>>> update).
>>> I did a grep on kernel config about VIRTIO and this is the result:
>>>> less /boot/config-3.11.4-201.fc19.x86_64 | grep VIRTIO
>>>> CONFIG_NET_9P_VIRTIO=m
>>>> CONFIG_VIRTIO_BLK=m
>>>> CONFIG_SCSI_VIRTIO=m
>>>> CONFIG_VIRTIO_NET=m
>>>> CONFIG_VIRTIO_CONSOLE=y
>>>> CONFIG_HW_RANDOM_VIRTIO=m
>>>> CONFIG_VIRTIO=y
>>>> CONFIG_VIRTIO_PCI=y
>>>> CONFIG_VIRTIO_BALLOON=m
>>>> CONFIG_VIRTIO_MMIO=m
>>>> # CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
>>>>> /  - spice-vdagent package is installed
>>>> />/  - /dev/virtio-ports is missed
>>>> />/  - lspci shows virtio console with virtio-pci driver in use
>>>> /virtio console is something else. virtio-serial replaced it iirc,
>>>> and is
>>>> backward compatible, but you don't need a console. I'm not familiar with
>>>> Xen so I can't help in this.
>>>>
>>>> But this is your problem - don't bother checking any thing else until
>>>> you have this device node present in the guest.
>>> I used these qemu parameters in xen patch for vdagent support:
>>> -device virtio-serial
>>> -chardev spicevmc,id=vdagent,name=vdagent
>>> -device virtserialport,chardev=vdagent,name=com.redhat.spice.0
>>>
>>> I also tried to use these qemu parameters instead with same result:
>>> -device virtio-serial-pci,id=virtio-serial0
>>> -device
>>> virtserialport,bus=virtio-serial0.0,chardev=spicechannel0,name=com.redhat.spice.0
>>>
>>> -chardev spicevmc,id=spicechannel0,name=vdagent
>>>
>>> Since with same parameters windows guests it works, it seems there
>>> would be some strange behaviours on guest's linux kernel.
>>> I took a quick look at code but to no avail.
>>>
>>> If you need more details and/or tests tell me and I'll post them.
>>>
>> Ping
> I don't have any clever ideas - you seem to be creating the device
> correctly, like you say it's a kernel problem, try adding debug prints etc.

Thanks for reply.
I tried to add debug=20 on vdagent chardev but I not found any 
additional lines on qemu logs.
I didn't found any other debug information on Fedora guest logs.
I added debug on kernel command line of grub.cfg and setted 
kernel.printk = 7 7 1 7.
Can you tell me how to have additional debug informations please?
Are there some trace-events for vdagent on qemu?
Thanks for any reply.

>>>>> /
>>>> />/  Tried to check service:
>>>> />/
>>>> />/  # systemctl status spice-vdagentd
>>>> />/  spice-vdagentd.service - Agent daemon for Spice guests
>>>> />/     Loaded: loaded (/usr/lib/systemd/system/spice-vdagentd.service;
>>>> />/  enabled)
>>>> />/     Active: inactive (dead)
>>>> />/
>>>> />/  # systemctl start spice-vdagentd
>>>> />/  # systemctl status spice-vdagentd
>>>> />/  spice-vdagentd.service - Agent daemon for Spice guests
>>>> />/     Loaded: loaded (/usr/lib/systemd/system/spice-vdagentd.service;
>>>> />/  enabled)
>>>> />/     Active: active (running) since lun 2013-10-14 16:32:52 CEST;
>>>> 6s ago
>>>> />/    Process: 1723 ExecStart=/usr/sbin/spice-vdagentd
>>>> />/  $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS)
>>>> />/    Process: 1720 ExecStartPre=/bin/rm -f
>>>> />/  /var/run/spice-vdagentd/spice-vdagent-sock (code=exited,
>>>> />/  status=0/SUCCESS)
>>>> />/   Main PID: 1725 (spice-vdagentd)
>>>> />/     CGroup: name=systemd:/system/spice-vdagentd.service
>>>> />/             ââ1725 /usr/sbin/spice-vdagentd
>>>> />/
>>>> />/  On /var/log/messages:
>>>> />/  ...
>>>> />>/  Oct 14 16:32:52 localhost systemd[1]: Starting Agent daemon for
>>>> Spice
>>>> />>/  guests...
>>>> />>/  Oct 14 16:32:52 localhost systemd[1]: PID file
>>>> />>/  /var/run/spice-vdagentd/spice-vdagentd.pid not readable (yet?)
>>>> after
>>>> />>/  start.
>>>> />>/  Oct 14 16:32:52 localhost systemd[1]: Started Agent daemon for
>>>> Spice
>>>> />>/  guests.
>>>> />/
>>>> />/  But vdagent is still not working.
>>>> />/
>>>> />/
>>>> />/  If you need more details and test tell me and I'll post them.
>>>> />/
>>>> />/  Thanks for any reply./
>>



More information about the Spice-devel mailing list