In the spirit of c75bf16 ("qm importdisk: tell user to what VM disk we
actually imported"), and so that the information is not lost once qm
importdisk switches to re-using the API call.

Added for cloudinit too, because a new disk is allocated.

Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---

The name for cloudinit is rather predictable, so not too sure if it's
worth it there.

 PVE/API2/Qemu.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 9220ce2..c64b92c 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -330,6 +330,7 @@ my $create_disks = sub {
            push @$vollist, $volid;
            delete $disk->{format}; # no longer needed
            $res->{$ds} = PVE::QemuServer::print_drive($disk);
+           print "$ds: successfully created disk '$res->{$ds}'\n";
        } elsif ($volid =~ $NEW_DISK_RE) {
            my ($storeid, $size) = ($2 || $default_storage, $3);
            die "no storage ID specified (and no default storage)\n" if 
!$storeid;
@@ -402,6 +403,8 @@ my $create_disks = sub {
                delete $disk->{format}; # no longer needed
                $res->{$ds} = PVE::QemuServer::print_drive($disk);
            }
+
+           print "$ds: successfully created disk '$res->{$ds}'\n";
        } else {
            PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, 
$vmid, $volid);
 
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to