From nobody Sat Apr 27 00:16:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1578675460; cv=none; d=zohomail.com; s=zohoarc; b=ZoOdyEvTjM5IvODxn64AkRV0DQGEPPbaIXpVTxKk03yCLFsd2kXpOpIq9AUetZV0TbsgMCj4ud/XhgX9SFmorD3gofoK2GaMfv0PSzBtC8sb54hU2s/6nXNMdvEfoCgbsslBUMat2Lm1CTJOE8TzeI9NA0bFnzuRqlCTJgYTHps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578675460; 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=Sz1UD6uTi7EftRLsNBsP5W2eQD9SinUlp/hpVLXJUkE=; b=JrTqX0v356ZRxbqE2aTkMFGmeWCoOLP5fmRd0SOcBqdugl5AGeLpjlKGbeCVatXlczoI+7ivvIAD7g3SxlORPt4z0xxOB8DYvmx9XE318rQyc8sOPlJe5lyr6LXyUf74GDk+gLp0h2wDSpug1pjKVoXli70OMfJBPw30e8Xs7GQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1578675460064312.743117239859; Fri, 10 Jan 2020 08:57:40 -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-150-AMmy0aedNrC-lPW9_nnhEw-1; Fri, 10 Jan 2020 11:57:36 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61F9E1800D71; Fri, 10 Jan 2020 16:57:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 55CC210016EB; Fri, 10 Jan 2020 16:57:30 +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 F1216503A9; Fri, 10 Jan 2020 16:57:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00AGvQ3V027177 for ; Fri, 10 Jan 2020 11:57:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id B38F186CA0; Fri, 10 Jan 2020 16:57:26 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C4F484665 for ; Fri, 10 Jan 2020 16:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578675458; 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=Sz1UD6uTi7EftRLsNBsP5W2eQD9SinUlp/hpVLXJUkE=; b=dp/oCQEZghyAndie3uP2ZKphrKW/EfUeI0q6YYH2l5VtaV9oDCo2jsUNaCYwJwW9uhAgzZ cRlUMUGo4uWrCBc2gaK0yjTFl/D4kJrAhZ0YvbRxxZhUDvDFfUGRLYo4a4gRZj2K15leSf 2l03elxCBc9T+wAXxqYXydDvuGjOlkI= From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 10 Jan 2020 17:57:19 +0100 Message-Id: <36278779cd493b655c747554f8a8db76392d3406.1578675322.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] tests: qemuxml2argv: Add disk image with encrypted backing file 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.84 on 10.5.11.22 X-MC-Unique: AMmy0aedNrC-lPW9_nnhEw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add another disk to luks-disks-source-qcow2 case to cover a backing chain with encrypted members. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- .../luks-disks-source-qcow2.args | 8 ++++++++ .../luks-disks-source-qcow2.xml | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/tests/qemuxml2argvdata/luks-disks-source-qcow2.args b/tests/qe= muxml2argvdata/luks-disks-source-qcow2.args index 2ccdb7e49f..ab1c864cf6 100644 --- a/tests/qemuxml2argvdata/luks-disks-source-qcow2.args +++ b/tests/qemuxml2argvdata/luks-disks-source-qcow2.args @@ -69,4 +69,12 @@ encrypt.key-secret=3Dvirtio-disk4-luks-secret0,format=3D= qcow2,if=3Dnone,\ id=3Ddrive-virtio-disk4' \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x8,drive=3Ddrive-virtio-disk4,\ id=3Dvirtio-disk4 \ +-object secret,id=3Dvirtio-disk5-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file=3D/storage/guest_disks/encryptdisk5,encrypt.format=3Dluks,\ +encrypt.key-secret=3Dvirtio-disk5-luks-secret0,format=3Dqcow2,if=3Dnone,\ +id=3Ddrive-virtio-disk5 \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x9,drive=3Ddrive-virtio-disk5,\ +id=3Dvirtio-disk5 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/luks-disks-source-qcow2.xml b/tests/qem= uxml2argvdata/luks-disks-source-qcow2.xml index 92b31fb8bd..4dacc79ff4 100644 --- a/tests/qemuxml2argvdata/luks-disks-source-qcow2.xml +++ b/tests/qemuxml2argvdata/luks-disks-source-qcow2.xml @@ -68,6 +68,24 @@ + + + + + + + + + + + + + + + + + +
--=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 00:16:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1578675468; cv=none; d=zohomail.com; s=zohoarc; b=ABRtNk/RobIgRaRKEVz/VxWwachQzrtb1WCUtfACE+giBM50tal3cD5/s4LbXw3y4gwvJyYQf4k9NWO1Mzw77I14kiXZNdS/8clTsRR+Dy+p5Oev4/bl53/Q51IXcFR5Yttkv2GLs//qxCr7x+PO2tPOYQWnbM//IW7gB6Bc9Js= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578675468; 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=wvgXsYS4UF5cgq9nonXqYX/lqN+tiLqOD6pt5R7Y7eg=; b=eozhQTdeLAbcjr2xoD61mSgZPbQKUzsnEFGDQAsCupsY4IlGsCgckgmKA62ymg4sUdi3eTC1NhyBzfEb7ecGCYuForpN67fTeCnb2gs0s2tL5O1UwxJYNWPUl0wTb9iU4KtdScp9doVr4JcZXk/cStjzBG+7flxEMc7bS6L9+u4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578675468978395.1463324313801; Fri, 10 Jan 2020 08:57:48 -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-417-K__1UmpEPIWcCQtPl9Jpfg-1; Fri, 10 Jan 2020 11:57:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BAE3ADBA5; Fri, 10 Jan 2020 16:57:40 +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 93AD660FC2; Fri, 10 Jan 2020 16:57:40 +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 548DF18089D0; Fri, 10 Jan 2020 16:57:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00AGvRRG027186 for ; Fri, 10 Jan 2020 11:57:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 82A5386CA0; Fri, 10 Jan 2020 16:57:27 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C43084665 for ; Fri, 10 Jan 2020 16:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578675467; 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=wvgXsYS4UF5cgq9nonXqYX/lqN+tiLqOD6pt5R7Y7eg=; b=i1A6gyFF7WGbuuZ3BdfqpDZ0dMl7GbuxwCAmA5a1c95OfBltNSrDiMEFnhbOYoRpUwxN5X o6myDtlixHoyNDl7fM9ra3B6dYJqI4RMOyq0TucHpASCs9sfCRtEieUKbPHwSlsxLLBnmU nkMA6YEaPrJmYsAuL4FRVLfMWgjxcew= From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 10 Jan 2020 17:57:20 +0100 Message-Id: <8fb46a35c0c0e62c1996339ea7bd230a1da262b2.1578675322.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/4] tests: qemuxml2argv: Run luks-disks-source-qcow2 case with latest caps 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.12 X-MC-Unique: K__1UmpEPIWcCQtPl9Jpfg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Try also the modern incarnation of the test. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- ...luks-disks-source-qcow2.x86_64-latest.args | 110 ++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 111 insertions(+) create mode 100644 tests/qemuxml2argvdata/luks-disks-source-qcow2.x86_64-l= atest.args diff --git a/tests/qemuxml2argvdata/luks-disks-source-qcow2.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/luks-disks-source-qcow2.x86_64-latest.args new file mode 100644 index 0000000000..021bcb6961 --- /dev/null +++ b/tests/qemuxml2argvdata/luks-disks-source-qcow2.x86_64-latest.args @@ -0,0 +1,110 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-encryptdisk \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-encryptdisk/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-encryptdisk/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-encryptdisk/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dencryptdisk,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-encryptdisk/master-key.aes \ +-machine pc-i440fx-2.1,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu qemu64 \ +-m 1024 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-object secret,id=3Dlibvirt-7-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"file","filename":"/storage/guest_disks/encryptdisk",\ +"node-name":"libvirt-7-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-7-format","read-only":false,"driver":"qco= w2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-7-format-luks-secret0"},\ +"file":"libvirt-7-storage"}' \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,drive=3Dlibvirt-7= -format,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-object secret,id=3Dlibvirt-6-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"file","filename":"/storage/guest_disks/encryptdisk2"= ,\ +"node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"qco= w2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-6-format-luks-secret0"},\ +"file":"libvirt-6-storage"}' \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x5,drive=3Dlibvirt-6= -format,\ +id=3Dvirtio-disk1 \ +-object secret,id=3Dlibvirt-5-storage-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-object secret,id=3Dlibvirt-5-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"iscsi","portal":"example.org:6000",\ +"target":"iqn.1992-01.com.example:storage","lun":1,"transport":"tcp",\ +"user":"myname","password-secret":"libvirt-5-storage-secret0",\ +"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-5-format","read-only":false,"driver":"qco= w2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-5-format-luks-secret0"},\ +"file":"libvirt-5-storage"}' \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x2,drive=3Dlibvirt-5= -format,\ +id=3Dvirtio-disk2 \ +-object secret,id=3Dlibvirt-4-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"iscsi","portal":"iscsi.example.com:3260",\ +"target":"demo-target","lun":3,"transport":"tcp",\ +"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"qco= w2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-4-format-luks-secret0"},\ +"file":"libvirt-4-storage"}' \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x6,drive=3Dlibvirt-4= -format,\ +id=3Dvirtio-disk3 \ +-object secret,id=3Dlibvirt-3-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"rbd","pool":"pool","image":"image",\ +"server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.= org",\ +"port":"6322"},{"host":"mon3.example.org","port":"6322"}],\ +"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"qco= w2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-3-format-luks-secret0"},\ +"file":"libvirt-3-storage"}' \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x7,drive=3Dlibvirt-3= -format,\ +id=3Dvirtio-disk4 \ +-object secret,id=3Dlibvirt-2-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"file","filename":"/storage/guest_disks/base.qcow2",\ +"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"qcow= 2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-2-format-luks-secret0"},\ +"file":"libvirt-2-storage","backing":null}' \ +-object secret,id=3Dlibvirt-1-format-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-blockdev '{"driver":"file","filename":"/storage/guest_disks/encryptdisk5"= ,\ +"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2",\ +"encrypt":{"format":"luks","key-secret":"libvirt-1-format-luks-secret0"},\ +"file":"libvirt-1-storage","backing":"libvirt-2-format"}' \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x8,drive=3Dlibvirt-1= -format,\ +id=3Dvirtio-disk5 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8af2ba38d3..47c35f0b91 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1757,6 +1757,7 @@ mymain(void) DO_TEST("luks-disks-source", QEMU_CAPS_OBJECT_SECRET); DO_TEST_PARSE_ERROR("luks-disks-source-qcow2", QEMU_CAPS_OBJECT_SECRET= ); DO_TEST("luks-disks-source-qcow2", QEMU_CAPS_OBJECT_SECRET, QEMU_CAPS_= QCOW2_LUKS); + DO_TEST_CAPS_LATEST("luks-disks-source-qcow2"); DO_TEST_PARSE_ERROR("luks-disk-invalid", NONE); DO_TEST_PARSE_ERROR("luks-disks-source-both", QEMU_CAPS_OBJECT_SECRET); --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 00:16:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1578675460; cv=none; d=zohomail.com; s=zohoarc; b=WjgxwH0QkdFNjlxfJvfFOHGsdh6+lbRNIcL0+lUDETMZkQJGPoYuYPfRL8nWpfvYWRRNZ9mB6swg5INpUkR2kQ4ziv+ynGKO+fN64ui1UM3gihq0fgy7esJ9MnYlGniFK1tgcLy73MRNPbRSgIJuqaGJPGbVNxVfRcqQgcixQio= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578675460; 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=JPNzyzxRYIAkF7/R3wSd5ynWkfVLNQHwAd9ZzOSKZw4=; b=WCH7zRMIpKD8AfyABViwrQpKHG7he6chDeaRl9bhpos9UdnnQPOjVNunxBM5C4cGWLci63KTxzJavt8qxH2SVuZC1z6NyQDotxCHa0Nb2QABN6pCq7y+9WAU0EYYmKnBXZFOT77V0jZ6WUiho7fda0Rz0bRcJOWPIrDN11NYXLM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578675460600400.3335929286052; Fri, 10 Jan 2020 08:57:40 -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-201-UWgNrCjAP8q4xbBeHda8FQ-1; Fri, 10 Jan 2020 11:57:36 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81EF7800D41; Fri, 10 Jan 2020 16:57:31 +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 4ABC560C84; Fri, 10 Jan 2020 16:57:31 +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 4354718089CD; Fri, 10 Jan 2020 16:57:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00AGvSVU027197 for ; Fri, 10 Jan 2020 11:57:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5286A84665; Fri, 10 Jan 2020 16:57:28 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFAE886CA7 for ; Fri, 10 Jan 2020 16:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578675459; 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=JPNzyzxRYIAkF7/R3wSd5ynWkfVLNQHwAd9ZzOSKZw4=; b=Pr47Cj4caKRzge25EHEgWHckQ5EMU3qWuVp5LJR9t6fYd2ep6NmiSl3rGb3/AuBXCzlXib KD0g7hwruo4MuP/sV6x6VHQp9nv11jU8xLF8zhd9rvmrO/aGgNAtfEc/s1wpjFc3eP4Ew5 MV1dBaFF+qf8CZqWs81BMONJuuKNTAw= From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 10 Jan 2020 17:57:21 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] tests: qemuxml2xml: Enable luks-disks-source-qcow2 case 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.12 X-MC-Unique: UWgNrCjAP8q4xbBeHda8FQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The test data was used only in xml->argv testing but it will have some interresting fallout soon. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- .../luks-disks-source-qcow2.x86_64-latest.xml | 102 ++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 2 files changed, 103 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64= -latest.xml diff --git a/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest= .xml b/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest.xml new file mode 100644 index 0000000000..33e6d02976 --- /dev/null +++ b/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest.xml @@ -0,0 +1,102 @@ + + encryptdisk + 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 + 1048576 + 524288 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 262fc835f5..33580f1a85 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -524,6 +524,7 @@ mymain(void) DO_TEST("encrypted-disk-usage", QEMU_CAPS_QCOW2_LUKS); DO_TEST("luks-disks", NONE); DO_TEST("luks-disks-source", NONE); + DO_TEST_CAPS_LATEST("luks-disks-source-qcow2"); DO_TEST("memtune", NONE); DO_TEST("memtune-unlimited", NONE); DO_TEST("blkiotune", NONE); --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 00:16:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1578675546; cv=none; d=zohomail.com; s=zohoarc; b=A4YYIYSqyU0aMO0wLy7Zgbszaro7wo5S6pNi3oj8K8ao+KgsyirqWjJymZfzE9J86ZzhCEuMJcBWhfQtdhqaIvDe875KWlyn1rC+BkQYf80VKYIkMvEKY+XDjY5pLi/FGruNgB1W+V+N39to4AlAwZU5kE+EiQibC/rqwLQcJIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578675546; 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=BA5m2u0Uw1LXCf4+NQ1l5X6q0nSmzy6Qq3BfW2qEv8Y=; b=MfpBJ75bLl1Nh4Tfw4vo5Iw9uLYzWHmeY67qTVf+hJST1mPImyyFFdWXRDcWNtpsSzYGfCcLIzQYbGPcPZhFhwgL5vqRaOiGh10kwfNGX4oJZhPtK58cvlKtpEuhRDj5LUjFLgfbw0GRBYWIplaOoSH9d20+DEw9tOXgsDfNmig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1578675546294547.5191774530774; Fri, 10 Jan 2020 08:59:06 -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-270-vWx9MxUzNQ--ECxwlvmGvg-1; Fri, 10 Jan 2020 11:57:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9BF4107ACC7; Fri, 10 Jan 2020 16:57:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91BAB60E3E; Fri, 10 Jan 2020 16:57:40 +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 530DB503DF; Fri, 10 Jan 2020 16:57:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00AGvTpN027214 for ; Fri, 10 Jan 2020 11:57:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2367D86CA0; Fri, 10 Jan 2020 16:57:29 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id A035884665 for ; Fri, 10 Jan 2020 16:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578675542; 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=BA5m2u0Uw1LXCf4+NQ1l5X6q0nSmzy6Qq3BfW2qEv8Y=; b=awcIl5PE7hA7w65jr9hMOxXx49gOYTQvG4dKgByp4K+LELS4yyRLZBN+O+WkW2xDdY5isq /6ZTx3FU2u7qchKL6Yd4KfoncLq4vb9KJqYAYKLBgERPD5p1eMhHz0OoCGpbt2Fz4QvQ1h KG0WtLmCbu7IWfFhX8DFkVXN01YKd5U= From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 10 Jan 2020 17:57:22 +0100 Message-Id: <7bc44c75d8dc6cd22c0cc2171dc39b061ebd647f.1578675322.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] conf: Always format storage source auth and encryption under for backing files 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.12 X-MC-Unique: vWx9MxUzNQ--ECxwlvmGvg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Historically there are two places where we format authentication and encryption for a disk. The logich which formats it for backing files was flawed though and didn't format it at all. This worked if the image became a backing file through the means of a snapshot but not directly. Force formatting of the source and encryption for any non-disk case to fix the issue. This caused problems in many places as we use the formatter to copy the definition. Effectively any copy lost the secret definition. https://bugzilla.redhat.com/show_bug.cgi?id=3D1789310 https://bugzilla.redhat.com/show_bug.cgi?id=3D1788898 Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- src/conf/backup_conf.c | 2 +- src/conf/domain_conf.c | 13 ++++++++----- src/conf/domain_conf.h | 1 + src/conf/snapshot_conf.c | 2 +- src/qemu/qemu_domain.c | 4 ++-- tests/qemublocktest.c | 2 +- .../luks-disks-source-qcow2.x86_64-latest.xml | 6 +++++- tests/virstoragetest.c | 2 +- 8 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index aa11967d2a..61dc8cd4b2 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -338,7 +338,7 @@ virDomainBackupDiskDefFormat(virBufferPtr buf, virStorageFileFormatTypeToString(disk->s= tore->format)); if (virDomainDiskSourceFormat(&childBuf, disk->store, sourcename, - 0, false, storageSourceFormatFlags, = NULL) < 0) + 0, false, storageSourceFormatFlags, = true, NULL) < 0) return -1; } diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1290241923..ca5bbc3f35 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -24189,6 +24189,8 @@ virDomainDiskSourceFormatPrivateData(virBufferPtr b= uf, * @policy: startup policy attribute value, if necessary * @attrIndex: the 'index' attribute of is formatted if true * @flags: XML formatter flags + * @formatsecrets: Force formatting of and even if they + * were inherited * @xmlopt: XML formatter callbacks * * Formats @src into a element. Note that this doesn't format the @@ -24201,6 +24203,7 @@ virDomainDiskSourceFormat(virBufferPtr buf, int policy, bool attrIndex, unsigned int flags, + bool formatsecrets, virDomainXMLOptionPtr xmlopt) { g_auto(virBuffer) attrBuf =3D VIR_BUFFER_INITIALIZER; @@ -24257,13 +24260,13 @@ virDomainDiskSourceFormat(virBufferPtr buf, * for a volume source type. The information is * kept in the storage pool and would be overwritten anyway. * So avoid formatting it for volumes. */ - if (src->auth && src->authInherited && + if (src->auth && (src->authInherited || formatsecrets) && src->type !=3D VIR_STORAGE_TYPE_VOLUME) virStorageAuthDefFormat(&childBuf, src->auth); /* If we found encryption as a child of , then format it * as we found it. */ - if (src->encryption && src->encryptionInherited && + if (src->encryption && (src->encryptionInherited || formatsecrets) && virStorageEncryptionFormat(&childBuf, src->encryption) < 0) return -1; @@ -24324,7 +24327,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, virBufferAsprintf(&childBuf, "\n", virStorageFileFormatTypeToString(backingStore->forma= t)); if (virDomainDiskSourceFormat(&childBuf, backingStore, "source", 0, fa= lse, - flags, xmlopt) < 0) + flags, true, xmlopt) < 0) return -1; if (virDomainDiskBackingStoreFormat(&childBuf, backingStore, xmlopt, f= lags) < 0) @@ -24486,7 +24489,7 @@ virDomainDiskDefFormatMirror(virBufferPtr buf, virBufferEscapeString(&childBuf, "\n", formatStr); if (virDomainDiskSourceFormat(&childBuf, disk->mirror, "source", 0, tr= ue, - flags, xmlopt) < 0) + flags, true, xmlopt) < 0) return -1; if (virDomainDiskBackingStoreFormat(&childBuf, disk->mirror, xmlopt, f= lags) < 0) @@ -24585,7 +24588,7 @@ virDomainDiskDefFormat(virBufferPtr buf, virStorageAuthDefFormat(buf, def->src->auth); if (virDomainDiskSourceFormat(buf, def->src, "source", def->startupPol= icy, - true, flags, xmlopt) < 0) + true, flags, false, xmlopt) < 0) return -1; /* Don't format backingStore to inactive XMLs until the code for diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 76d6ef8e48..6ae89fa498 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3118,6 +3118,7 @@ int virDomainDiskSourceFormat(virBufferPtr buf, int policy, bool attrIndex, unsigned int flags, + bool formatsecrets, virDomainXMLOptionPtr xmlopt); int diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 2bd4d6a276..37b5c2fdf7 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -818,7 +818,7 @@ virDomainSnapshotDiskDefFormat(virBufferPtr buf, if (disk->src->format > 0) virBufferEscapeString(buf, "\n", virStorageFileFormatTypeToString(disk->src->= format)); - if (virDomainDiskSourceFormat(buf, disk->src, "source", 0, false, 0, + if (virDomainDiskSourceFormat(buf, disk->src, "source", 0, false, 0, t= rue, xmlopt) < 0) return -1; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 1f358544ab..a6dde15bad 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2547,7 +2547,7 @@ qemuDomainObjPrivateXMLFormatBlockjobFormatSource(vir= BufferPtr buf, virStorageTypeToString(src->type), virStorageFileFormatTypeToString(src->format)); - if (virDomainDiskSourceFormat(&childBuf, src, "source", 0, true, xmlfl= ags, xmlopt) < 0) + if (virDomainDiskSourceFormat(&childBuf, src, "source", 0, true, xmlfl= ags, true, xmlopt) < 0) return -1; if (chain && @@ -2746,7 +2746,7 @@ qemuDomainObjPrivateXMLFormatNBDMigrationSource(virBu= fferPtr buf, virStorageFileFormatTypeToString(src->format)); if (virDomainDiskSourceFormat(&childBuf, src, "source", 0, false, - VIR_DOMAIN_DEF_FORMAT_STATUS, xmlopt) < = 0) + VIR_DOMAIN_DEF_FORMAT_STATUS, true, xmlo= pt) < 0) return -1; virXMLFormatElement(buf, "migrationSource", &attrBuf, &childBuf); diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 3e9edb85f0..7ff6a6b17b 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -90,7 +90,7 @@ testBackingXMLjsonXML(const void *args) return -1; } - if (virDomainDiskSourceFormat(&buf, jsonsrc, "source", 0, false, 0, + if (virDomainDiskSourceFormat(&buf, jsonsrc, "source", 0, false, 0, tr= ue, NULL) < 0 || !(actualxml =3D virBufferContentAndReset(&buf))) { fprintf(stderr, "failed to format disk source xml\n"); diff --git a/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest= .xml b/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest.xml index 33e6d02976..aa13fe5dfa 100644 --- a/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest.xml @@ -83,7 +83,11 @@ - + + + + + diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 0e274ad1b7..2862758752 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -612,7 +612,7 @@ testBackingParse(const void *args) return -1; } - if (virDomainDiskSourceFormat(&buf, src, "source", 0, false, 0, NULL) = < 0 || + if (virDomainDiskSourceFormat(&buf, src, "source", 0, false, 0, true, = NULL) < 0 || !(xml =3D virBufferContentAndReset(&buf))) { fprintf(stderr, "failed to format disk source xml\n"); return -1; --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list