uncloud-mravi/uncloud/hack/uncloud-run-vm

26 lines
457 B
Text
Raw Normal View History

2020-01-05 17:32:14 +00:00
#!/bin/sh
if [ $# -ne 1 ]; then
echo $0 vmid
exit 1
fi
id=$1; shift
memory=512
macaddress=02:00:b9:cb:70:${id}
netname=net${id}-1
qemu-system-x86_64 \
-name uncloud-${id} \
-accel kvm \
-m ${memory} \
-smp 2,sockets=2,cores=1,threads=1 \
-device virtio-net-pci,netdev=net0,mac=$macaddress \
-netdev tap,id=net0,ifname=${netname},script=no,downscript=no \
2020-01-10 23:24:17 +00:00
-vnc [::]:0
# To be changed:
# -vnc to unix path
# or -spice