def _destroy_vm(self, instance, vm_ref):
        """Destroys a VM record."""
        instance_id = instance.id
        try:
            task = self._session.call_xenapi('Async.VM.destroy', vm_ref)
            self._session.wait_for_task(task, instance_id)
        except self.XenAPI.Failure, exc:
            LOG.exception(exc)

        LOG.debug(_("Instance %(instance_id)s VM destroyed") % locals())
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/virt/xenapi/vmops.py/VMOps._destroy_vm/original