[pve-devel] [qemu-server 5/5] PVE/QemuMigrate.pm - use PVE::QemuServer::foreach_volid
Wolfgang Link
w.link at proxmox.com
Tue Jun 13 10:38:55 CEST 2017
See comment inline.
On 06/13/2017 08:38 AM, Dietmar Maurer wrote:
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
> PVE/QemuMigrate.pm | 42 +++++++++++++++++-------------------------
> 1 file changed, 17 insertions(+), 25 deletions(-)
>
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 22c0d7d..2527cba 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -269,9 +269,7 @@ sub sync_disks {
> }
>
> my $test_volid = sub {
> - my ($volid, $is_cdrom, $snapname) = @_;
> -
> - return if !$volid;
> + my ($volid, $is_cdrom, $snaprefs) = @_;
>
> if ($volid =~ m|^/|) {
> $local_volumes->{$volid} = 'config';
> @@ -281,8 +279,9 @@ sub sync_disks {
> if ($is_cdrom) {
> if ($volid eq 'cdrom') {
> my $msg = "can't migrate local cdrom drive";
> - $msg .= " (referenced in snapshot '$snapname')"
> - if defined($snapname);
> + if (defined($snaprefs)) {
> + my $snapnames = join(', ', sort keys %$snaprefs);
> + $msg .= " (referenced in snapshot - $snapnames)"
>
Here is a bracket missing
More information about the pve-devel
mailing list