all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Michal Fox <me@dualfroz.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server] fix #6744: migrate: log the size of found local disks
Date: Wed, 25 Nov 2026 07:46:53 +0000	[thread overview]
Message-ID: <20261125074653.7-1-me@dualfroz.com> (raw)

The migration log lists the local disks it is going to copy, but not how
big they are. When disks are copied offline, the progress output only
reports the amount of data already transferred, so it is not possible to
estimate how long the copy will take. The size is already queried for
each local volume, so include it in the overview of found disks.

Signed-off-by: Michal Fox <me@dualfroz.com>
---
ran make test, the migration test logs now show the disk sizes

 src/PVE/QemuMigrate.pm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index d574f0c..1a44f9e 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -552,20 +552,21 @@ sub scan_local_volumes {
         foreach my $vol (sort keys %$local_volumes) {
             my $type = $replicatable_volumes->{$vol} ? 'local, replicated' : 'local';
             my $ref = $local_volumes->{$vol}->{ref};
+            my $size = render_bytes($local_volumes->{$vol}->{size}, 1);
             if ($ref eq 'attached') {
                 &$log_error(
                     "can't live migrate attached local disks without with-local-disks option\n",
                     $vol,
                 ) if $self->{running} && !$self->{opts}->{"with-local-disks"};
-                $self->log('info', "found $type disk '$vol' (attached)\n");
+                $self->log('info', "found $type disk '$vol' (attached, $size)\n");
             } elsif ($ref eq 'unused') {
-                $self->log('info', "found $type disk '$vol' (unused)\n");
+                $self->log('info', "found $type disk '$vol' (unused, $size)\n");
             } elsif ($ref eq 'snapshot') {
-                $self->log('info', "found $type disk '$vol' (referenced by snapshot(s))\n");
+                $self->log('info', "found $type disk '$vol' (referenced by snapshot(s), $size)\n");
             } elsif ($ref eq 'pending') {
-                $self->log('info', "found $type disk '$vol' (pending change)\n");
+                $self->log('info', "found $type disk '$vol' (pending change, $size)\n");
             } elsif ($ref eq 'generated') {
-                $self->log('info', "found generated disk '$vol' (in current VM config)\n");
+                $self->log('info', "found generated disk '$vol' (in current VM config, $size)\n");
             } else {
                 $self->log('info', "found $type disk '$vol'\n");
             }
-- 
2.43.0




                 reply	other threads:[~2026-11-25  7:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261125074653.7-1-me@dualfroz.com \
    --to=me@dualfroz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal