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 A32491FF0E6 for ; Fri, 07 Aug 2026 14:00:42 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 05DEC2154A; Fri, 07 Aug 2026 14:00:42 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server] api: create disks: use correct volume name for cloudinit on a snapshot-as-volume-chain storage Date: Fri, 7 Aug 2026 13:59:13 +0200 Message-ID: <20260807120034.153126-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786104029652 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.939 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: RRPNXKJRGTOABA7PD3ZBSP73SZCG6BIB X-Message-ID-Hash: RRPNXKJRGTOABA7PD3ZBSP73SZCG6BIB X-MailFrom: f.ebner@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: 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 --- 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 = $disk->{format} // "qcow2"; $name .= ".$fmt"; + } elsif ($scfg->{'snapshot-as-volume-chain'}) { + $fmt = $disk->{format} // "qcow2"; + $name .= ".$fmt" if $fmt eq 'qcow2'; } else { $fmt = $disk->{format} // "raw"; } -- 2.47.3