2
let conf = "# Master libvirt daemon configuration file
4
# For further information consult http://libvirt.org/format.html
7
#################################################################
9
# Network connectivity controls
12
# Flag listening for secure TLS connections on the public TCP/IP port.
13
# NB, must pass the --listen flag to the libvirtd process for this to
16
# It is necessary to setup a CA and issue server certificates before
17
# using this capability.
19
# This is enabled by default, uncomment this to disable it
22
# Listen for unencrypted TCP connections on the public TCP/IP port.
23
# NB, must pass the --listen flag to the libvirtd process for this to
26
# Using the TCP socket requires SASL authentication by default. Only
27
# SASL mechanisms which support data encryption are allowed. This is
28
# DIGEST_MD5 and GSSAPI (Kerberos5)
30
# This is disabled by default, uncomment this to enable it.
35
# Override the port for accepting secure TLS connections
36
# This can be a port number, or service name
40
# Override the port for accepting insecure TCP connections
41
# This can be a port number, or service name
46
# Override the default configuration which binds to all network
47
# interfaces. This can be a numeric IPv4/6 address, or hostname
49
listen_addr = \"192.168.0.1\"
52
# Flag toggling mDNS advertizement of the libvirt service.
54
# Alternatively can disable for all services on a host by
55
# stopping the Avahi daemon
57
# This is enabled by default, uncomment this to disable it
60
# Override the default mDNS advertizement name. This must be
61
# unique on the immediate broadcast network.
63
# The default is \"Virtualization Host HOSTNAME\", where HOSTNAME
64
# is subsituted for the short hostname of the machine (without domain)
66
mdns_name = \"Virtualization Host Joe Demo\"
69
#################################################################
71
# UNIX socket access controls
74
# Set the UNIX domain socket group ownership. This can be used to
75
# allow a 'trusted' set of users access to management capabilities
76
# without becoming root.
78
# This is restricted to 'root' by default.
79
unix_sock_group = \"libvirt\"
81
# Set the UNIX socket permissions for the R/O socket. This is used
82
# for monitoring VM status only
84
# Default allows any user. If setting group ownership may want to
86
unix_sock_ro_perms = \"0777\"
88
# Set the UNIX socket permissions for the R/W socket. This is used
89
# for full management of VMs
91
# Default allows only root. If PolicyKit is enabled on the socket,
92
# the default will change to allow everyone (eg, 0777)
94
# If not using PolicyKit and setting group ownership for access
95
# control then you may want to relax this to:
96
unix_sock_rw_perms = \"0770\"
100
#################################################################
104
# - none: do not perform auth checks. If you can connect to the
105
# socket you are allowed. This is suitable if there are
106
# restrictions on connecting to the socket (eg, UNIX
107
# socket permissions), or if there is a lower layer in
108
# the network providing auth (eg, TLS/x509 certificates)
110
# - sasl: use SASL infrastructure. The actual auth scheme is then
111
# controlled from /etc/sasl2/libvirt.conf. For the TCP
112
# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
113
# For non-TCP or TLS sockets, any scheme is allowed.
115
# - polkit: use PolicyKit to authenticate. This is only suitable
116
# for use on the UNIX sockets. The default policy will
117
# require a user to supply their own password to gain
118
# full read/write access (aka sudo like), while anyone
119
# is allowed read/only access.
121
# Set an authentication scheme for UNIX read-only sockets
122
# By default socket permissions allow anyone to connect
124
# To restrict monitoring of domains you may wish to enable
125
# an authentication mechanism here
126
auth_unix_ro = \"none\"
128
# Set an authentication scheme for UNIX read-write sockets
129
# By default socket permissions only allow root. If PolicyKit
130
# support was compiled into libvirt, the default will be to
133
# If the unix_sock_rw_perms are changed you may wish to enable
134
# an authentication mechanism here
135
auth_unix_rw = \"none\"
137
# Change the authentication scheme for TCP sockets.
139
# If you don't enable SASL, then all TCP traffic is cleartext.
140
# Don't do this outside of a dev/test scenario. For real world
141
# use, always enable SASL and use the GSSAPI or DIGEST-MD5
142
# mechanism in /etc/sasl2/libvirt.conf
145
# Change the authentication scheme for TLS sockets.
147
# TLS sockets already have encryption provided by the TLS
148
# layer, and limited authentication is done by certificates
150
# It is possible to make use of any SASL authentication
151
# mechanism as well, by using 'sasl' for this option
156
#################################################################
158
# TLS x509 certificate configuration
162
# Override the default server key file path
164
key_file = \"/etc/pki/libvirt/private/serverkey.pem\"
166
# Override the default server certificate file path
168
cert_file = \"/etc/pki/libvirt/servercert.pem\"
170
# Override the default CA certificate path
172
ca_file = \"/etc/pki/CA/cacert.pem\"
174
# Specify a certificate revocation list.
176
# Defaults to not using a CRL, uncomment to enable it
177
crl_file = \"/etc/pki/CA/crl.pem\"
181
#################################################################
183
# Authorization controls
187
# Flag to disable verification of client certificates
189
# Client certificate verification is the primary authentication mechanism.
190
# Any client which does not present a certificate signed by the CA
193
# Default is to always verify. Uncommenting this will disable
194
# verification - make sure an IP whitelist is set
195
tls_no_verify_certificate = 1
198
# A whitelist of allowed x509 Distinguished Names
199
# This list may contain wildcards such as
201
# \"C=GB,ST=London,L=London,O=Red Hat,CN=*\"
203
# See the POSIX fnmatch function for the format of the wildcards.
205
# NB If this is an empty list, no client can connect, so comment out
206
# entirely rather than using empty list to disable these checks
208
# By default, no DN's are checked
209
tls_allowed_dn_list = [\"DN1\", \"DN2\"]
212
# A whitelist of allowed SASL usernames. The format for usernames
213
# depends on the SASL authentication mechanism. Kerberos usernames
214
# look like username@REALM
216
# This list may contain wildcards such as
220
# See the POSIX fnmatch function for the format of the wildcards.
222
# NB If this is an empty list, no client can connect, so comment out
223
# entirely rather than using empty list to disable these checks
225
# By default, no Username's are checked
226
sasl_allowed_username_list = [
232
#################################################################
234
# Processing controls
237
# The maximum number of concurrent client connections to allow
238
# over all sockets combined.
242
# The minimum limit sets the number of workers to start up
243
# initially. If the number of active clients exceeds this,
244
# then more threads are spawned, upto max_workers limit.
245
# Typically you'd want max_workers to equal maximum number
250
# Total global limit on concurrent RPC calls. Should be
251
# at least as large as max_workers. Beyond this, RPC requests
252
# will be read into memory and queued. This directly impact
253
# memory usage, currently each request requires 256 KB of
254
# memory. So by default upto 5 MB of memory is used
257
# Limit on concurrent requests from a single client
258
# connection. To avoid one client monopolizing the server
259
# this should be a small fraction of the global max_requests
260
# and max_workers parameter
261
max_client_requests = 5
267
log_outputs=\"4:stderr\"
273
test Libvirtd.lns get conf =
274
{ "#comment" = "Master libvirt daemon configuration file" }
276
{ "#comment" = "For further information consult http://libvirt.org/format.html" }
279
{ "#comment" = "################################################################" }
281
{ "#comment" = "Network connectivity controls" }
284
{ "#comment" = "Flag listening for secure TLS connections on the public TCP/IP port." }
285
{ "#comment" = "NB, must pass the --listen flag to the libvirtd process for this to" }
286
{ "#comment" = "have any effect." }
288
{ "#comment" = "It is necessary to setup a CA and issue server certificates before" }
289
{ "#comment" = "using this capability." }
291
{ "#comment" = "This is enabled by default, uncomment this to disable it" }
292
{ "listen_tls" = "0" }
294
{ "#comment" = "Listen for unencrypted TCP connections on the public TCP/IP port." }
295
{ "#comment" = "NB, must pass the --listen flag to the libvirtd process for this to" }
296
{ "#comment" = "have any effect." }
298
{ "#comment" = "Using the TCP socket requires SASL authentication by default. Only" }
299
{ "#comment" = "SASL mechanisms which support data encryption are allowed. This is" }
300
{ "#comment" = "DIGEST_MD5 and GSSAPI (Kerberos5)" }
302
{ "#comment" = "This is disabled by default, uncomment this to enable it." }
303
{ "listen_tcp" = "1" }
307
{ "#comment" = "Override the port for accepting secure TLS connections" }
308
{ "#comment" = "This can be a port number, or service name" }
310
{ "tls_port" = "16514" }
312
{ "#comment" = "Override the port for accepting insecure TCP connections" }
313
{ "#comment" = "This can be a port number, or service name" }
315
{ "tcp_port" = "16509" }
318
{ "#comment" = "Override the default configuration which binds to all network" }
319
{ "#comment" = "interfaces. This can be a numeric IPv4/6 address, or hostname" }
321
{ "listen_addr" = "192.168.0.1" }
324
{ "#comment" = "Flag toggling mDNS advertizement of the libvirt service." }
326
{ "#comment" = "Alternatively can disable for all services on a host by" }
327
{ "#comment" = "stopping the Avahi daemon" }
329
{ "#comment" = "This is enabled by default, uncomment this to disable it" }
332
{ "#comment" = "Override the default mDNS advertizement name. This must be" }
333
{ "#comment" = "unique on the immediate broadcast network." }
335
{ "#comment" = "The default is \"Virtualization Host HOSTNAME\", where HOSTNAME" }
336
{ "#comment" = "is subsituted for the short hostname of the machine (without domain)" }
338
{ "mdns_name" = "Virtualization Host Joe Demo" }
341
{ "#comment" = "################################################################" }
343
{ "#comment" = "UNIX socket access controls" }
346
{ "#comment" = "Set the UNIX domain socket group ownership. This can be used to" }
347
{ "#comment" = "allow a 'trusted' set of users access to management capabilities" }
348
{ "#comment" = "without becoming root." }
350
{ "#comment" = "This is restricted to 'root' by default." }
351
{ "unix_sock_group" = "libvirt" }
353
{ "#comment" = "Set the UNIX socket permissions for the R/O socket. This is used" }
354
{ "#comment" = "for monitoring VM status only" }
356
{ "#comment" = "Default allows any user. If setting group ownership may want to" }
357
{ "#comment" = "restrict this to:" }
358
{ "unix_sock_ro_perms" = "0777" }
360
{ "#comment" = "Set the UNIX socket permissions for the R/W socket. This is used" }
361
{ "#comment" = "for full management of VMs" }
363
{ "#comment" = "Default allows only root. If PolicyKit is enabled on the socket," }
364
{ "#comment" = "the default will change to allow everyone (eg, 0777)" }
366
{ "#comment" = "If not using PolicyKit and setting group ownership for access" }
367
{ "#comment" = "control then you may want to relax this to:" }
368
{ "unix_sock_rw_perms" = "0770" }
372
{ "#comment" = "################################################################" }
374
{ "#comment" = "Authentication." }
376
{ "#comment" = "- none: do not perform auth checks. If you can connect to the" }
377
{ "#comment" = "socket you are allowed. This is suitable if there are" }
378
{ "#comment" = "restrictions on connecting to the socket (eg, UNIX" }
379
{ "#comment" = "socket permissions), or if there is a lower layer in" }
380
{ "#comment" = "the network providing auth (eg, TLS/x509 certificates)" }
382
{ "#comment" = "- sasl: use SASL infrastructure. The actual auth scheme is then" }
383
{ "#comment" = "controlled from /etc/sasl2/libvirt.conf. For the TCP" }
384
{ "#comment" = "socket only GSSAPI & DIGEST-MD5 mechanisms will be used." }
385
{ "#comment" = "For non-TCP or TLS sockets, any scheme is allowed." }
387
{ "#comment" = "- polkit: use PolicyKit to authenticate. This is only suitable" }
388
{ "#comment" = "for use on the UNIX sockets. The default policy will" }
389
{ "#comment" = "require a user to supply their own password to gain" }
390
{ "#comment" = "full read/write access (aka sudo like), while anyone" }
391
{ "#comment" = "is allowed read/only access." }
393
{ "#comment" = "Set an authentication scheme for UNIX read-only sockets" }
394
{ "#comment" = "By default socket permissions allow anyone to connect" }
396
{ "#comment" = "To restrict monitoring of domains you may wish to enable" }
397
{ "#comment" = "an authentication mechanism here" }
398
{ "auth_unix_ro" = "none" }
400
{ "#comment" = "Set an authentication scheme for UNIX read-write sockets" }
401
{ "#comment" = "By default socket permissions only allow root. If PolicyKit" }
402
{ "#comment" = "support was compiled into libvirt, the default will be to" }
403
{ "#comment" = "use 'polkit' auth." }
405
{ "#comment" = "If the unix_sock_rw_perms are changed you may wish to enable" }
406
{ "#comment" = "an authentication mechanism here" }
407
{ "auth_unix_rw" = "none" }
409
{ "#comment" = "Change the authentication scheme for TCP sockets." }
411
{ "#comment" = "If you don't enable SASL, then all TCP traffic is cleartext." }
412
{ "#comment" = "Don't do this outside of a dev/test scenario. For real world" }
413
{ "#comment" = "use, always enable SASL and use the GSSAPI or DIGEST-MD5" }
414
{ "#comment" = "mechanism in /etc/sasl2/libvirt.conf" }
415
{ "auth_tcp" = "sasl" }
417
{ "#comment" = "Change the authentication scheme for TLS sockets." }
419
{ "#comment" = "TLS sockets already have encryption provided by the TLS" }
420
{ "#comment" = "layer, and limited authentication is done by certificates" }
422
{ "#comment" = "It is possible to make use of any SASL authentication" }
423
{ "#comment" = "mechanism as well, by using 'sasl' for this option" }
424
{ "auth_tls" = "none" }
428
{ "#comment" = "################################################################" }
430
{ "#comment" = "TLS x509 certificate configuration" }
434
{ "#comment" = "Override the default server key file path" }
436
{ "key_file" = "/etc/pki/libvirt/private/serverkey.pem" }
438
{ "#comment" = "Override the default server certificate file path" }
440
{ "cert_file" = "/etc/pki/libvirt/servercert.pem" }
442
{ "#comment" = "Override the default CA certificate path" }
444
{ "ca_file" = "/etc/pki/CA/cacert.pem" }
446
{ "#comment" = "Specify a certificate revocation list." }
448
{ "#comment" = "Defaults to not using a CRL, uncomment to enable it" }
449
{ "crl_file" = "/etc/pki/CA/crl.pem" }
453
{ "#comment" = "################################################################" }
455
{ "#comment" = "Authorization controls" }
459
{ "#comment" = "Flag to disable verification of client certificates" }
461
{ "#comment" = "Client certificate verification is the primary authentication mechanism." }
462
{ "#comment" = "Any client which does not present a certificate signed by the CA" }
463
{ "#comment" = "will be rejected." }
465
{ "#comment" = "Default is to always verify. Uncommenting this will disable" }
466
{ "#comment" = "verification - make sure an IP whitelist is set" }
467
{ "tls_no_verify_certificate" = "1" }
470
{ "#comment" = "A whitelist of allowed x509 Distinguished Names" }
471
{ "#comment" = "This list may contain wildcards such as" }
473
{ "#comment" = "\"C=GB,ST=London,L=London,O=Red Hat,CN=*\"" }
475
{ "#comment" = "See the POSIX fnmatch function for the format of the wildcards." }
477
{ "#comment" = "NB If this is an empty list, no client can connect, so comment out" }
478
{ "#comment" = "entirely rather than using empty list to disable these checks" }
480
{ "#comment" = "By default, no DN's are checked" }
481
{ "tls_allowed_dn_list"
487
{ "#comment" = "A whitelist of allowed SASL usernames. The format for usernames" }
488
{ "#comment" = "depends on the SASL authentication mechanism. Kerberos usernames" }
489
{ "#comment" = "look like username@REALM" }
491
{ "#comment" = "This list may contain wildcards such as" }
493
{ "#comment" = "\"*@EXAMPLE.COM\"" }
495
{ "#comment" = "See the POSIX fnmatch function for the format of the wildcards." }
497
{ "#comment" = "NB If this is an empty list, no client can connect, so comment out" }
498
{ "#comment" = "entirely rather than using empty list to disable these checks" }
500
{ "#comment" = "By default, no Username's are checked" }
501
{ "sasl_allowed_username_list"
502
{ "1" = "joe@EXAMPLE.COM" }
503
{ "2" = "fred@EXAMPLE.COM" }
507
{ "#comment" = "################################################################"}
509
{ "#comment" = "Processing controls"}
512
{ "#comment" = "The maximum number of concurrent client connections to allow"}
513
{ "#comment" = "over all sockets combined."}
514
{ "max_clients" = "20" }
517
{ "#comment" = "The minimum limit sets the number of workers to start up"}
518
{ "#comment" = "initially. If the number of active clients exceeds this,"}
519
{ "#comment" = "then more threads are spawned, upto max_workers limit."}
520
{ "#comment" = "Typically you'd want max_workers to equal maximum number"}
521
{ "#comment" = "of clients allowed"}
522
{ "min_workers" = "5" }
523
{ "max_workers" = "20" }
525
{ "#comment" = "Total global limit on concurrent RPC calls. Should be" }
526
{ "#comment" = "at least as large as max_workers. Beyond this, RPC requests" }
527
{ "#comment" = "will be read into memory and queued. This directly impact" }
528
{ "#comment" = "memory usage, currently each request requires 256 KB of" }
529
{ "#comment" = "memory. So by default upto 5 MB of memory is used" }
530
{ "max_requests" = "20" }
532
{ "#comment" = "Limit on concurrent requests from a single client" }
533
{ "#comment" = "connection. To avoid one client monopolizing the server" }
534
{ "#comment" = "this should be a small fraction of the global max_requests" }
535
{ "#comment" = "and max_workers parameter" }
536
{ "max_client_requests" = "5" }
538
{ "#comment" = "Logging level:" }
539
{ "log_level" = "4" }
541
{ "#comment" = "Logging outputs:" }
542
{ "log_outputs" = "4:stderr" }
544
{ "#comment" = "Logging filters:" }
545
{ "log_filters" = "a" }