From cbd6b13e50b1406fbfdca30a1f4b7582ce6e6403 Mon Sep 17 00:00:00 2001 From: Orien Vandenbergh Date: Wed, 6 Apr 2016 00:15:08 -0600 Subject: [PATCH] Added a nobrainer script stolen, and subsequently tweaked to taste --- virsh/genmac.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 virsh/genmac.py diff --git a/virsh/genmac.py b/virsh/genmac.py new file mode 100755 index 0000000..bc9099a --- /dev/null +++ b/virsh/genmac.py @@ -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()