X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FAPI2%2FQemu.pm;h=2ab90e15751dd0a2aa43aaa42d87f38aa62bfbb7;hb=635c3c4426e3959e714e0e96b845e83569ce034e;hp=e71c63f0c5eb1c97be862ef7503da69cd3af2b39;hpb=e2cd75fa658ee6d722d76ab7b06bc7e204176c0c;p=qemu-server.git diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index e71c63f..2ab90e1 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2099,7 +2099,7 @@ __PACKAGE__->register_method({ enum => [ PVE::QemuServer::disknames() ], }, storage => get_standard_option('pve-storage-id', { description => "Target Storage." }), - format => { + 'format' => { type => 'string', description => "Target Format.", enum => [ 'raw', 'qcow2', 'vmdk' ], @@ -2180,6 +2180,8 @@ __PACKAGE__->register_method({ $conf->{$disk} = PVE::QemuServer::print_drive($vmid, $newdrive); + PVE::QemuServer::add_unused_volume($conf, $volid); + PVE::QemuServer::update_config_nolock($vmid, $conf, 1); }; if (my $err = $@) {