17 lines
383 B
Python
Executable File
17 lines
383 B
Python
Executable File
#!/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()
|