libvirtd.conf 15 KB

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