1
1
Fork 0
scripts/kvm-tools/archive/newids.sh

15 lines
294 B
Bash

#!/bin/bash
# generating new ids for a vm
newuuid=$(uuidgen)
newmac=$(MACADDR="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"; echo $MACADDR)
# printing new ids
#clear
echo
echo "UUID: $newuuid"
echo "MAC: $newmac"
echo
exit 0