From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A920B1FF0E6 for ; Fri, 07 Aug 2026 14:13:47 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 38AD821549; Fri, 07 Aug 2026 14:13:47 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 07 Aug 2026 14:13:43 +0200 Message-Id: To: "Fiona Ebner" , From: "Max R. Carrara" Subject: Re: [PATCH qemu-server] api: create disks: use correct volume name for cloudinit on a snapshot-as-volume-chain storage X-Mailer: aerc 0.18.2-0-ge037c095a049 References: <20260807120034.153126-1-f.ebner@proxmox.com> In-Reply-To: <20260807120034.153126-1-f.ebner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786104816045 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.747 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: QUAIYXFV5BFY6JVVUFTBI3JWKZSUJVXS X-Message-ID-Hash: QUAIYXFV5BFY6JVVUFTBI3JWKZSUJVXS X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Aug 7, 2026 at 1:59 PM CEST, Fiona Ebner wrote: > The pve-storage commit 05032c5 ("fix #7811: storage: lvm: reject > allocation on format and volume name mismatch") exposed an issue with > handling the name of the cloudinit name on an LVM storage with > snapshot-as-volume-chain. The guest layer passes a fixed name for the > cloudinit drive, but this does not match what the storage layer needs, > because it was missing the .qcow2 extension. Fix the issue by catching > that case. > > This is a stop-gap fix. In the long run, constructing the name should > not be done in the guest layer, rather the storage plugin should be > queried for a valid name first. > > Signed-off-by: Fiona Ebner > --- Just gave this a spin and can confirm that it works as expected. Before applying this patch, the LVM storage w/ SaVC enabled refused the cloudinit drive ('does not match requested format "qcow2"') -- with the patch applied, the cloudinit drive can be added again without issues. Unless there's something I have missed, this LGTM. Nice job! Consider: Tested-by: Max R. Carrara > src/PVE/API2/Qemu.pm | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm > index 39c725d0..3320313c 100644 > --- a/src/PVE/API2/Qemu.pm > +++ b/src/PVE/API2/Qemu.pm > @@ -495,6 +495,9 @@ my sub create_disks : prototype($$$$$$$$$$$) { > if ($scfg->{path}) { > $fmt =3D $disk->{format} // "qcow2"; > $name .=3D ".$fmt"; > + } elsif ($scfg->{'snapshot-as-volume-chain'}) { > + $fmt =3D $disk->{format} // "qcow2"; > + $name .=3D ".$fmt" if $fmt eq 'qcow2'; > } else { > $fmt =3D $disk->{format} // "raw"; > }