libvirtd.service.in 1.4 KB
Newer Older
1 2 3 4 5
# NB we don't use socket activation. When libvirtd starts it will
# spawn any virtual machines registered for autostart. We want this
# to occur on every boot, regardless of whether any client connects
# to a socket. Thus socket activation doesn't have any benefit

6 7
[Unit]
Description=Virtualization daemon
8
Requires=virtlogd.socket
9
Requires=virtlockd.socket
10
Wants=systemd-machined.service
11
Before=libvirt-guests.service
12
After=network.target
E
Eric Blake 已提交
13
After=dbus.service
14
After=iscsid.service
15
After=apparmor.service
16 17
After=local-fs.target
After=remote-fs.target
18
After=systemd-logind.service
19
After=systemd-machined.service
20
Documentation=man:libvirtd(8)
21
Documentation=https://libvirt.org
22 23

[Service]
24
Type=notify
25 26 27
EnvironmentFile=-/etc/sysconfig/libvirtd
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
28
KillMode=process
29
Restart=on-failure
30 31 32 33 34
# At least 1 FD per guest, often 2 (eg qemu monitor + qemu agent).
# eg if we want to support 4096 guests, we'll typically need 8192 FDs
# If changing this, also consider virtlogd.service & virtlockd.service
# limits which are also related to number of guests
LimitNOFILE=8192
35 36 37 38 39
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
# 32k to support 4096 guests.
TasksMax=32768
40 41 42

[Install]
WantedBy=multi-user.target
43 44
Also=virtlockd.socket
Also=virtlogd.socket