Added a nobrainer script stolen, and subsequently tweaked to taste

This commit is contained in:
Orien Vandenbergh 2016-04-06 00:15:08 -06:00
parent 76989783ae
commit cbd6b13e50

11
virsh/genmac.py Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env python
# Stolen from https://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Tips_and_tricks-Generating_a_new_unique_MAC_address.html
import virtinst.util
print "UUID: " + virtinst.util.uuidToString(virtinst.util.randomUUID())
print "MAC1: " + virtinst.util.randomMAC()
print "MAC2: " + virtinst.util.randomMAC()
print "MAC3: " + virtinst.util.randomMAC()
print "MAC4: " + virtinst.util.randomMAC()