]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
followup: reorder error so that $volid is last (potential long)
[qemu-server.git] / PVE / API2 / Qemu.pm
index fbede123921ddbf1f9251782da76b875c788c67c..1e8d3500c72c397523f0688713e17d78684b91f4 100644 (file)
@@ -3393,10 +3393,9 @@ __PACKAGE__->register_method({
        PVE::QemuConfig->check_lock($conf);
 
        if (PVE::QemuServer::check_running($vmid)) {
-           die "cant migrate running VM without --online\n"
-               if !$param->{online};
+           die "can't migrate running VM without --online\n" if !$param->{online};
        } else {
-           warn "VM isn't running. Doing offline migration instead." if $param->{online};
+           warn "VM isn't running. Doing offline migration instead\n." if $param->{online};
            $param->{online} = 0;
        }
 
@@ -3580,6 +3579,8 @@ __PACKAGE__->register_method({
            PVE::Storage::activate_volumes($storecfg, [$volid]);
            my $size = PVE::Storage::volume_size_info($storecfg, $volid, 5);
 
+           die "Could not determine current size of volume '$volid'\n" if !defined($size);
+
            die "internal error" if $sizestr !~ m/^(\+)?(\d+(\.\d+)?)([KMGT])?$/;
            my ($ext, $newsize, $unit) = ($1, $2, $4);
            if ($unit) {