#!/bin/bash function rmac_addr (){ printf '54:60:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256)) } source profile/$1 boot=$2 mac=$(rmac_addr) qemu-system-x86_64 \ -enable-kvm \ -m 1024 \ -boot ${boot} \ -cdrom ${iso} \ -hda ${image} \ -vga std \ -display sdl \ -device e1000,netdev=t0,mac=${mac} \ -netdev tap,id=t0,ifname=${tap},script=no,downscript=no \ &