mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-05 17:18:42 +00:00
api: update vm: print drive string for newly allocated/imported drives
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.ebner@proxmox.com>
This commit is contained in:
parent
e6ac9fed7b
commit
3e7d9fac7c
@ -349,6 +349,7 @@ my $create_disks = sub {
|
|||||||
push @$vollist, $volid;
|
push @$vollist, $volid;
|
||||||
delete $disk->{format}; # no longer needed
|
delete $disk->{format}; # no longer needed
|
||||||
$res->{$ds} = PVE::QemuServer::print_drive($disk);
|
$res->{$ds} = PVE::QemuServer::print_drive($disk);
|
||||||
|
print "$ds: successfully created disk '$res->{$ds}'\n";
|
||||||
} elsif ($volid =~ $NEW_DISK_RE) {
|
} elsif ($volid =~ $NEW_DISK_RE) {
|
||||||
my ($storeid, $size) = ($2 || $default_storage, $3);
|
my ($storeid, $size) = ($2 || $default_storage, $3);
|
||||||
die "no storage ID specified (and no default storage)\n" if !$storeid;
|
die "no storage ID specified (and no default storage)\n" if !$storeid;
|
||||||
@ -417,6 +418,8 @@ my $create_disks = sub {
|
|||||||
delete $disk->{format}; # no longer needed
|
delete $disk->{format}; # no longer needed
|
||||||
$res->{$ds} = PVE::QemuServer::print_drive($disk);
|
$res->{$ds} = PVE::QemuServer::print_drive($disk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "$ds: successfully created disk '$res->{$ds}'\n";
|
||||||
} else {
|
} else {
|
||||||
PVE::Storage::check_volume_access(
|
PVE::Storage::check_volume_access(
|
||||||
$rpcenv,
|
$rpcenv,
|
||||||
|
Loading…
Reference in New Issue
Block a user