Created
March 10, 2022 17:42
-
-
Save RaminNietzsche/a409d8cf898b95eee33d1532fa86fa0c to your computer and use it in GitHub Desktop.
libvirt-hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__" : | |
try: | |
vir_domain, action = sys.argv[1:3] | |
except: | |
exit(0) | |
log(sys.argv) | |
if action == 'release': | |
try: | |
conn = libvirt.open(None) | |
machine = conn.lookupByName(vir_domain) | |
... | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@pipo Tnx 👍