forked from uncloud/uncloud
[hack] add scripts to start VM
This commit is contained in:
parent
344a957a3f
commit
388127bd11
2 changed files with 47 additions and 0 deletions
26
uncloud/hack/uncloud-hack-init-host
Normal file
26
uncloud/hack/uncloud-hack-init-host
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
id=100
|
||||
rawdev=eth0
|
||||
|
||||
# create vxlan
|
||||
ip -6 link add vxlan${id} type vxlan \
|
||||
id ${id} \
|
||||
dstport 4789 \
|
||||
group ff05::${id} \
|
||||
dev ${rawdev} \
|
||||
ttl 5
|
||||
|
||||
ip link set vxlan${id} up
|
||||
|
||||
# create bridge
|
||||
ip link set vxlan${id} up
|
||||
ip link set br${id} up
|
||||
|
||||
# Add vxlan into bridge
|
||||
ip link set vxlan${id} master br${id}
|
||||
|
||||
|
||||
# useradd -m uncloud
|
||||
# [18:05] tablett.place10:~# id uncloud
|
||||
# uid=1000(uncloud) gid=1000(uncloud) groups=1000(uncloud),34(kvm),36(qemu)
|
||||
# apk add qemu-system-x86_64
|
||||
# also needs group netdev
|
||||
Loading…
Add table
Add a link
Reference in a new issue