From nobody Thu May 2 03:05:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614887757; cv=none; d=zohomail.com; s=zohoarc; b=PWu33ilNXYFejcNIv7ZjhHPGlvfGzKJpSt9JW3Rr+ifRCsbOeQI0r9P9DK5nzSF7zWPkdhGkphG1EumBQXddsido66veJDBf0neXKBLRjoe8MdFmahaknIshGgY9y6aTPetqT6pxKgL5jowCePsX+u7vGnjgbZameSTK3Ty/FJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614887757; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=lba0DRaxXeOQHw4VsafG5UOKPFUjkiw4TSEUQt3zkqo=; b=GFf2HQ1H/K+HvnO+oXJj3rJQjRb1gV2MrY+OAvtScWHoPq3GZMXdsWAEOJmS3KNObu2eoMzDl176MyBSgpvVulzk0UZKjCCYw6DvGGSCbfEVduP2PEu9hRM+3EHsF1xK+x1344jCqMhtvNrGWYi0MS3ffxBwlCSa8RzMKY3K+L4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161488775788672.46118747269338; Thu, 4 Mar 2021 11:55:57 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-v4_3bxApOeuLB6gl-ssbzg-1; Thu, 04 Mar 2021 14:55:55 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A939B57; Thu, 4 Mar 2021 19:55:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D6D41412A; Thu, 4 Mar 2021 19:55:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D242118095CA; Thu, 4 Mar 2021 19:55:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 124JtlnY020456 for ; Thu, 4 Mar 2021 14:55:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4CA5D60C43; Thu, 4 Mar 2021 19:55:47 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9ABCF60C0F; Thu, 4 Mar 2021 19:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614887756; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lba0DRaxXeOQHw4VsafG5UOKPFUjkiw4TSEUQt3zkqo=; b=aBoehP0HvARPp2sTMo9nQ/hA9DyLqRJVEu4mlhnaCy6fnO2qNQ7fpBbCz1d/cL7RSkpLiu iR2bOem7lypNpVGKLIXyU5UoiCXvviNA6Ij8qHb84cAKQYVroEx0x7fH9zRvaLZzr5aLE4 zNnfdfmbBDyodzGbCHjx8NI+cV/0rzk= X-MC-Unique: v4_3bxApOeuLB6gl-ssbzg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] docs: Document qemu.conf locations Date: Thu, 4 Mar 2021 20:55:19 +0100 Message-Id: <817a55532a56bee8c12fff8bcce8e1f6e8f032d3.1614887668.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: vromanso@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Surprisingly, we never documented the relationship between connection URI and the location of qemu.conf. Users might wonder what qemu.conf is loaded when they are connecting to the session daemon or embed URI. And what to do if the file doesn't exist for the URI they're using. Signed-off-by: Michal Privoznik --- docs/drvqemu.html.in | 39 +++++++++++++++++++++++++++++++++++++ docs/manpages/libvirtd.rst | 20 +++++++++++++++++++ docs/manpages/virtqemud.rst | 22 +++++++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in index 31d3fee213..a784f5768c 100644 --- a/docs/drvqemu.html.in +++ b/docs/drvqemu.html.in @@ -162,6 +162,45 @@ qemu+ssh://root@example.com/system (remote access, S= SH tunnelled) of libvirt, once QMP processing moves to a dedicated thread.

=20 +

Location of configuration files

+ +

+ The QEMU driver comes with sane default values. However, during its + initialization it reads a configuration file which offers system + administrator or an user to override some of that default. The locat= ion + of the file depends on the connection URI, as follows: +

+ + + + + + + + + + + + + + +
qemu:///system/etc/libvirt/qemu.conf
qemu:///session$XDG_CONFIG_HOME/libvirt/qemu.conf
qemu:///embed$rootdir/etc/qemu.conf
+ +

+ If $XDG_CONFIG_HOME is not set in the environment, it + defaults to $HOME/.config. For the embed URI the + $rootdir represents the specified root directory from + the connection URI. +

+ +

+ Please note, that it is very likely that the only qemu.conf file that + will exist after installing libvirt is the + /etc/libvirt/qemu.conf, if users of the session daemon = or + the embed driver want to override a built in value, then they need to + create the file before connecting to the respective URI. +

+

Driver security architecture

=20

diff --git a/docs/manpages/libvirtd.rst b/docs/manpages/libvirtd.rst index ed591f4778..6545dc58d3 100644 --- a/docs/manpages/libvirtd.rst +++ b/docs/manpages/libvirtd.rst @@ -136,6 +136,16 @@ When run as *root* The default configuration file used by ``libvirtd``, unless overridden on = the command line using the ``-f`` | ``--config`` option. =20 +If QEMU driver is installed, then the following file is also read: + +* ``@SYSCONFDIR@/libvirt/qemu.conf`` + +This file contains various knobs and default values for virtual machines +created within QEMU driver, and offers a way to override the built in defa= ults, +for instance (but not limited to): paths to various supplementary binaries= , TLS +certificates location, graphical consoles configuration and others. Locati= on of +this file can't be overridden by any command line switch. + * ``@RUNSTATEDIR@/libvirt/libvirt-sock`` * ``@RUNSTATEDIR@/libvirt/libvirt-sock-ro`` =20 @@ -166,6 +176,16 @@ When run as *non-root* The default configuration file used by ``libvirtd``, unless overridden on = the command line using the ``-f``|``--config`` option. =20 +If QEMU driver is installed, then the following file is also read: + +* ``$XDG_CONFIG_HOME/libvirt/qemu.conf`` + +If the file exists, it can contain various knobs and default values for vi= rtual +machines created within QEMU driver, and offers a way to override the buil= t in +defaults, for instance (but not limited to): paths to various supplementary +binaries, TLS certificates location, graphical consoles configuration and +others. Location of this file can't be overridden by any command line swit= ch. + * ``$XDG_RUNTIME_DIR/libvirt/libvirt-sock`` =20 The socket ``libvirtd`` will use. diff --git a/docs/manpages/virtqemud.rst b/docs/manpages/virtqemud.rst index fbcc6e45fa..d82d09ee61 100644 --- a/docs/manpages/virtqemud.rst +++ b/docs/manpages/virtqemud.rst @@ -111,6 +111,17 @@ When run as *root* The default configuration file used by ``virtqemud``, unless overridden on= the command line using the ``-f`` | ``--config`` option. =20 +In addition to the default configuration file, ``virtqemud`` reads +configuration for the qemu driver from: + +* ``@SYSCONFDIR@/libvirt/qemu.conf`` + +This file contains various knobs and default values for virtual machines +created within QEMU driver, and offers a way to override the built in defa= ults, +for instance (but not limited to): paths to various supplementary binaries= , TLS +certificates location, graphical consoles configuration and others. Locati= on of +this file can't be overridden by any command line switch. + * ``@RUNSTATEDIR@/libvirt/virtqemud-sock`` * ``@RUNSTATEDIR@/libvirt/virtqemud-sock-ro`` * ``@RUNSTATEDIR@/libvirt/virtqemud-admin-sock`` @@ -132,6 +143,17 @@ When run as *non-root* The default configuration file used by ``virtqemud``, unless overridden on= the command line using the ``-f``|``--config`` option. =20 +In addition to the default configuration file, ``virtqemud`` reads +configuration for the qemu driver from: + +* ``$XDG_CONFIG_HOME/libvirt/qemu.conf`` + +If the file exists, it can contain various knobs and default values for vi= rtual +machines created within QEMU driver, and offers a way to override the buil= t in +defaults, for instance (but not limited to): paths to various supplementary +binaries, TLS certificates location, graphical consoles configuration and +others. Location of this file can't be overridden by any command line swit= ch. + * ``$XDG_RUNTIME_DIR/libvirt/virtqemud-sock`` * ``$XDG_RUNTIME_DIR/libvirt/virtqemud-admin-sock`` =20 --=20 2.26.2