libvirtd.conf 14.0 KB
Newer Older
1 2 3
# Master libvirt daemon configuration file
#
# For further information consult http://libvirt.org/format.html
4 5 6 7
#
# NOTE: the tests/daemon-conf regression test script requires
# that each "PARAMETER = VALUE" line in this file have the parameter
# name just after a leading "#".
8

9 10
#################################################################
#
11
# Network connectivity controls
12 13
#

14 15 16 17
# Flag listening for secure TLS connections on the public TCP/IP port.
# NB, must pass the --listen flag to the libvirtd process for this to
# have any effect.
#
18
# It is necessary to setup a CA and issue server certificates before
19 20 21
# using this capability.
#
# This is enabled by default, uncomment this to disable it
22
#listen_tls = 0
23 24 25 26 27

# Listen for unencrypted TCP connections on the public TCP/IP port.
# NB, must pass the --listen flag to the libvirtd process for this to
# have any effect.
#
28 29 30
# 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)
31 32
#
# This is disabled by default, uncomment this to enable it.
33
#listen_tcp = 1
34 35 36 37 38 39



# Override the port for accepting secure TLS connections
# This can be a port number, or service name
#
40
#tls_port = "16514"
41 42 43

# Override the port for accepting insecure TCP connections
# This can be a port number, or service name
44 45
#
#tcp_port = "16509"
46 47


48 49 50
# Override the default configuration which binds to all network
# interfaces. This can be a numeric IPv4/6 address, or hostname
#
51 52 53 54
# If the libvirtd service is started in parallel with network
# startup (e.g. with systemd), binding to addresses other than
# the wildcards (0.0.0.0/::) might not be available yet.
#
55
#listen_addr = "192.168.0.1"
56

57 58 59 60 61 62

# Flag toggling mDNS advertizement of the libvirt service.
#
# Alternatively can disable for all services on a host by
# stopping the Avahi daemon
#
63 64
# This is disabled by default, uncomment this to enable it
#mdns_adv = 1
65 66 67

# Override the default mDNS advertizement name. This must be
# unique on the immediate broadcast network.
68
#
69
# The default is "Virtualization Host HOSTNAME", where HOSTNAME
E
Eric Blake 已提交
70
# is substituted for the short hostname of the machine (without domain)
71
#
72
#mdns_name = "Virtualization Host Joe Demo"
73 74


75 76 77 78
#################################################################
#
# UNIX socket access controls
#
79

80 81 82 83 84
# Beware that if you are changing *any* of these options, and you use
# socket activation with systemd, you need to adjust the settings in
# the libvirtd.socket file as well since it could impose a security
# risk if you rely on file permission checking only.

85 86 87
# 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.
88 89 90
#
# This is restricted to 'root' by default.
#unix_sock_group = "libvirt"
91 92 93 94

# Set the UNIX socket permissions for the R/O socket. This is used
# for monitoring VM status only
#
E
Eric Blake 已提交
95 96
# Default allows any user. If setting group ownership, you may want to
# restrict this too.
97
#unix_sock_ro_perms = "0777"
98 99 100 101

# Set the UNIX socket permissions for the R/W socket. This is used
# for full management of VMs
#
102 103 104 105
# 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 已提交
106
# control, then you may want to relax this too.
107
#unix_sock_rw_perms = "0770"
108

109 110
# Set the name of the directory in which sockets will be found/created.
#unix_sock_dir = "/var/run/libvirt"
111

112
#################################################################
113
#
114
# Authentication.
115
#
116 117 118 119 120 121 122 123 124
#  - 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
#          controlled from /etc/sasl2/libvirt.conf. For the TCP
#          socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
E
Eric Blake 已提交
125
#          For non-TCP or TLS sockets, any scheme is allowed.
126
#
127 128 129 130 131 132
#  - 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.
#
133 134 135 136 137 138 139 140
# 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
141 142 143
# By default socket permissions only allow root. If PolicyKit
# support was compiled into libvirt, the default will be to
# use 'polkit' auth.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
#
# If the unix_sock_rw_perms are changed you may wish to enable
# an authentication mechanism here
#auth_unix_rw = "none"

# 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
# mechanism in /etc/sasl2/libvirt.conf
#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"


167 168 169 170 171 172 173 174
# 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
# client has authenticated with libvirtd
#
175
#access_drivers = [ "polkit" ]
176

177
#################################################################
178
#
179
# TLS x509 certificate configuration
180
#
181

182 183 184

# Override the default server key file path
#
185
#key_file = "/etc/pki/libvirt/private/serverkey.pem"
186 187 188

# Override the default server certificate file path
#
189
#cert_file = "/etc/pki/libvirt/servercert.pem"
190 191 192

# Override the default CA certificate path
#
193
#ca_file = "/etc/pki/CA/cacert.pem"
194 195

# Specify a certificate revocation list.
196
#
197
# Defaults to not using a CRL, uncomment to enable it
198 199 200 201 202 203 204 205 206 207
#crl_file = "/etc/pki/CA/crl.pem"



#################################################################
#
# Authorization controls
#


208 209 210 211 212
# Flag to disable verification of our own server certificates
#
# When libvirtd starts it performs some sanity checks against
# its own certificates.
#
213 214
# Default is to always run sanity checks. Uncommenting this
# will disable sanity checks which is not a good idea
215 216
#tls_no_sanity_certificate = 1

217 218 219 220 221 222 223 224 225 226
# 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
# verification - make sure an IP whitelist is set
#tls_no_verify_certificate = 1

227

E
Eric Blake 已提交
228
# A whitelist of allowed x509 Distinguished Names
229
# This list may contain wildcards such as
230 231 232 233 234 235 236 237 238
#
#    "C=GB,ST=London,L=London,O=Red Hat,CN=*"
#
# See the POSIX fnmatch function for the format of the wildcards.
#
# 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
239
#tls_allowed_dn_list = ["DN1", "DN2"]
240 241


242 243 244
# A whitelist of allowed SASL usernames. The format for usernames
# depends on the SASL authentication mechanism. Kerberos usernames
# look like username@REALM
245
#
246 247 248 249 250
# This list may contain wildcards such as
#
#    "*@EXAMPLE.COM"
#
# See the POSIX fnmatch function for the format of the wildcards.
251 252 253 254
#
# NB If this is an empty list, no client can connect, so comment out
# entirely rather than using empty list to disable these checks
#
255 256
# By default, no Username's are checked
#sasl_allowed_username_list = ["joe@EXAMPLE.COM", "fred@EXAMPLE.COM" ]
257 258


259 260 261 262 263 264 265 266

#################################################################
#
# Processing controls
#

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

M
Michal Privoznik 已提交
269 270 271 272 273 274
# 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

275 276 277 278
# The maximum length of queue of accepted but not yet not
# authenticated clients. The default value is zero, meaning
# the feature is disabled.
#max_anonymous_clients = 20
279 280 281

# The minimum limit sets the number of workers to start up
# initially. If the number of active clients exceeds this,
J
Ján Tomko 已提交
282
# then more threads are spawned, up to max_workers limit.
283 284 285 286 287
# Typically you'd want max_workers to equal maximum number
# of clients allowed
#min_workers = 5
#max_workers = 20

288 289

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

294 295
# Total global limit on concurrent RPC calls. Should be
# at least as large as max_workers. Beyond this, RPC requests
E
Eric Blake 已提交
296
# will be read into memory and queued. This directly impacts
297
# memory usage, currently each request requires 256 KB of
J
Ján Tomko 已提交
298
# memory. So by default up to 5 MB of memory is used
299 300 301 302 303 304 305 306 307 308 309
#
# XXX this isn't actually enforced yet, only the per-client
# limit is used so far
#max_requests = 20

# Limit on concurrent requests from a single client
# connection. To avoid one client monopolizing the server
# this should be a small fraction of the global max_requests
# and max_workers parameter
#max_client_requests = 5

D
Daniel Veillard 已提交
310 311 312 313 314
#################################################################
#
# Logging controls
#

E
Eric Blake 已提交
315
# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
D
Daniel Veillard 已提交
316
# basically 1 will log everything possible
317 318 319 320
# Note: Journald may employ rate limiting of the messages logged
# and thus lock up the libvirt daemon. To use the debug level with
# journald you have to specify it explicitly in 'log_outputs', otherwise
# only information level messages will be logged.
D
Daniel Veillard 已提交
321 322 323 324 325
#log_level = 3

# Logging filters:
# A filter allows to select a different logging level for a given category
# of logs
326
# The format for a filter is one of:
D
Daniel Veillard 已提交
327
#    x:name
328 329 330 331 332
#    x:+name
#      where name is a string which is matched against source file name,
#      e.g., "remote", "qemu", or "util/json", the optional "+" prefix
#      tells libvirt to log stack trace for each message matching name,
#      and x is the minimal level where matching messages should be logged:
D
Daniel Veillard 已提交
333 334 335 336 337
#    1: DEBUG
#    2: INFO
#    3: WARNING
#    4: ERROR
#
E
Eric Blake 已提交
338
# Multiple filters can be defined in a single @filters, they just need to be
D
Daniel Veillard 已提交
339 340
# separated by spaces.
#
341 342 343
# e.g. to only get warning or errors from the remote layer and only errors
# from the event layer:
#log_filters="3:remote 4:event"
D
Daniel Veillard 已提交
344 345

# Logging outputs:
E
Eric Blake 已提交
346
# An output is one of the places to save logging information
D
Daniel Veillard 已提交
347 348 349 350 351 352 353
# The format for an output can be:
#    x:stderr
#      output goes to stderr
#    x:syslog:name
#      use syslog for the output and use the given name as the ident
#    x:file:file_path
#      output to a file, with the given filepath
354 355
#    x:journald
#      output to journald logging system
D
Daniel Veillard 已提交
356 357 358 359 360 361
# In all case the x prefix is the minimal level, acting as a filter
#    1: DEBUG
#    2: INFO
#    3: WARNING
#    4: ERROR
#
E
Eric Blake 已提交
362
# Multiple outputs can be defined, they just need to be separated by spaces.
363 364 365
# e.g. to log all warnings and errors to syslog under the libvirtd ident:
#log_outputs="3:syslog:libvirtd"
#
366

367 368 369 370 371
# Log debug buffer size:
#
# This configuration option is no longer used, since the global
# log buffer functionality has been removed. Please configure
# suitable log_outputs/log_filters settings to obtain logs.
372 373
#log_buffer_size = 64

374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392

##################################################################
#
# 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

###################################################################
393 394 395 396 397 398 399 400 401 402 403 404
# UUID of the host:
# Provide the UUID of the host here in case the command
# 'dmidecode -s system-uuid' does not provide a valid uuid. In case
# 'dmidecode' does not provide a valid UUID and none is provided here, a
# temporary UUID will be generated.
# 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"
405 406 407 408

###################################################################
# Keepalive protocol:
# This allows libvirtd to detect broken client connections or even
E
Eric Blake 已提交
409
# dead clients.  A keepalive message is sent to a client after
410 411 412 413 414 415 416 417
# 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
# -1, libvirtd will never send keepalive requests; however clients
E
Eric Blake 已提交
418
# can still send them and the daemon will send responses.  When
419 420 421 422 423 424 425 426 427 428 429
# 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
#
# If set to 1, libvirtd will refuse to talk to clients that do not
# support keepalive protocol.  Defaults to 0.
#
#keepalive_required = 1