--- src/PVE/API2/LXC.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 47dcb08..a913982 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -19,6 +19,7 @@ use PVE::LXC::Migrate; use PVE::API2::LXC::Config; use PVE::API2::LXC::Status; use PVE::API2::LXC::Snapshot; +use PVE::ReplicationTools; use PVE::JSONSchema qw(get_standard_option); use base qw(PVE::RESTHandler); @@ -614,6 +615,9 @@ __PACKAGE__->register_method({ die $running_error_msg if PVE::LXC::check_running($vmid); + # return without error if vm has no replica job + PVE::ReplicationTools::destroy_replica($vmid); + PVE::LXC::destroy_lxc_container($storage_cfg, $vmid, $conf); PVE::AccessControl::remove_vm_access($vmid); PVE::Firewall::remove_vmfw_conf($vmid); -- 2.1.4
_______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel