dom0/core: add missing "cleanup_dispvms" file (#648)

This commit is contained in:
Marek Marczykowski 2012-08-06 14:57:30 +02:00
parent e1404a2d4f
commit 4f56cf420a

16
dom0/aux-tools/cleanup_dispvms Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/python
from qubes.qubes import QubesVmCollection
def main():
qvm_collection = QubesVmCollection()
qvm_collection.lock_db_for_writing()
qvm_collection.load()
for vm in qvm_collection.values():
if vm.is_disposablevm() and not vm.is_running():
qvm_collection.pop(vm.qid)
qvm_collection.save()
qvm_collection.unlock_db()
main()