about summary refs log tree commit diff stats
path: root/tools/scripts/runvm/runvm.sh
blob: db479cc906ba36931668a5dc59b3d874692f6149 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 \
    &