Bug 876237 - Enable spice-vdagentd by default in a VM
Summary: Enable spice-vdagentd by default in a VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-13 15:55 UTC by Alexander Larsson
Modified: 2012-11-23 07:39 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-23 07:39:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alexander Larsson 2012-11-13 15:55:51 UTC
The spice-vdagentd service needs to be started by default if running inside a VM, otherwise spice will not work as well as it could.

This used to happen by default in F17 i belive, but seems to not happen in F18 (nightly from yesterday).

Comment 1 Hans de Goede 2012-11-14 08:47:27 UTC
This is caused by the move to a systemd service + the new way services get enabled/disabled by default, which is controlled through a distro-wide policy file now, which AFAIK is part of systemd -> moving to systemd.

systemd maintainers, note that the new spice-vdagent systemd service file (and friends) uses hardware activation, so it can safely be enabled by default without impacting non spice vms.

Comment 2 Lennart Poettering 2012-11-19 22:40:05 UTC
What's the precise service name I shell add to the default-to-enable list?

Comment 3 Hans de Goede 2012-11-20 13:17:11 UTC
(In reply to comment #2)
> What's the precise service name I shell add to the default-to-enable list?

The service file is: /lib/systemd/system/spice-vdagentd.service

Thanks,

Hans

Comment 4 Cole Robinson 2012-11-20 15:58:39 UTC
Doesn't this udev rule handle things?

$ cat /lib/udev/rules.d/70-spice-vdagentd.rules 
ACTION=="add", SUBSYSTEM=="virtio-ports", ENV{DEVLINKS}=="/dev/virtio-ports/com.redhat.spice.0", ENV{SYSTEMD_WANTS}="spice-vdagentd.target"

Comment 5 Daniel Berrangé 2012-11-20 16:09:23 UTC
For the QEMU guest agent the rule was slightly different to that:

  SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
    TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"

Comment 6 Hans de Goede 2012-11-21 09:15:30 UTC
(In reply to comment #4)
> Doesn't this udev rule handle things?
> 
> $ cat /lib/udev/rules.d/70-spice-vdagentd.rules 
> ACTION=="add", SUBSYSTEM=="virtio-ports",
> ENV{DEVLINKS}=="/dev/virtio-ports/com.redhat.spice.0",
> ENV{SYSTEMD_WANTS}="spice-vdagentd.target"

No, using hardware activation still requires the service to be explicitly enabled, it just means that even when enabled the service won't start if the hardware is not there. This was done (AFAIK) so that people who have ie bluetooth in their laptop, but never use it and don't want bluez to be running can disable it, etc. See:
http://0pointer.de/blog/projects/socket-activation2.html

And then the last line of the "Hardware Activation in Detail" paragraph.

Comment 7 Hans de Goede 2012-11-21 09:17:04 UTC
(In reply to comment #5)
> For the QEMU guest agent the rule was slightly different to that:
> 
>   SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
>     TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"

Note that if you want to qemu guest agent to be started by default when installed, it needs to be added to 
systemd's  default-to-enable list too, see my previous comment for rationale.

Comment 8 Fedora Update System 2012-11-21 19:53:53 UTC
systemd-195-9.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-195-9.fc18

Comment 9 Fedora Update System 2012-11-21 20:53:36 UTC
Package systemd-195-9.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-195-9.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18708/systemd-195-9.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-11-23 07:39:12 UTC
systemd-195-8.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.