diff --git a/include/DispatchManager.h b/include/DispatchManager.h index 194e4484b8..a1c4759d51 100644 --- a/include/DispatchManager.h +++ b/include/DispatchManager.h @@ -296,6 +296,15 @@ public: int delete_recreate(VirtualMachine * vm, const RequestAttributes& ra, string& error_str); + /** + * Ends a VM life cycle inside ONE but let the VM running at the Hipervisor. + * @param vm VirtualMachine object + * @param ra information about the API call request + * @return 0 on success, the VM mutex is unlocked + */ + int delete_vm_db(VirtualMachine * vm, const RequestAttributes& ra, + string& error_str); + /** * Recover the last operation on the VM * @param vm VirtualMachine object @@ -541,7 +550,7 @@ private: /** * Frees the resources associated to a VM: disks, ip addresses and Quotas */ - void free_vm_resources(VirtualMachine * vm); + void free_vm_resources(VirtualMachine * vm, bool check_images); //-------------------------------------------------------------------------- // DM Actions associated with a VM state transition diff --git a/include/VirtualMachine.h b/include/VirtualMachine.h index c99f0e3679..ffbd85f3d3 100644 --- a/include/VirtualMachine.h +++ b/include/VirtualMachine.h @@ -1045,8 +1045,9 @@ public: /** * Releases all disk images taken by this Virtual Machine * @param quotas disk space to free from image datastores + * @param check_state to update image state based on VM state */ - void release_disk_images(vector