From nobody Sun Feb 8 15:30:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1647876363; cv=none; d=zohomail.com; s=zohoarc; b=d5ZakffrifR41nEzwJCVzFSRBBRlyawiseJAioDfncjUP8zsgwnJLGckJ1YWoXycHKHfqDgGcXwUGIO6ZnU7IuQfk9I8kf8hdKyQI4hGvOVVmxXGIC7Iuis9FxdUu13jRqL4mm8yF0Ro1XS1Ygvl9cz8X7emSP/kdDjYXhhLBIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647876363; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8uRZUFUDCZUy3hUSxn1la1FPW3c5CWRPXNnx0xBXS7Y=; b=Jd91x65h+8dbVF/xsoayrAKC3uAM0F7PLcTWCfnyn0aHO0lTq51RCWLpEwXEwJXpuzKA4hh1G2QbGbhkZRGEceB9WUTrll9m03Mtw6un8G3N8w/ZBnzFzQDfgPk2F9F7EHr8nLsVXJ66peICvnpCuIEh/zXgG64dC+sA+RhzjNY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1647876363702260.9406600435344; Mon, 21 Mar 2022 08:26:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-57-hwsPWAEFNH6DZP3l7zBIeg-1; Mon, 21 Mar 2022 11:24:51 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F05723C00131; Mon, 21 Mar 2022 15:24:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D54FA145BEEA; Mon, 21 Mar 2022 15:24:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 09CF9193F6E6; Mon, 21 Mar 2022 15:24:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 074611940348 for ; Mon, 21 Mar 2022 15:24:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EB4A441D3ED; Mon, 21 Mar 2022 15:24:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 690F240F06A for ; Mon, 21 Mar 2022 15:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647876362; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8uRZUFUDCZUy3hUSxn1la1FPW3c5CWRPXNnx0xBXS7Y=; b=c2+/k9T39tQ2lhSwaTo87tx6fdFmyCUndkeLE2uBFNCC53l+WKD+S8S9TOd98+tQkSgAyM Ecbo5SH3d9gwkLu9Tk40sLVZcteDKJwXniLg6E2vBckDz1+uVZuS1YRMZlo0DS6TEAbzfp vvcGjLW9yknUDzTEIORV44gToxqTGLQ= X-MC-Unique: hwsPWAEFNH6DZP3l7zBIeg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/7] docs: drvqemu: Document overriding of device properties Date: Mon, 21 Mar 2022 16:24:35 +0100 Message-Id: <922dafeb8fd64b51103411fcd5b35dab9bbebe3f.1647876193.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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) X-ZM-MESSAGEID: 1647876365488100001 Content-Type: text/plain; charset="utf-8" Upcoming patches will add possibility to override configuration of a device with custom properties as a more versatile replacement to using QEMU's '-set' parameter, which doesn't work when we use JSON to instantiate devices. Describe the XML used for the override as well as expectations of upstream support in case something breaks. Signed-off-by: Peter Krempa --- docs/drvqemu.rst | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/docs/drvqemu.rst b/docs/drvqemu.rst index 9d7dd2656b..b13415936c 100644 --- a/docs/drvqemu.rst +++ b/docs/drvqemu.rst @@ -580,6 +580,58 @@ reconfigure libvirtd. *DO NOT* use in production. +Overriding properties of QEMU devices +------------------------------------- + +For development or testing the ```` tag allows to ove= rride +specific properties of devices instantiated by libvirt in QEMU via the +``-device`` argument. + +The ```` sub-element groups overrides for a device identified= via +the ``alias`` attribute. The alias corresponds to the ```` +property of a device. It's strongly recommended to use user-specified alia= ses +for devices with overriden properties. + +The individual properties are overriden by a ```` element. = The +``name`` specifies the name of the property to override. In case when libv= irt +doesn't configure the property a property with the name is added to the +commandline. The ``type`` attribute specifies a type of the argument used.= The +type must correspond with the type that is expected by QEMU. Supported val= ues +for the type attribute are: ``string``, ``number``, ``bool`` (allowed valu= es for +``bool`` are ``true`` and ``false``) and ``remove``. The ``remove`` type is +special and instructs libvirt to remove the property without replacement. + +The overrides are applied only to initial device configuration passed to Q= EMU +via the commandline. Later hotplug operations will not apply any modificat= ions. + +Configuring override for a device alias which is not used or attempting to +remove a device property which is not formatted by libvirt will cause fail= ure +to startup the VM. + +*Note:* The libvirt project doesn't guarantee any form of compatibility and +stability of devices with overriden properties. The domain is tainted when +such configuration is used. + +Example: + +:: + + + testvm + + [...] + + + + + + + + + + + + Example domain XML config ------------------------- --=20 2.35.1