all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server] fix #6744: migrate: log the size of found local disks
@ 2026-11-25  7:46 Michal Fox
  0 siblings, 0 replies; only message in thread
From: Michal Fox @ 2026-11-25  7:46 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  7:46 [PATCH qemu-server] fix #6744: migrate: log the size of found local disks Michal Fox

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