mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 12:23:35 +01:00
5eccef3c66
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
22 lines
430 B
Bash
Executable File
22 lines
430 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -o pipefail
|
|
|
|
# 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 dev virt0 up
|
|
bridge link
|
|
ip addr add dev virt0 172.20.0.1/16
|
|
iptables -t nat -A POSTROUTING -s 172.20.0.1/16 -j MASQUERADE
|
|
|
|
# start the virtlogd daemon
|
|
exec virtlogd --daemon &
|
|
|
|
# shellcheck disable=SC2068
|
|
exec $@
|