Created
December 27, 2012 05:32
-
-
Save orimanabu/4385708 to your computer and use it in GitHub Desktop.
generate MAC address and UUID for libvirt KVM guest.
This file contains hidden or 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