public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Max R. Carrara" <m.carrara@proxmox.com>
To: "Fiona Ebner" <f.ebner@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH qemu-server] api: create disks: use correct volume name for cloudinit on a snapshot-as-volume-chain storage
Date: Fri, 07 Aug 2026 14:13:43 +0200	[thread overview]
Message-ID: <DKIPBGFQLDE0.R11UYN5D9AWW@proxmox.com> (raw)
In-Reply-To: <20260807120034.153126-1-f.ebner@proxmox.com>

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

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 <m.carrara@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";
>              }





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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=DKIPBGFQLDE0.R11UYN5D9AWW@proxmox.com \
    --to=m.carrara@proxmox.com \
    --cc=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