1
1
Fork 0

added id generatiing tool and a disk creater for kvm

This commit is contained in:
David Starzengruber 2011-01-20 02:37:18 +01:00
parent 37bc983be7
commit 7b7387535c
2 changed files with 22 additions and 0 deletions

8
genqcow2.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# generating new qcow2 disk
echo "what name should it have?"
read name
qemu-img create -f qcow2 $name.qcow2 8G

14
newids.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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