libvirtd.conf.in 16.4 KB
Newer Older
1 2 3
# Master libvirt daemon configuration file
#

4
@CUT_ENABLE_IP@
5 6
#################################################################
#
7
# Network connectivity controls
8 9
#

10
# Flag listening for secure TLS connections on the public TCP/IP port.
11
# NB, must pass the --listen flag to the @DAEMON_NAME@ process for this to
12 13
# have any effect.
#
14 15 16
# This setting is not required or honoured if using systemd socket
# activation.
#
17
# It is necessary to setup a CA and issue server certificates before
18 19 20
# using this capability.
#
# This is enabled by default, uncomment this to disable it
21
#listen_tls = 0
22 23

# Listen for unencrypted TCP connections on the public TCP/IP port.
24
# NB, must pass the --listen flag to the @DAEMON_NAME@ process for this to
25 26
# have any effect.
#
27 28 29
# This setting is not required or honoured if using systemd socket
# activation.
#
30 31 32
# Using the TCP socket requires SASL authentication by default. Only
# SASL mechanisms which support data encryption are allowed. This is
# DIGEST_MD5 and GSSAPI (Kerberos5)
33 34
#
# This is disabled by default, uncomment this to enable it.
35
#listen_tcp = 1
36 37 38 39 40 41



# Override the port for accepting secure TLS connections
# This can be a port number, or service name
#
42 43 44
# This setting is not required or honoured if using systemd socket
# activation with systemd version >= 227
#
45
#tls_port = "16514"
46 47 48

# Override the port for accepting insecure TCP connections
# This can be a port number, or service name
49
#
50 51 52
# This setting is not required or honoured if using systemd socket
# activation with systemd version >= 227
#
53
#tcp_port = "16509"
54 55


56 57 58
# Override the default configuration which binds to all network
# interfaces. This can be a numeric IPv4/6 address, or hostname
#
59 60 61
# This setting is not required or honoured if using systemd socket
# activation.
#
62
# If the @DAEMON_NAME@ service is started in parallel with network
63 64 65
# startup (e.g. with systemd), binding to addresses other than
# the wildcards (0.0.0.0/::) might not be available yet.
#
66
#listen_addr = "192.168.0.1"
67

68

69
@END@
70 71 72 73
#################################################################
#
# UNIX socket access controls
#
74 75 76 77

# Set the UNIX domain socket group ownership. This can be used to
# allow a 'trusted' set of users access to management capabilities
# without becoming root.
78
#
79 80 81
# This setting is not required or honoured if using systemd socket
# activation.
#
82 83
# This is restricted to 'root' by default.
#unix_sock_group = "libvirt"
84 85 86 87

# Set the UNIX socket permissions for the R/O socket. This is used
# for monitoring VM status only
#
88 89 90
# This setting is not required or honoured if using systemd socket
# activation.
#
E
Eric Blake 已提交
91 92
# Default allows any user. If setting group ownership, you may want to
# restrict this too.
93
#unix_sock_ro_perms = "0777"
94 95 96 97

# Set the UNIX socket permissions for the R/W socket. This is used
# for full management of VMs
#
98 99 100
# This setting is not required or honoured if using systemd socket
# activation.
#
101 102 103 104
# Default allows only root. If PolicyKit is enabled on the socket,
# the default will change to allow everyone (eg, 0777)
#
# If not using PolicyKit and setting group ownership for access
E
Eric Blake 已提交
105
# control, then you may want to relax this too.
106
#unix_sock_rw_perms = "0770"
107

108 109
# Set the UNIX socket permissions for the admin interface socket.
#
110 111 112
# This setting is not required or honoured if using systemd socket
# activation.
#
113 114 115 116
# Default allows only owner (root), do not change it unless you are
# sure to whom you are exposing the access to.
#unix_sock_admin_perms = "0700"

117
# Set the name of the directory in which sockets will be found/created.
118 119 120 121
#
# This setting is not required or honoured if using systemd socket
# activation with systemd version >= 227
#
122
#unix_sock_dir = "@runstatedir@/libvirt"
123

124 125


126
#################################################################
127
#
128
# Authentication.
129
#
130 131 132 133 134 135 136
#  - none: do not perform auth checks. If you can connect to the
#          socket you are allowed. This is suitable if there are
#          restrictions on connecting to the socket (eg, UNIX
#          socket permissions), or if there is a lower layer in
#          the network providing auth (eg, TLS/x509 certificates)
#
#  - sasl: use SASL infrastructure. The actual auth scheme is then
137
#          controlled from @sysconfdir@/sasl2/libvirt.conf. For the TCP
138
#          socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
E
Eric Blake 已提交
139
#          For non-TCP or TLS sockets, any scheme is allowed.
140
#
141 142 143 144 145 146
#  - polkit: use PolicyKit to authenticate. This is only suitable
#            for use on the UNIX sockets. The default policy will
#            require a user to supply their own password to gain
#            full read/write access (aka sudo like), while anyone
#            is allowed read/only access.
#
147 148 149 150 151 152 153 154
# Set an authentication scheme for UNIX read-only sockets
# By default socket permissions allow anyone to connect
#
# To restrict monitoring of domains you may wish to enable
# an authentication mechanism here
#auth_unix_ro = "none"

# Set an authentication scheme for UNIX read-write sockets
155 156 157
# By default socket permissions only allow root. If PolicyKit
# support was compiled into libvirt, the default will be to
# use 'polkit' auth.
158 159 160 161
#
# If the unix_sock_rw_perms are changed you may wish to enable
# an authentication mechanism here
#auth_unix_rw = "none"
162
@CUT_ENABLE_IP@
163 164 165 166 167 168

# Change the authentication scheme for TCP sockets.
#
# If you don't enable SASL, then all TCP traffic is cleartext.
# Don't do this outside of a dev/test scenario. For real world
# use, always enable SASL and use the GSSAPI or DIGEST-MD5
169
# mechanism in @sysconfdir@/sasl2/libvirt.conf
170 171 172 173 174 175 176 177 178 179
#auth_tcp = "sasl"

# Change the authentication scheme for TLS sockets.
#
# TLS sockets already have encryption provided by the TLS
# layer, and limited authentication is done by certificates
#
# It is possible to make use of any SASL authentication
# mechanism as well, by using 'sasl' for this option
#auth_tls = "none"
180
@END@
181 182


183 184 185 186 187 188
# Change the API access control scheme
#
# By default an authenticated user is allowed access
# to all APIs. Access drivers can place restrictions
# on this. By default the 'nop' driver is enabled,
# meaning no access control checks are done once a
189
# client has authenticated with @DAEMON_NAME@
190
#
191
#access_drivers = [ "polkit" ]
192

193
@CUT_ENABLE_IP@
194
#################################################################
195
#
196
# TLS x509 certificate configuration
197
#
198

199 200 201
# Use of TLS requires that x509 certificates be issued. The default locations
# for the certificate files is as follows:
#
202 203 204
#   @sysconfdir@/pki/CA/cacert.pem - The CA master certificate
#   @sysconfdir@/pki/libvirt/servercert.pem - The server certificate signed by cacert.pem
#   @sysconfdir@/pki/libvirt/private/serverkey.pem - The server private key
205 206 207 208 209 210 211
#
# It is possible to override the default locations by altering the 'key_file',
# 'cert_file', and 'ca_file' values and uncommenting them below.
#
# NB, overriding the default of one location requires uncommenting and
# possibly additionally overriding the other settings.
#
212 213 214

# Override the default server key file path
#
215
#key_file = "@sysconfdir@/pki/libvirt/private/serverkey.pem"
216 217 218

# Override the default server certificate file path
#
219
#cert_file = "@sysconfdir@/pki/libvirt/servercert.pem"
220 221 222

# Override the default CA certificate path
#
223
#ca_file = "@sysconfdir@/pki/CA/cacert.pem"
224 225

# Specify a certificate revocation list.
226
#
227
# Defaults to not using a CRL, uncomment to enable it
228
#crl_file = "@sysconfdir@/pki/CA/crl.pem"
229 230 231



232
@END@
233 234 235 236 237 238
#################################################################
#
# Authorization controls
#


239
@CUT_ENABLE_IP@
240 241
# Flag to disable verification of our own server certificates
#
242
# When @DAEMON_NAME@ starts it performs some sanity checks against
243 244
# its own certificates.
#
245 246
# Default is to always run sanity checks. Uncommenting this
# will disable sanity checks which is not a good idea
247 248
#tls_no_sanity_certificate = 1

249 250 251 252 253 254 255
# Flag to disable verification of client certificates
#
# Client certificate verification is the primary authentication mechanism.
# Any client which does not present a certificate signed by the CA
# will be rejected.
#
# Default is to always verify. Uncommenting this will disable
256
# verification.
257 258
#tls_no_verify_certificate = 1

259

260
# An access control list of allowed x509 Distinguished Names
261
# This list may contain wildcards such as
262 263 264
#
#    "C=GB,ST=London,L=London,O=Red Hat,CN=*"
#
265 266 267
# See the g_pattern_match function for the format of the wildcards:
#
# https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html
268 269 270 271 272
#
# NB If this is an empty list, no client can connect, so comment out
# entirely rather than using empty list to disable these checks
#
# By default, no DN's are checked
273
#tls_allowed_dn_list = ["DN1", "DN2"]
274 275


276 277 278 279 280 281 282 283 284
# Override the compile time default TLS priority string. The
# default is usually "NORMAL" unless overridden at build time.
# Only set this is it is desired for libvirt to deviate from
# the global default settings.
#
#tls_priority="NORMAL"


@END@
285
# An access control list of allowed SASL usernames. The format for username
286 287
# depends on the SASL authentication mechanism. Kerberos usernames
# look like username@REALM
288
#
289 290 291 292
# This list may contain wildcards such as
#
#    "*@EXAMPLE.COM"
#
293 294 295
# See the g_pattern_match function for the format of the wildcards.
#
# https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html
296 297 298 299
#
# NB If this is an empty list, no client can connect, so comment out
# entirely rather than using empty list to disable these checks
#
300 301
# By default, no Username's are checked
#sasl_allowed_username_list = ["joe@EXAMPLE.COM", "fred@EXAMPLE.COM" ]
302 303


304 305 306 307 308 309 310
#################################################################
#
# Processing controls
#

# The maximum number of concurrent client connections to allow
# over all sockets combined.
311
#max_clients = 5000
312

M
Michal Privoznik 已提交
313 314 315 316 317 318
# The maximum length of queue of connections waiting to be
# accepted by the daemon. Note, that some protocols supporting
# retransmission may obey this so that a later reattempt at
# connection succeeds.
#max_queued_clients = 1000

319
# The maximum length of queue of accepted but not yet
320 321
# authenticated clients. The default value is 20. Set this to
# zero to turn this feature off.
322
#max_anonymous_clients = 20
323 324 325

# The minimum limit sets the number of workers to start up
# initially. If the number of active clients exceeds this,
J
Ján Tomko 已提交
326
# then more threads are spawned, up to max_workers limit.
327 328 329 330 331
# Typically you'd want max_workers to equal maximum number
# of clients allowed
#min_workers = 5
#max_workers = 20

332 333

# The number of priority workers. If all workers from above
E
Eric Blake 已提交
334
# pool are stuck, some calls marked as high priority
335 336 337
# (notably domainDestroy) can be executed in this pool.
#prio_workers = 5

338 339
# Limit on concurrent requests from a single client
# connection. To avoid one client monopolizing the server
340 341
# this should be a small fraction of the global max_workers
# parameter.
342 343
#max_client_requests = 5

344 345 346 347 348 349 350 351 352 353
# Same processing controls, but this time for the admin interface.
# For description of each option, be so kind to scroll few lines
# upwards.

#admin_min_workers = 1
#admin_max_workers = 5
#admin_max_clients = 5
#admin_max_queued_clients = 5
#admin_max_client_requests = 5

D
Daniel Veillard 已提交
354 355 356 357 358
#################################################################
#
# Logging controls
#

E
Eric Blake 已提交
359
# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
D
Daniel Veillard 已提交
360
# basically 1 will log everything possible
361 362 363 364 365 366 367 368 369 370 371
#
# WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
#
# WARNING: It outputs too much information to practically read.
# WARNING: The "log_filters" setting is recommended instead.
#
# WARNING: Journald applies rate limiting of messages and so libvirt
# WARNING: will limit "log_level" to only allow values 3 or 4 if
# WARNING: journald is the current output.
#
# WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
D
Daniel Veillard 已提交
372 373 374 375
#log_level = 3

# Logging filters:
# A filter allows to select a different logging level for a given category
376
# of logs. The format for a filter is:
377 378 379 380 381 382 383 384 385 386 387 388 389
#
#    level:match
#
# where 'match' is a string which is matched against the category
# given in the VIR_LOG_INIT() at the top of each libvirt source
# file, e.g., "remote", "qemu", or "util.json". The 'match' in the
# filter matches using shell wildcard syntax (see 'man glob(7)').
# The 'match' is always treated as a substring match. IOW a match
# string 'foo' is equivalent to '*foo*'.
#
# 'level' is the minimal level where matching messages should
#  be logged:
#
D
Daniel Veillard 已提交
390 391 392 393 394
#    1: DEBUG
#    2: INFO
#    3: WARNING
#    4: ERROR
#
395 396 397 398 399 400 401 402 403 404 405
# Multiple filters can be defined in a single @log_filters, they just need
# to be separated by spaces. Note that libvirt performs "first" match, i.e.
# if there are concurrent filters, the first one that matches will be applied,
# given the order in @log_filters.
#
# A typical need is to capture information from a hypervisor driver,
# public API entrypoints and some of the utility code. Some utility
# code is very verbose and is generally not desired. Taking the QEMU
# hypervisor as an example, a suitable filter string for debugging
# might be to turn off object, json & event logging, but enable the
# rest of the util code:
D
Daniel Veillard 已提交
406
#
407
#log_filters="1:qemu 1:libvirt 4:object 4:json 4:event 1:util"
D
Daniel Veillard 已提交
408 409

# Logging outputs:
E
Eric Blake 已提交
410
# An output is one of the places to save logging information
D
Daniel Veillard 已提交
411
# The format for an output can be:
412
#    level:stderr
D
Daniel Veillard 已提交
413
#      output goes to stderr
414
#    level:syslog:name
D
Daniel Veillard 已提交
415
#      use syslog for the output and use the given name as the ident
416
#    level:file:file_path
D
Daniel Veillard 已提交
417
#      output to a file, with the given filepath
418
#    level:journald
419
#      output to journald logging system
420
# In all cases 'level' is the minimal priority, acting as a filter
D
Daniel Veillard 已提交
421 422 423 424 425
#    1: DEBUG
#    2: INFO
#    3: WARNING
#    4: ERROR
#
E
Eric Blake 已提交
426
# Multiple outputs can be defined, they just need to be separated by spaces.
427 428
# e.g. to log all warnings and errors to syslog under the @DAEMON_NAME@ ident:
#log_outputs="3:syslog:@DAEMON_NAME@"
429

430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448

##################################################################
#
# Auditing
#
# This setting allows usage of the auditing subsystem to be altered:
#
#   audit_level == 0  -> disable all auditing
#   audit_level == 1  -> enable auditing, only if enabled on host (default)
#   audit_level == 2  -> enable auditing, and exit if disabled on host
#
#audit_level = 2
#
# If set to 1, then audit messages will also be sent
# via libvirt logging infrastructure. Defaults to 0
#
#audit_logging = 1

###################################################################
449
# UUID of the host:
450 451 452 453 454 455 456 457 458 459
# Host UUID is read from one of the sources specified in host_uuid_source.
#
# - 'smbios': fetch the UUID from 'dmidecode -s system-uuid'
# - 'machine-id': fetch the UUID from /etc/machine-id
#
# The host_uuid_source default is 'smbios'. If 'dmidecode' does not provide
# a valid UUID a temporary UUID will be generated.
#
# Another option is to specify host UUID in host_uuid.
#
460 461 462 463 464 465 466
# Keep the format of the example UUID below. UUID must not have all digits
# be the same.

# NB This default all-zeros UUID will not work. Replace
# it with the output of the 'uuidgen' command and then
# uncomment this entry
#host_uuid = "00000000-0000-0000-0000-000000000000"
467
#host_uuid_source = "smbios"
468 469 470

###################################################################
# Keepalive protocol:
471
# This allows @DAEMON_NAME@ to detect broken client connections or even
E
Eric Blake 已提交
472
# dead clients.  A keepalive message is sent to a client after
473 474 475 476 477 478 479
# keepalive_interval seconds of inactivity to check if the client is
# still responding; keepalive_count is a maximum number of keepalive
# messages that are allowed to be sent to the client without getting
# any response before the connection is considered broken.  In other
# words, the connection is automatically closed approximately after
# keepalive_interval * (keepalive_count + 1) seconds since the last
# message received from the client.  If keepalive_interval is set to
480
# -1, @DAEMON_NAME@ will never send keepalive requests; however clients
E
Eric Blake 已提交
481
# can still send them and the daemon will send responses.  When
482 483 484 485 486 487
# keepalive_count is set to 0, connections will be automatically
# closed after keepalive_interval seconds of inactivity without
# sending any keepalive messages.
#
#keepalive_interval = 5
#keepalive_count = 5
488

489
#
490 491 492
# These configuration options are no longer used.  There is no way to
# restrict such clients from connecting since they first need to
# connect in order to ask for keepalive.
493 494
#
#keepalive_required = 1
495
#admin_keepalive_required = 1
496 497 498 499

# Keepalive settings for the admin interface
#admin_keepalive_interval = 5
#admin_keepalive_count = 5
500 501 502 503 504 505 506 507 508

###################################################################
# Open vSwitch:
# This allows to specify a timeout for openvswitch calls made by
# libvirt. The ovs-vsctl utility is used for the configuration and
# its timeout option is set by default to 5 seconds to avoid
# potential infinite waits blocking libvirt.
#
#ovs_timeout = 5