forked from uncloud/uncloud
Move all files to _etc_based
This commit is contained in:
parent
10f09c7115
commit
3cf3439f1c
116 changed files with 1 additions and 0 deletions
29
uncloud_etcd_based/uncloud/hack/hackcloud/vm.sh
Executable file
29
uncloud_etcd_based/uncloud/hack/hackcloud/vm.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
# if [ $# -ne 1 ]; then
|
||||
# echo "$0: owner"
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
qemu=/usr/bin/qemu-system-x86_64
|
||||
|
||||
accel=kvm
|
||||
#accel=tcg
|
||||
|
||||
memory=1024
|
||||
cores=2
|
||||
uuid=$(uuidgen)
|
||||
mac=$(./mac-gen.py)
|
||||
owner=nico
|
||||
|
||||
export bridge=br100
|
||||
|
||||
set -x
|
||||
$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}
|
||||
Loading…
Add table
Add a link
Reference in a new issue