[pve-devel] [PATCH v2 qemu-server 2/3] migrate: add replication info to disk overview
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Mar 17 08:55:26 CET 2020
to make migration logs a bit easier to grasp with a quick glance.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
Notes:
unchanged since v1
PVE/QemuMigrate.pm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 44e4c57..d874760 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -323,6 +323,8 @@ sub sync_disks {
});
}
+ my $replicatable_volumes = PVE::QemuConfig->get_replicatable_volumes($self->{storecfg}, $self->{vmid}, $conf);
+
my $test_volid = sub {
my ($volid, $attr) = @_;
@@ -396,19 +398,20 @@ sub sync_disks {
});
foreach my $vol (sort keys %$local_volumes) {
+ my $type = $replicatable_volumes->{$vol} ? 'local, replicated' : 'local';
my $ref = $local_volumes->{$vol}->{ref};
if ($ref eq 'storage') {
- $self->log('info', "found local disk '$vol' (via storage)\n");
+ $self->log('info', "found $type disk '$vol' (via storage)\n");
} elsif ($ref eq 'config') {
&$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 local disk '$vol' (in current VM config)\n");
+ $self->log('info', "found $type disk '$vol' (in current VM config)\n");
} elsif ($ref eq 'snapshot') {
- $self->log('info', "found local disk '$vol' (referenced by snapshot(s))\n");
+ $self->log('info', "found $type disk '$vol' (referenced by snapshot(s))\n");
} elsif ($ref eq 'generated') {
$self->log('info', "found generated disk '$vol' (in current VM config)\n");
} else {
- $self->log('info', "found local disk '$vol'\n");
+ $self->log('info', "found $type disk '$vol'\n");
}
}
--
2.20.1
More information about the pve-devel
mailing list