Skip to content

Instantly share code, notes, and snippets.

@RaminNietzsche
Created March 10, 2022 17:42
Show Gist options
  • Save RaminNietzsche/a409d8cf898b95eee33d1532fa86fa0c to your computer and use it in GitHub Desktop.
Save RaminNietzsche/a409d8cf898b95eee33d1532fa86fa0c to your computer and use it in GitHub Desktop.
libvirt-hook
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
@RaminNietzsche
Copy link
Author

@pipo Tnx 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment