destroy machines before trying to delete them.
[invirt/packages/invirt-web.git] / templates / main.py
index f798cbf..c6006f4 100755 (executable)
@@ -510,6 +510,7 @@ def getDiskInfo(data_dict, machine):
 
 def deleteVM(machine):
     """Delete a VM."""
+    remctl('destroy', machine.name)
     transaction = ctx.current.create_transaction()
     delete_disk_pairs = [(machine.name, d.guest_device_name) for d in machine.disks]
     try: