Rollback changes when VM creation failed

Do not only remove files, also remove VM from qubes.xml.
This commit is contained in:
Marek Marczykowski-Górecki 2014-02-23 00:45:43 +01:00
parent 3d67863727
commit cc1ce3961d

View File

@ -215,6 +215,7 @@ class NewVmDlg (QDialog, Ui_NewVMDlg):
thread_monitor.set_error_msg (str(ex))
if vm:
vm.remove_from_disk()
self.qvm_collection.pop(vm.qid)
finally:
self.qvm_collection.unlock_db()