add kvm and virsh

Signed-off-by: Jess Frazelle <jess@mesosphere.com>
This commit is contained in:
Jess Frazelle
2016-03-26 13:49:41 -07:00
parent 1faa831e49
commit ffe22c67bc
3 changed files with 55 additions and 0 deletions

19
kvm/start.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -e
# add the correct user perms
gpasswd -a root libvirt
gpasswd -a root kvm
chown root:kvm /dev/kvm
# create the bridge for networking
ip link add name virt0 type bridge
ip link set virt0 up
bridge link
ip addr add dev virt0 192.168.66.66/24
iptables -t nat -A POSTROUTING -s 192.168.66.66/24 -j MASQUERADE
# start the virtlogd daemon
exec virtlogd --daemon &
exec $@