forked from uncloud/uncloud
22 lines
474 B
Bash
Executable file
22 lines
474 B
Bash
Executable file
#!/bin/sh
|
|
|
|
qemu=/usr/bin/qemu-system-x86_64
|
|
|
|
accel=kvm
|
|
#accel=tcg
|
|
|
|
memory=1024
|
|
cores=2
|
|
uuid=$(uuidgen)
|
|
mac=$(./mac-gen.py)
|
|
|
|
export bridge=br100
|
|
|
|
$qemu -name "uncloud-!${uuid}" \
|
|
-machine pc,accel=${accel} \
|
|
-m ${memory} \
|
|
-smp ${cores} \
|
|
-uuid ${uuid} \
|
|
-drive file=alpine-virt-3.11.2-x86_64.iso,media=cdrom \
|
|
-netdev tap,id=netmain,script=./ifup.sh,downscript=./ifdown.sh \
|
|
-device virtio-net-pci,netdev=netmain,id=net0,mac=${mac}
|