[pve-devel] applied: [PATCH qemu-server] fix #1260: convert moved template disk to base

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Jan 26 10:07:51 CET 2017


applied

On Wed, Jan 25, 2017 at 02:58:14PM +0100, Fabian Grünbichler wrote:
> this was already possible manually via "qm template", but
> doing it automatically when moving a disk of a template
> makes more sense.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/API2/Qemu.pm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 2c1e2c9..9b60081 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -2650,6 +2650,10 @@ __PACKAGE__->register_method({
>  
>  		    PVE::QemuConfig->add_unused_volume($conf, $old_volid) if !$param->{delete};
>  
> +		    # convert moved disk to base if part of template
> +		    PVE::QemuServer::template_create($vmid, $conf, $disk)
> +			if PVE::QemuConfig->is_template($conf);
> +
>  		    PVE::QemuConfig->write_config($vmid, $conf);
>  
>  		    eval {
> -- 
> 2.1.4




More information about the pve-devel mailing list