Forked from orimanabu/libvirt_generate_UUID_MAC.py
Last active
August 29, 2015 14:12
-
-
Save madAndroid/eca1d733a4326d93dc3e to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
import virtinst.util | |
print "UUID:\t", virtinst.util.uuidToString(virtinst.util.randomUUID()) | |
print "MAC:\t", virtinst.util.randomMAC(type="qemu") | |
# for one-liner | |
# python -c 'from virtinst.util import *; print uuidToString(randomUUID())' | |
# python -c 'from virtinst.util import *; print randomMAC(type="qemu")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment