From 689df4afd365501ca9c81d81adf9861d5867d27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 20 Jan 2016 02:50:47 +0100 Subject: [PATCH] dispvm: cleanup DispVM even if was already destroyed dispvm.force_shutdown() throw an exception if the VM is already dead. Fixes QubesOS/qubes-issues#1660 --- dispvm/qfile-daemon-dvm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dispvm/qfile-daemon-dvm b/dispvm/qfile-daemon-dvm index 0421abb0..c582f79b 100755 --- a/dispvm/qfile-daemon-dvm +++ b/dispvm/qfile-daemon-dvm @@ -182,7 +182,11 @@ def main(): subprocess.call(['/usr/lib/qubes/qrexec-client', '-d', dispvm.name, user+':exec /usr/lib/qubes/qubes-rpc-multiplexer ' + exec_index + " " + src_vmname]) - dispvm.force_shutdown() + try: + dispvm.force_shutdown() + except QubesException: + # VM already destroyed + pass qfile.remove_disposable_from_qdb(dispvm.name) main()