public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
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	[thread overview]
Message-ID: <20260807120034.153126-1-f.ebner@proxmox.com> (raw)

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





             reply	other threads:[~2026-08-07 12:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 11:59 Fiona Ebner [this message]
2026-08-07 12:13 ` [PATCH qemu-server] api: create disks: use correct volume name for cloudinit on a snapshot-as-volume-chain storage Max R. Carrara
2026-08-07 12:17   ` Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260807120034.153126-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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