[pve-devel] [PATCH] HA resources check before destroying vm
    Dietmar Maurer 
    dietmar at proxmox.com
       
    Fri Aug 28 13:49:25 CEST 2015
    
    
  
What about LXC Containers?
> On August 28, 2015 at 1:26 PM Alen Grizonic <a.grizonic at proxmox.com> wrote:
> 
> 
> ---
>  PVE/API2/Qemu.pm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 513b224..a6ad831 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -1142,6 +1142,10 @@ __PACKAGE__->register_method({
>  
>  	my $storecfg = PVE::Storage::config();
>  
> +	if (PVE::HA::Config::vm_is_ha_managed($vmid)) {
> +	    die "unable to delete VM $vmid - used in HA resources\n";
> +	}
> +
>  	my $realcmd = sub {
>  	    my $upid = shift;
>  
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
    
    
More information about the pve-devel
mailing list