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 1/2] migration: local volume: abort early when size or format cannot be determined
Date: Mon,  1 Jun 2026 16:55:01 +0200	[thread overview]
Message-ID: <20260601145528.285536-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260601145528.285536-1-f.ebner@proxmox.com>

Part of the issue in bug #7554 is that an offline volume migration
will continue even if the size and format cannot be determined. Not
having the format would lead to the 'with-snapshots' parameter not
being set, despite the format being qcow2 and so the migration would
wrongly continue with raw+size as the stream format. If
'with-snapshots' were set, the plugin would correctly report that
there is no possible transfer format (the same restriction is present
in file-based storages with snapshot-as-volume-chain currently).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuMigrate.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index d4de9f87..6b563343 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -451,6 +451,10 @@ sub scan_local_volumes {
 
             $local_volumes->{$volid}->@{qw(size format)} =
                 PVE::Storage::volume_size_info($storecfg, $volid);
+            die "unable to determine size for volume '$volid'\n"
+                if !defined($local_volumes->{$volid}->{size});
+            die "unable to determine format for volume '$volid'\n"
+                if !defined($local_volumes->{$volid}->{format});
 
             $local_volumes->{$volid}->{is_vmstate} = $attr->{is_vmstate} ? 1 : 0;
             $local_volumes->{$volid}->{is_cloudinit} = $attr->{is_cloudinit} ? 1 : 0;
-- 
2.47.3





  reply	other threads:[~2026-06-01 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 14:55 [PATCH-SERIES qemu-server 0/2] partially fix #7554: avoid incorrectly offline migrating qcow2 on LVM as raw Fiona Ebner
2026-06-01 14:55 ` Fiona Ebner [this message]
2026-06-01 14:55 ` [PATCH qemu-server 2/2] migration: local volume: activate for querying the size (required for qcow2 on LVM) 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=20260601145528.285536-2-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