mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-09 15:47:04 +00:00
migrate: add transfer summary
Showing a final transfer log line helps with identifying what was actually transferred. E.g., it could happen that the VFIO state was only transferred in the last iteration. In such a case we would not see that information at all. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Christoph Heiss <c.heiss@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
09f8d3f19e
commit
abdc7cdd89
@ -1288,6 +1288,20 @@ sub phase2 {
|
|||||||
my $downtime = $stat->{downtime} || 0;
|
my $downtime = $stat->{downtime} || 0;
|
||||||
$self->log('info', "average migration speed: $avg_speed/s - downtime $downtime ms");
|
$self->log('info', "average migration speed: $avg_speed/s - downtime $downtime ms");
|
||||||
}
|
}
|
||||||
|
my $trans = $memstat->{transferred} || 0;
|
||||||
|
my $vfio_transferred = $stat->{vfio}->{transferred} || 0;
|
||||||
|
|
||||||
|
if ($trans > 0 || $vfio_transferred > 0) {
|
||||||
|
my $transferred_h = render_bytes($trans, 1);
|
||||||
|
my $summary = "transferred $transferred_h VM-state";
|
||||||
|
|
||||||
|
if ($vfio_transferred > 0) {
|
||||||
|
my $vfio_h = render_bytes($vfio_transferred, 1);
|
||||||
|
$summary .= " (+ $vfio_h VFIO-state)";
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->log('info', "migration $status, $summary");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($status eq 'failed' || $status eq 'cancelled') {
|
if ($status eq 'failed' || $status eq 'cancelled') {
|
||||||
|
Loading…
Reference in New Issue
Block a user