public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server] api: create disks: use correct volume name for cloudinit on a snapshot-as-volume-chain storage
@ 2026-08-07 11:59 Fiona Ebner
  2026-08-07 12:13 ` Max R. Carrara
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2026-08-07 11:59 UTC (permalink / raw)
  To: pve-devel

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 <f.ebner@proxmox.com>
---
 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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-07 12:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 11:59 [PATCH qemu-server] api: create disks: use correct volume name for cloudinit on a snapshot-as-volume-chain storage Fiona Ebner
2026-08-07 12:13 ` Max R. Carrara
2026-08-07 12:17   ` Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal