Unable to Delete Instance

The “nova-api.log” file contains the message ERROR: InstanceInvalidState: Instance in task_state powering-off. Cannot force_delete while the instance is in this state.

1.Reset the state of the VM

nova reset-state <VM_uuid> 

2.Determine which node the VM is running

openstack server show <vm_uuid> | grep host

3.Restart nova-compute service on the corresponding Compute node

service nova-compute stop
service nova-compute start 

4.Try to delete the instance again

nova delete <VM_uuid>