blob: a73f9dfcae69424d799a6fe820329e4e7994d7f0 [file] [log] [blame]
Jakub Pavlik1af183b2015-02-22 18:25:28 +01001# Master libvirt daemon configuration file
2#
3# For further information consult http://libvirt.org/format.html
4#
5# NOTE: the tests/daemon-conf regression test script requires
6# that each "PARAMETER = VALUE" line in this file have the parameter
7# name just after a leading "#".
8
9#################################################################
10#
11# Network connectivity controls
12#
13
14# Flag listening for secure TLS connections on the public TCP/IP port.
15# NB, must pass the --listen flag to the libvirtd process for this to
16# have any effect.
17#
18# It is necessary to setup a CA and issue server certificates before
19# using this capability.
20#
21# This is enabled by default, uncomment this to disable it
22#listen_tls = 0
23
24# Listen for unencrypted TCP connections on the public TCP/IP port.
25# NB, must pass the --listen flag to the libvirtd process for this to
26# have any effect.
27#
28# Using the TCP socket requires SASL authentication by default. Only
29# SASL mechanisms which support data encryption are allowed. This is
30# DIGEST_MD5 and GSSAPI (Kerberos5)
31#
32# This is disabled by default, uncomment this to enable it.
33#listen_tcp = 1
34
35
36
37# Override the port for accepting secure TLS connections
38# This can be a port number, or service name
39#
40#tls_port = "16514"
41
42# Override the port for accepting insecure TCP connections
43# This can be a port number, or service name
44#
45#tcp_port = "16509"
46
47
48# Override the default configuration which binds to all network
49# interfaces. This can be a numeric IPv4/6 address, or hostname
50#
51#listen_addr = "192.168.0.1"
52
53
54# Flag toggling mDNS advertizement of the libvirt service.
55#
56# Alternatively can disable for all services on a host by
57# stopping the Avahi daemon
58#
59# This is disabled by default, uncomment this to enable it
60#mdns_adv = 1
61
62# Override the default mDNS advertizement name. This must be
63# unique on the immediate broadcast network.
64#
65# The default is "Virtualization Host HOSTNAME", where HOSTNAME
66# is substituted for the short hostname of the machine (without domain)
67#
68#mdns_name = "Virtualization Host Joe Demo"
69
70
71#################################################################
72#
73# UNIX socket access controls
74#
75
76# Set the UNIX domain socket group ownership. This can be used to
77# allow a 'trusted' set of users access to management capabilities
78# without becoming root.
79#
80# This is restricted to 'root' by default.
81unix_sock_group = "libvirtd"
82
83# Set the UNIX socket permissions for the R/O socket. This is used
84# for monitoring VM status only
85#
86# Default allows any user. If setting group ownership, you may want to
87# restrict this too.
88unix_sock_ro_perms = "0777"
89
90# Set the UNIX socket permissions for the R/W socket. This is used
91# for full management of VMs
92#
93# Default allows only root. If PolicyKit is enabled on the socket,
94# the default will change to allow everyone (eg, 0777)
95#
96# If not using PolicyKit and setting group ownership for access
97# control, then you may want to relax this too.
98unix_sock_rw_perms = "0770"
99
100# Set the name of the directory in which sockets will be found/created.
101#unix_sock_dir = "/var/run/libvirt"
102
103#################################################################
104#
105# Authentication.
106#
107# - none: do not perform auth checks. If you can connect to the
108# socket you are allowed. This is suitable if there are
109# restrictions on connecting to the socket (eg, UNIX
110# socket permissions), or if there is a lower layer in
111# the network providing auth (eg, TLS/x509 certificates)
112#
113# - sasl: use SASL infrastructure. The actual auth scheme is then
114# controlled from /etc/sasl2/libvirt.conf. For the TCP
115# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
116# For non-TCP or TLS sockets, any scheme is allowed.
117#
118# - polkit: use PolicyKit to authenticate. This is only suitable
119# for use on the UNIX sockets. The default policy will
120# require a user to supply their own password to gain
121# full read/write access (aka sudo like), while anyone
122# is allowed read/only access.
123#
124# Set an authentication scheme for UNIX read-only sockets
125# By default socket permissions allow anyone to connect
126#
127# To restrict monitoring of domains you may wish to enable
128# an authentication mechanism here
129auth_unix_ro = "none"
130
131# Set an authentication scheme for UNIX read-write sockets
132# By default socket permissions only allow root. If PolicyKit
133# support was compiled into libvirt, the default will be to
134# use 'polkit' auth.
135#
136# If the unix_sock_rw_perms are changed you may wish to enable
137# an authentication mechanism here
138auth_unix_rw = "none"
139
140# Change the authentication scheme for TCP sockets.
141#
142# If you don't enable SASL, then all TCP traffic is cleartext.
143# Don't do this outside of a dev/test scenario. For real world
144# use, always enable SASL and use the GSSAPI or DIGEST-MD5
145# mechanism in /etc/sasl2/libvirt.conf
146#auth_tcp = "sasl"
147
148# Change the authentication scheme for TLS sockets.
149#
150# TLS sockets already have encryption provided by the TLS
151# layer, and limited authentication is done by certificates
152#
153# It is possible to make use of any SASL authentication
154# mechanism as well, by using 'sasl' for this option
155#auth_tls = "none"
156
157
158# Change the API access control scheme
159#
160# By default an authenticated user is allowed access
161# to all APIs. Access drivers can place restrictions
162# on this. By default the 'nop' driver is enabled,
163# meaning no access control checks are done once a
164# client has authenticated with libvirtd
165#
166#access_drivers = [ "polkit" ]
167
168#################################################################
169#
170# TLS x509 certificate configuration
171#
172
173
174# Override the default server key file path
175#
176#key_file = "/etc/pki/libvirt/private/serverkey.pem"
177
178# Override the default server certificate file path
179#
180#cert_file = "/etc/pki/libvirt/servercert.pem"
181
182# Override the default CA certificate path
183#
184#ca_file = "/etc/pki/CA/cacert.pem"
185
186# Specify a certificate revocation list.
187#
188# Defaults to not using a CRL, uncomment to enable it
189#crl_file = "/etc/pki/CA/crl.pem"
190
191
192
193#################################################################
194#
195# Authorization controls
196#
197
198
199# Flag to disable verification of our own server certificates
200#
201# When libvirtd starts it performs some sanity checks against
202# its own certificates.
203#
204# Default is to always run sanity checks. Uncommenting this
205# will disable sanity checks which is not a good idea
206#tls_no_sanity_certificate = 1
207
208# Flag to disable verification of client certificates
209#
210# Client certificate verification is the primary authentication mechanism.
211# Any client which does not present a certificate signed by the CA
212# will be rejected.
213#
214# Default is to always verify. Uncommenting this will disable
215# verification - make sure an IP whitelist is set
216#tls_no_verify_certificate = 1
217
218
219# A whitelist of allowed x509 Distinguished Names
220# This list may contain wildcards such as
221#
222# "C=GB,ST=London,L=London,O=Red Hat,CN=*"
223#
224# See the POSIX fnmatch function for the format of the wildcards.
225#
226# NB If this is an empty list, no client can connect, so comment out
227# entirely rather than using empty list to disable these checks
228#
229# By default, no DN's are checked
230#tls_allowed_dn_list = ["DN1", "DN2"]
231
232
233# A whitelist of allowed SASL usernames. The format for usernames
234# depends on the SASL authentication mechanism. Kerberos usernames
235# look like username@REALM
236#
237# This list may contain wildcards such as
238#
239# "*@EXAMPLE.COM"
240#
241# See the POSIX fnmatch function for the format of the wildcards.
242#
243# NB If this is an empty list, no client can connect, so comment out
244# entirely rather than using empty list to disable these checks
245#
246# By default, no Username's are checked
247#sasl_allowed_username_list = ["joe@EXAMPLE.COM", "fred@EXAMPLE.COM" ]
248
249
250
251#################################################################
252#
253# Processing controls
254#
255
256# The maximum number of concurrent client connections to allow
257# over all sockets combined.
258#max_clients = 20
259
260# The maximum length of queue of connections waiting to be
261# accepted by the daemon. Note, that some protocols supporting
262# retransmission may obey this so that a later reattempt at
263# connection succeeds.
264#max_queued_clients = 1000
265
266
267# The minimum limit sets the number of workers to start up
268# initially. If the number of active clients exceeds this,
269# then more threads are spawned, up to max_workers limit.
270# Typically you'd want max_workers to equal maximum number
271# of clients allowed
272#min_workers = 5
273#max_workers = 20
274
275
276# The number of priority workers. If all workers from above
277# pool are stuck, some calls marked as high priority
278# (notably domainDestroy) can be executed in this pool.
279#prio_workers = 5
280
281# Total global limit on concurrent RPC calls. Should be
282# at least as large as max_workers. Beyond this, RPC requests
283# will be read into memory and queued. This directly impacts
284# memory usage, currently each request requires 256 KB of
285# memory. So by default up to 5 MB of memory is used
286#
287# XXX this isn't actually enforced yet, only the per-client
288# limit is used so far
289#max_requests = 20
290
291# Limit on concurrent requests from a single client
292# connection. To avoid one client monopolizing the server
293# this should be a small fraction of the global max_requests
294# and max_workers parameter
295#max_client_requests = 5
296
297#################################################################
298#
299# Logging controls
300#
301
302# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
303# basically 1 will log everything possible
304#log_level = 3
305
306# Logging filters:
307# A filter allows to select a different logging level for a given category
308# of logs
309# The format for a filter is one of:
310# x:name
311# x:+name
312# where name is a string which is matched against source file name,
313# e.g., "remote", "qemu", or "util/json", the optional "+" prefix
314# tells libvirt to log stack trace for each message matching name,
315# and x is the minimal level where matching messages should be logged:
316# 1: DEBUG
317# 2: INFO
318# 3: WARNING
319# 4: ERROR
320#
321# Multiple filters can be defined in a single @filters, they just need to be
322# separated by spaces.
323#
324# e.g. to only get warning or errors from the remote layer and only errors
325# from the event layer:
326#log_filters="3:remote 4:event"
327
328# Logging outputs:
329# An output is one of the places to save logging information
330# The format for an output can be:
331# x:stderr
332# output goes to stderr
333# x:syslog:name
334# use syslog for the output and use the given name as the ident
335# x:file:file_path
336# output to a file, with the given filepath
337# In all case the x prefix is the minimal level, acting as a filter
338# 1: DEBUG
339# 2: INFO
340# 3: WARNING
341# 4: ERROR
342#
343# Multiple outputs can be defined, they just need to be separated by spaces.
344# e.g. to log all warnings and errors to syslog under the libvirtd ident:
345#log_outputs="3:syslog:libvirtd"
346#
347
348# Log debug buffer size: default 64
349# The daemon keeps an internal debug log buffer which will be dumped in case
350# of crash or upon receiving a SIGUSR2 signal. This setting allows to override
351# the default buffer size in kilobytes.
352# If value is 0 or less the debug log buffer is deactivated
353#log_buffer_size = 64
354
355
356##################################################################
357#
358# Auditing
359#
360# This setting allows usage of the auditing subsystem to be altered:
361#
362# audit_level == 0 -> disable all auditing
363# audit_level == 1 -> enable auditing, only if enabled on host (default)
364# audit_level == 2 -> enable auditing, and exit if disabled on host
365#
366#audit_level = 2
367#
368# If set to 1, then audit messages will also be sent
369# via libvirt logging infrastructure. Defaults to 0
370#
371#audit_logging = 1
372
373###################################################################
374# UUID of the host:
375# Provide the UUID of the host here in case the command
376# 'dmidecode -s system-uuid' does not provide a valid uuid. In case
377# 'dmidecode' does not provide a valid UUID and none is provided here, a
378# temporary UUID will be generated.
379# Keep the format of the example UUID below. UUID must not have all digits
380# be the same.
381
382# NB This default all-zeros UUID will not work. Replace
383# it with the output of the 'uuidgen' command and then
384# uncomment this entry
385#host_uuid = "00000000-0000-0000-0000-000000000000"
386
387###################################################################
388# Keepalive protocol:
389# This allows libvirtd to detect broken client connections or even
390# dead clients. A keepalive message is sent to a client after
391# keepalive_interval seconds of inactivity to check if the client is
392# still responding; keepalive_count is a maximum number of keepalive
393# messages that are allowed to be sent to the client without getting
394# any response before the connection is considered broken. In other
395# words, the connection is automatically closed approximately after
396# keepalive_interval * (keepalive_count + 1) seconds since the last
397# message received from the client. If keepalive_interval is set to
398# -1, libvirtd will never send keepalive requests; however clients
399# can still send them and the daemon will send responses. When
400# keepalive_count is set to 0, connections will be automatically
401# closed after keepalive_interval seconds of inactivity without
402# sending any keepalive messages.
403#
404#keepalive_interval = 5
405#keepalive_count = 5
406#
407# If set to 1, libvirtd will refuse to talk to clients that do not
408# support keepalive protocol. Defaults to 0.
409#
410#keepalive_required = 1