I had an issue importing VMs from an export domain I was trying out.  The template would fail to copy over, and be stuck in a "paused" state where I could not delete or modify the VM.  I was able to fix this by dropping into the SQL database and running:

psql engine -c "SELECT vm_guid, vm_name from vm_static WHERE vm_name = 'VM_Name_Here';"


psql engine -c "update vm_dynamic SET status=0 where vm_guid='LongStringFromFirstCommand;"


This was able to set the status to a state where I could delete the VM, but now I still see the "import" task in the task log.


I did some more database diving and found that if i ran:

SELECT * FROM audit_log WHERE vm_name = 'VM_Template_Name_Here';


These entries seem to correspond with the audit entries. Can I simply delete these entries from "audit_log"? Or would this cause problems?


Or perhaps, to be safe, I should just see if I can set them to "Completed"


As always, thanks!