fix #3004: show progress of offline migration in task log

dd supports a 'status' flag, which enables it to show the copied bytes,
duration, and the transfer rate, which then get printed to stderr.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
This commit is contained in:
Leo Nunner
2023-08-31 12:41:59 +02:00
committed by Thomas Lamprecht
parent 122ccde412
commit aa82ad5c25
3 changed files with 18 additions and 5 deletions

View File

@ -645,7 +645,7 @@ sub volume_export {
$size = int($1);
});
PVE::Storage::Plugin::write_common_header($fh, $size);
run_command(['dd', "if=$file", "bs=64k"], output => '>&'.fileno($fh));
run_command(['dd', "if=$file", "bs=64k", "status=progress"], output => '>&'.fileno($fh));
}
sub volume_import_formats {