Project

General

Profile

run.sh

Sven Eckelmann, 08/12/2018 03:52 PM

Download (576 Bytes)

 
1
#! /bin/sh
2

    
3
SHARED_PATH=/home/sven/tmp/qemu-batman/
4

    
5
for i in `seq 1 5`; do
6
	qemu-img create -b debian.img -f qed root.cow$i
7
	normalized_id=`echo "$i"|awk '{ printf "%02d\n",$1 }'`
8
	screen qemu-system-x86_64 -enable-kvm -kernel bzImage -append "root=/dev/vda rw console=ttyS0" \
9
		-smp 2 -m 512 -drive file=root.cow$i,if=virtio \
10
		-netdev type=tap,id=net0,ifname=tap$i,script=no -device virtio-net-pci,mac=02:ba:de:af:fe:`echo $i|awk '{ printf "%02X", $1 }'`,netdev=net0 \
11
		-virtfs local,path="${SHARED_PATH}",security_model=none,mount_tag=host \
12
		-nographic
13
	sleep 1
14
done