spacepaste

  1.  
  2. # Master configuration file for the QEMU driver.
  3. # All settings described here are optional - if omitted, sensible
  4. # defaults are used.
  5. # VNC is configured to listen on 127.0.0.1 by default.
  6. # To make it listen on all public interfaces, uncomment
  7. # this next option.
  8. #
  9. # NB, strong recommendation to enable TLS + x509 certificate
  10. # verification when allowing public access
  11. #
  12. #vnc_listen = "0.0.0.0"
  13. # Enable this option to have VNC served over an automatically created
  14. # unix socket. This prevents unprivileged access from users on the
  15. # host machine, though most VNC clients do not support it.
  16. #
  17. # This will only be enabled for VNC configurations that do not have
  18. # a hardcoded 'listen' or 'socket' value. This setting takes preference
  19. # over vnc_listen.
  20. #
  21. #vnc_auto_unix_socket = 1
  22. # Enable use of TLS encryption on the VNC server. This requires
  23. # a VNC client which supports the VeNCrypt protocol extension.
  24. # Examples include vinagre, virt-viewer, virt-manager and vencrypt
  25. # itself. UltraVNC, RealVNC, TightVNC do not support this
  26. #
  27. # It is necessary to setup CA and issue a server certificate
  28. # before enabling this.
  29. #
  30. #vnc_tls = 1
  31. # Use of TLS requires that x509 certificates be issued. The
  32. # default it to keep them in /etc/pki/libvirt-vnc. This directory
  33. # must contain
  34. #
  35. # ca-cert.pem - the CA master certificate
  36. # server-cert.pem - the server certificate signed with ca-cert.pem
  37. # server-key.pem - the server private key
  38. #
  39. # This option allows the certificate directory to be changed
  40. #
  41. #vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc"
  42. # The default TLS configuration only uses certificates for the server
  43. # allowing the client to verify the server's identity and establish
  44. # an encrypted channel.
  45. #
  46. # It is possible to use x509 certificates for authentication too, by
  47. # issuing a x509 certificate to every client who needs to connect.
  48. #
  49. # Enabling this option will reject any client who does not have a
  50. # certificate signed by the CA in /etc/pki/libvirt-vnc/ca-cert.pem
  51. #
  52. #vnc_tls_x509_verify = 1
  53. # The default VNC password. Only 8 bytes are significant for
  54. # VNC passwords. This parameter is only used if the per-domain
  55. # XML config does not already provide a password. To allow
  56. # access without passwords, leave this commented out. An empty
  57. # string will still enable passwords, but be rejected by QEMU,
  58. # effectively preventing any use of VNC. Obviously change this
  59. # example here before you set this.
  60. #
  61. #vnc_password = "XYZ12345"
  62. # Enable use of SASL encryption on the VNC server. This requires
  63. # a VNC client which supports the SASL protocol extension.
  64. # Examples include vinagre, virt-viewer and virt-manager
  65. # itself. UltraVNC, RealVNC, TightVNC do not support this
  66. #
  67. # It is necessary to configure /etc/sasl2/qemu.conf to choose
  68. # the desired SASL plugin (eg, GSSPI for Kerberos)
  69. #
  70. #vnc_sasl = 1
  71. # The default SASL configuration file is located in /etc/sasl2/
  72. # When running libvirtd unprivileged, it may be desirable to
  73. # override the configs in this location. Set this parameter to
  74. # point to the directory, and create a qemu.conf in that location
  75. #
  76. #vnc_sasl_dir = "/some/directory/sasl2"
  77. # QEMU implements an extension for providing audio over a VNC connection,
  78. # though if your VNC client does not support it, your only chance for getting
  79. # sound output is through regular audio backends. By default, libvirt will
  80. # disable all QEMU sound backends if using VNC, since they can cause
  81. # permissions issues. Enabling this option will make libvirtd honor the
  82. # QEMU_AUDIO_DRV environment variable when using VNC.
  83. #
  84. #vnc_allow_host_audio = 0
  85. # SPICE is configured to listen on 127.0.0.1 by default.
  86. # To make it listen on all public interfaces, uncomment
  87. # this next option.
  88. #
  89. # NB, strong recommendation to enable TLS + x509 certificate
  90. # verification when allowing public access
  91. #
  92. #spice_listen = "0.0.0.0"
  93. # Enable use of TLS encryption on the SPICE server.
  94. #
  95. # It is necessary to setup CA and issue a server certificate
  96. # before enabling this.
  97. #
  98. #spice_tls = 1
  99. # Use of TLS requires that x509 certificates be issued. The
  100. # default it to keep them in /etc/pki/libvirt-spice. This directory
  101. # must contain
  102. #
  103. # ca-cert.pem - the CA master certificate
  104. # server-cert.pem - the server certificate signed with ca-cert.pem
  105. # server-key.pem - the server private key
  106. #
  107. # This option allows the certificate directory to be changed.
  108. #
  109. #spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"
  110. # The default SPICE password. This parameter is only used if the
  111. # per-domain XML config does not already provide a password. To
  112. # allow access without passwords, leave this commented out. An
  113. # empty string will still enable passwords, but be rejected by
  114. # QEMU, effectively preventing any use of SPICE. Obviously change
  115. # this example here before you set this.
  116. #
  117. #spice_password = "XYZ12345"
  118. # Enable use of SASL encryption on the SPICE server. This requires
  119. # a SPICE client which supports the SASL protocol extension.
  120. #
  121. # It is necessary to configure /etc/sasl2/qemu.conf to choose
  122. # the desired SASL plugin (eg, GSSPI for Kerberos)
  123. #
  124. #spice_sasl = 1
  125. # The default SASL configuration file is located in /etc/sasl2/
  126. # When running libvirtd unprivileged, it may be desirable to
  127. # override the configs in this location. Set this parameter to
  128. # point to the directory, and create a qemu.conf in that location
  129. #
  130. #spice_sasl_dir = "/some/directory/sasl2"
  131. # By default, if no graphical front end is configured, libvirt will disable
  132. # QEMU audio output since directly talking to alsa/pulseaudio may not work
  133. # with various security settings. If you know what you're doing, enable
  134. # the setting below and libvirt will passthrough the QEMU_AUDIO_DRV
  135. # environment variable when using nographics.
  136. #
  137. #nographics_allow_host_audio = 1
  138. # Override the port for creating both VNC and SPICE sessions (min).
  139. # This defaults to 5900 and increases for consecutive sessions
  140. # or when ports are occupied, until it hits the maximum.
  141. #
  142. # Minimum must be greater than or equal to 5900 as lower number would
  143. # result into negative vnc display number.
  144. #
  145. # Maximum must be less than 65536, because higher numbers do not make
  146. # sense as a port number.
  147. #
  148. #remote_display_port_min = 5900
  149. #remote_display_port_max = 65535
  150. # VNC WebSocket port policies, same rules apply as with remote display
  151. # ports. VNC WebSockets use similar display <-> port mappings, with
  152. # the exception being that ports start from 5700 instead of 5900.
  153. #
  154. #remote_websocket_port_min = 5700
  155. #remote_websocket_port_max = 65535
  156. # The default security driver is SELinux. If SELinux is disabled
  157. # on the host, then the security driver will automatically disable
  158. # itself. If you wish to disable QEMU SELinux security driver while
  159. # leaving SELinux enabled for the host in general, then set this
  160. # to 'none' instead. It's also possible to use more than one security
  161. # driver at the same time, for this use a list of names separated by
  162. # comma and delimited by square brackets. For example:
  163. #
  164. # security_driver = [ "selinux", "apparmor" ]
  165. #
  166. # Notes: The DAC security driver is always enabled; as a result, the
  167. # value of security_driver cannot contain "dac". The value "none" is
  168. # a special value; security_driver can be set to that value in
  169. # isolation, but it cannot appear in a list of drivers.
  170. #
  171. #security_driver = "selinux"
  172. # If set to non-zero, then the default security labeling
  173. # will make guests confined. If set to zero, then guests
  174. # will be unconfined by default. Defaults to 1.
  175. #security_default_confined = 1
  176. # If set to non-zero, then attempts to create unconfined
  177. # guests will be blocked. Defaults to 0.
  178. #security_require_confined = 1
  179. # The user for QEMU processes run by the system instance. It can be
  180. # specified as a user name or as a user id. The qemu driver will try to
  181. # parse this value first as a name and then, if the name doesn't exist,
  182. # as a user id.
  183. #
  184. # Since a sequence of digits is a valid user name, a leading plus sign
  185. # can be used to ensure that a user id will not be interpreted as a user
  186. # name.
  187. #
  188. # Some examples of valid values are:
  189. #
  190. # user = "qemu" # A user named "qemu"
  191. # user = "+0" # Super user (uid=0)
  192. # user = "100" # A user named "100" or a user with uid=100
  193. #
  194. #user = "root"
  195. # The group for QEMU processes run by the system instance. It can be
  196. # specified in a similar way to user.
  197. group="78"
  198. # Whether libvirt should dynamically change file ownership
  199. # to match the configured user/group above. Defaults to 1.
  200. # Set to 0 to disable file ownership changes.
  201. #dynamic_ownership = 1
  202. # What cgroup controllers to make use of with QEMU guests
  203. #
  204. # - 'cpu' - use for schedular tunables
  205. # - 'devices' - use for device whitelisting
  206. # - 'memory' - use for memory tunables
  207. # - 'blkio' - use for block devices I/O tunables
  208. # - 'cpuset' - use for CPUs and memory nodes
  209. # - 'cpuacct' - use for CPUs statistics.
  210. #
  211. # NB, even if configured here, they won't be used unless
  212. # the administrator has mounted cgroups, e.g.:
  213. #
  214. # mkdir /dev/cgroup
  215. # mount -t cgroup -o devices,cpu,memory,blkio,cpuset none /dev/cgroup
  216. #
  217. # They can be mounted anywhere, and different controllers
  218. # can be mounted in different locations. libvirt will detect
  219. # where they are located.
  220. #
  221. #cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ]
  222. # This is the basic set of devices allowed / required by
  223. # all virtual machines.
  224. #
  225. # As well as this, any configured block backed disks,
  226. # all sound device, and all PTY devices are allowed.
  227. #
  228. # This will only need setting if newer QEMU suddenly
  229. # wants some device we don't already know about.
  230. #
  231. #cgroup_device_acl = [
  232. # "/dev/null", "/dev/full", "/dev/zero",
  233. # "/dev/random", "/dev/urandom",
  234. # "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
  235. # "/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
  236. # "/dev/vfio/1"
  237. #]
  238. #
  239. # RDMA migration requires the following extra files to be added to the list:
  240. # "/dev/infiniband/rdma_cm",
  241. # "/dev/infiniband/issm0",
  242. # "/dev/infiniband/issm1",
  243. # "/dev/infiniband/umad0",
  244. # "/dev/infiniband/umad1",
  245. # "/dev/infiniband/uverbs0"
  246. # The default format for Qemu/KVM guest save images is raw; that is, the
  247. # memory from the domain is dumped out directly to a file. If you have
  248. # guests with a large amount of memory, however, this can take up quite
  249. # a bit of space. If you would like to compress the images while they
  250. # are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz"
  251. # for save_image_format. Note that this means you slow down the process of
  252. # saving a domain in order to save disk space; the list above is in descending
  253. # order by performance and ascending order by compression ratio.
  254. #
  255. # save_image_format is used when you use 'virsh save' or 'virsh managedsave'
  256. # at scheduled saving, and it is an error if the specified save_image_format
  257. # is not valid, or the requested compression program can't be found.
  258. #
  259. # dump_image_format is used when you use 'virsh dump' at emergency
  260. # crashdump, and if the specified dump_image_format is not valid, or
  261. # the requested compression program can't be found, this falls
  262. # back to "raw" compression.
  263. #
  264. # snapshot_image_format specifies the compression algorithm of the memory save
  265. # image when an external snapshot of a domain is taken. This does not apply
  266. # on disk image format. It is an error if the specified format isn't valid,
  267. # or the requested compression program can't be found.
  268. #
  269. #save_image_format = "raw"
  270. #dump_image_format = "raw"
  271. #snapshot_image_format = "raw"
  272. # When a domain is configured to be auto-dumped when libvirtd receives a
  273. # watchdog event from qemu guest, libvirtd will save dump files in directory
  274. # specified by auto_dump_path. Default value is /var/lib/libvirt/qemu/dump
  275. #
  276. #auto_dump_path = "/var/lib/libvirt/qemu/dump"
  277. # When a domain is configured to be auto-dumped, enabling this flag
  278. # has the same effect as using the VIR_DUMP_BYPASS_CACHE flag with the
  279. # virDomainCoreDump API. That is, the system will avoid using the
  280. # file system cache while writing the dump file, but may cause
  281. # slower operation.
  282. #
  283. #auto_dump_bypass_cache = 0
  284. # When a domain is configured to be auto-started, enabling this flag
  285. # has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag
  286. # with the virDomainCreateWithFlags API. That is, the system will
  287. # avoid using the file system cache when restoring any managed state
  288. # file, but may cause slower operation.
  289. #
  290. #auto_start_bypass_cache = 0
  291. # If provided by the host and a hugetlbfs mount point is configured,
  292. # a guest may request huge page backing. When this mount point is
  293. # unspecified here, determination of a host mount point in /proc/mounts
  294. # will be attempted. Specifying an explicit mount overrides detection
  295. # of the same in /proc/mounts. Setting the mount point to "" will
  296. # disable guest hugepage backing. If desired, multiple mount points can
  297. # be specified at once, separated by comma and enclosed in square
  298. # brackets, for example:
  299. #
  300. # hugetlbfs_mount = ["/dev/hugepages2M", "/dev/hugepages1G"]
  301. #
  302. # The size of huge page served by specific mount point is determined by
  303. # libvirt at the daemon startup.
  304. #
  305. # NB, within these mount points, guests will create memory backing
  306. # files in a location of $MOUNTPOINT/libvirt/qemu
  307. #
  308. #hugetlbfs_mount = "/dev/hugepages"
  309. # Path to the setuid helper for creating tap devices. This executable
  310. # is used to create <source type='bridge'> interfaces when libvirtd is
  311. # running unprivileged. libvirt invokes the helper directly, instead
  312. # of using "-netdev bridge", for security reasons.
  313. #bridge_helper = "/usr/lib/qemu/qemu-bridge-helper"
  314. # If clear_emulator_capabilities is enabled, libvirt will drop all
  315. # privileged capabilities of the QEmu/KVM emulator. This is enabled by
  316. # default.
  317. #
  318. # Warning: Disabling this option means that a compromised guest can
  319. # exploit the privileges and possibly do damage to the host.
  320. #
  321. clear_emulator_capabilities = 0
  322. # If enabled, libvirt will have QEMU set its process name to
  323. # "qemu:VM_NAME", where VM_NAME is the name of the VM. The QEMU
  324. # process will appear as "qemu:VM_NAME" in process listings and
  325. # other system monitoring tools. By default, QEMU does not set
  326. # its process title, so the complete QEMU command (emulator and
  327. # its arguments) appear in process listings.
  328. #
  329. #set_process_name = 1
  330. # If max_processes is set to a positive integer, libvirt will use
  331. # it to set the maximum number of processes that can be run by qemu
  332. # user. This can be used to override default value set by host OS.
  333. # The same applies to max_files which sets the limit on the maximum
  334. # number of opened files.
  335. #
  336. #max_processes = 0
  337. #max_files = 0
  338. # mac_filter enables MAC addressed based filtering on bridge ports.
  339. # This currently requires ebtables to be installed.
  340. #
  341. #mac_filter = 1
  342. # By default, PCI devices below non-ACS switch are not allowed to be assigned
  343. # to guests. By setting relaxed_acs_check to 1 such devices will be allowed to
  344. # be assigned to guests.
  345. #
  346. #relaxed_acs_check = 1
  347. # If allow_disk_format_probing is enabled, libvirt will probe disk
  348. # images to attempt to identify their format, when not otherwise
  349. # specified in the XML. This is disabled by default.
  350. #
  351. # WARNING: Enabling probing is a security hole in almost all
  352. # deployments. It is strongly recommended that users update their
  353. # guest XML <disk> elements to include <driver type='XXXX'/>
  354. # elements instead of enabling this option.
  355. #
  356. #allow_disk_format_probing = 1
  357. # In order to prevent accidentally starting two domains that
  358. # share one writable disk, libvirt offers two approaches for
  359. # locking files. The first one is sanlock, the other one,
  360. # virtlockd, is then our own implementation. Accepted values
  361. # are "sanlock" and "lockd".
  362. #
  363. #lock_manager = "lockd"
  364. # Set limit of maximum APIs queued on one domain. All other APIs
  365. # over this threshold will fail on acquiring job lock. Specially,
  366. # setting to zero turns this feature off.
  367. # Note, that job lock is per domain.
  368. #
  369. #max_queued = 0
  370. ###################################################################
  371. # Keepalive protocol:
  372. # This allows qemu driver to detect broken connections to remote
  373. # libvirtd during peer-to-peer migration. A keepalive message is
  374. # sent to the daemon after keepalive_interval seconds of inactivity
  375. # to check if the daemon is still responding; keepalive_count is a
  376. # maximum number of keepalive messages that are allowed to be sent
  377. # to the daemon without getting any response before the connection
  378. # is considered broken. In other words, the connection is
  379. # automatically closed approximately after
  380. # keepalive_interval * (keepalive_count + 1) seconds since the last
  381. # message received from the daemon. If keepalive_interval is set to
  382. # -1, qemu driver will not send keepalive requests during
  383. # peer-to-peer migration; however, the remote libvirtd can still
  384. # send them and source libvirtd will send responses. When
  385. # keepalive_count is set to 0, connections will be automatically
  386. # closed after keepalive_interval seconds of inactivity without
  387. # sending any keepalive messages.
  388. #
  389. #keepalive_interval = 5
  390. #keepalive_count = 5
  391. # Use seccomp syscall whitelisting in QEMU.
  392. # 1 = on, 0 = off, -1 = use QEMU default
  393. # Defaults to -1.
  394. #
  395. #seccomp_sandbox = 1
  396. # Override the listen address for all incoming migrations. Defaults to
  397. # 0.0.0.0, or :: if both host and qemu are capable of IPv6.
  398. #migration_address = "0.0.0.0"
  399. # The default hostname or IP address which will be used by a migration
  400. # source for transferring migration data to this host. The migration
  401. # source has to be able to resolve this hostname and connect to it so
  402. # setting "localhost" will not work. By default, the host's configured
  403. # hostname is used.
  404. #migration_host = "host.example.com"
  405. # Override the port range used for incoming migrations.
  406. #
  407. # Minimum must be greater than 0, however when QEMU is not running as root,
  408. # setting the minimum to be lower than 1024 will not work.
  409. #
  410. # Maximum must not be greater than 65535.
  411. #
  412. #migration_port_min = 49152
  413. #migration_port_max = 49215
  414. # Timestamp QEMU's log messages (if QEMU supports it)
  415. #
  416. # Defaults to 1.
  417. #
  418. #log_timestamp = 0
  419. # Location of master nvram file
  420. #
  421. # When a domain is configured to use UEFI instead of standard
  422. # BIOS it may use a separate storage for UEFI variables. If
  423. # that's the case libvirt creates the variable store per domain
  424. # using this master file as image. Each UEFI firmware can,
  425. # however, have different variables store. Therefore the nvram is
  426. # a list of strings when a single item is in form of:
  427. # ${PATH_TO_UEFI_FW}:${PATH_TO_UEFI_VARS}.
  428. # Later, when libvirt creates per domain variable store, this list is
  429. # searched for the master image. The UEFI firmware can be called
  430. # differently for different guest architectures. For instance, it's OVMF
  431. # for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default
  432. # follows this scheme.
  433. # "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd",
  434. # "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd"
  435. nvram = [
  436. "/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd",
  437. ]
  438. # The backend to use for handling stdout/stderr output from
  439. # QEMU processes.
  440. #
  441. # 'file': QEMU writes directly to a plain file. This is the
  442. # historical default, but allows QEMU to inflict a
  443. # denial of service attack on the host by exhausting
  444. # filesystem space
  445. #
  446. # 'logd': QEMU writes to a pipe provided by virtlogd daemon.
  447. # This is the current default, providing protection
  448. # against denial of service by performing log file
  449. # rollover when a size limit is hit.
  450. #
  451. #stdio_handler = "logd"
  452.